From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Cryptite 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 49974558799830d827f9ccd65a8bafee3fb0376b..93fcb1562e58a3a613eccd28cae1e87e26a158c9 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 + * + *
+ * 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 *