From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 28 Feb 2022 08:40:41 -0600 Subject: [PATCH] Set BlockData without light update diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java index 3e980c630452c8ea72227bc4cd92c605253cd41b..fe23d144175b3bd55564a4a266b98cd2fc70a08a 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -297,6 +297,28 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran */ void setBlockData(@NotNull BlockData data, boolean applyPhysics); + /** + * Sets the complete data for this block + * + *
+ * 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 *