diff --git a/src/main/java/net/minestom/server/instance/Chunk.java b/src/main/java/net/minestom/server/instance/Chunk.java index f9ee008ac..108e25b0f 100644 --- a/src/main/java/net/minestom/server/instance/Chunk.java +++ b/src/main/java/net/minestom/server/instance/Chunk.java @@ -115,7 +115,7 @@ public abstract class Chunk implements Viewable, DataContainer { * Warning: customBlockId cannot be 0 and needs to be valid since the update delay and method * will be retrieved from the associated {@link CustomBlock} object */ - public abstract void setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable); + public abstract void UNSAFE_setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable); /** * Set the {@link Data} at a position diff --git a/src/main/java/net/minestom/server/instance/DynamicChunk.java b/src/main/java/net/minestom/server/instance/DynamicChunk.java index 6c6dc8681..c659ab756 100644 --- a/src/main/java/net/minestom/server/instance/DynamicChunk.java +++ b/src/main/java/net/minestom/server/instance/DynamicChunk.java @@ -32,7 +32,7 @@ public class DynamicChunk extends Chunk { } @Override - public void setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable) { + public void UNSAFE_setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable) { { // Update pathfinder diff --git a/src/main/java/net/minestom/server/instance/InstanceContainer.java b/src/main/java/net/minestom/server/instance/InstanceContainer.java index 831d028cb..5d98d56b4 100644 --- a/src/main/java/net/minestom/server/instance/InstanceContainer.java +++ b/src/main/java/net/minestom/server/instance/InstanceContainer.java @@ -188,7 +188,7 @@ public class InstanceContainer extends Instance { } // Set the block - chunk.setBlock(x, y, z, blockStateId, customBlockId, data, hasUpdate); + chunk.UNSAFE_setBlock(x, y, z, blockStateId, customBlockId, data, hasUpdate); // Refresh neighbors since a new block has been placed executeNeighboursBlockPlacementRule(blockPosition); diff --git a/src/main/java/net/minestom/server/instance/StaticChunk.java b/src/main/java/net/minestom/server/instance/StaticChunk.java index e23d22b7c..2e7b705b9 100644 --- a/src/main/java/net/minestom/server/instance/StaticChunk.java +++ b/src/main/java/net/minestom/server/instance/StaticChunk.java @@ -21,7 +21,7 @@ public class StaticChunk extends Chunk { } @Override - public void setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable) { + public void UNSAFE_setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable) { //noop } diff --git a/src/main/java/net/minestom/server/instance/batch/BlockBatch.java b/src/main/java/net/minestom/server/instance/batch/BlockBatch.java index ddecea03a..c4ba5a528 100644 --- a/src/main/java/net/minestom/server/instance/batch/BlockBatch.java +++ b/src/main/java/net/minestom/server/instance/batch/BlockBatch.java @@ -102,7 +102,7 @@ public class BlockBatch implements InstanceBatch { private Data data; public void apply(Chunk chunk) { - chunk.setBlock(x, y, z, blockStateId, customBlockId, data, CustomBlockUtils.hasUpdate(customBlockId)); + chunk.UNSAFE_setBlock(x, y, z, blockStateId, customBlockId, data, CustomBlockUtils.hasUpdate(customBlockId)); } } diff --git a/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java b/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java index 5f3520134..d102e2c4d 100644 --- a/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java +++ b/src/main/java/net/minestom/server/instance/batch/ChunkBatch.java @@ -142,7 +142,7 @@ public class ChunkBatch implements InstanceBatch { private Data data; public void apply(Chunk chunk) { - chunk.setBlock(x, y, z, blockStateId, customBlockId, data, CustomBlockUtils.hasUpdate(customBlockId)); + chunk.UNSAFE_setBlock(x, y, z, blockStateId, customBlockId, data, CustomBlockUtils.hasUpdate(customBlockId)); } }