40 lines
1.9 KiB
Diff
40 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cryptite <cryptite@gmail.com>
|
|
Date: Mon, 10 Apr 2023 07:29:11 -0500
|
|
Subject: [PATCH] Set BlockData without light updates
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
|
index 390a2a2611df35a9ea6f1eb996b47e2aa4597ff0..384e5700b6899850d91a34e1d13d1ca0678cfaaa 100644
|
|
--- a/src/main/java/org/bukkit/block/Block.java
|
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
|
@@ -298,6 +298,28 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
|
*/
|
|
void setBlockData(@NotNull BlockData data, boolean applyPhysics);
|
|
|
|
+ /**
|
|
+ * Sets the complete data for this block
|
|
+ *
|
|
+ * <br>
|
|
+ * Note that applyPhysics = false is not in general safe. It should only be
|
|
+ * used when you need to avoid triggering a physics update of neighboring
|
|
+ * blocks, for example when creating a {@link Bisected} block. If you are
|
|
+ * using a custom populator, then this parameter may also be required to
|
|
+ * prevent triggering infinite chunk loads on border blocks. This method
|
|
+ * should NOT be used to "hack" physics by placing blocks in impossible
|
|
+ * locations. Such blocks are liable to be removed on various events such as
|
|
+ * world upgrades. Furthermore setting large amounts of such blocks in close
|
|
+ * proximity may overload the server physics engine if an update is
|
|
+ * triggered at a later point. If this occurs, the resulting behavior is
|
|
+ * undefined.
|
|
+ *
|
|
+ * @param data new block specific data
|
|
+ * @param applyPhysics false to cancel physics from the changed block
|
|
+ * @param checkLight false to prevent a light-check update
|
|
+ */
|
|
+ void setBlockData(@NotNull BlockData data, boolean applyPhysics, boolean checkLight);
|
|
+
|
|
/**
|
|
* Sets the type of this block
|
|
*
|