From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 22 Sep 2021 09:41:27 -0500 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 ad8bce01ba459a036cd4ebbbe4fc974021924fe2..6ef43ae39a8ad4ed0e9a7bf68c17840576e235ea 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -287,6 +287,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 *