diff --git a/src/main/java/net/minestom/server/instance/DynamicChunk.java b/src/main/java/net/minestom/server/instance/DynamicChunk.java index 2fbcb29ac..9b91c8369 100644 --- a/src/main/java/net/minestom/server/instance/DynamicChunk.java +++ b/src/main/java/net/minestom/server/instance/DynamicChunk.java @@ -186,7 +186,10 @@ public class DynamicChunk extends Chunk { final Block block = entry.getValue(); final BlockHandler handler = block.handler(); if (handler == null) return; - assert handler.tickable(): String.format("You cannot change the tickable state of %s during runtime!", handler.getNamespaceId()); + // We cannot throw an exception as that could cause other blocks to not get properly ticked. + if (!handler.tickable()) { + LOGGER.warn("Ticking a block {} using the handler {}, but it is no longer considered tickable. Previously, it was tickable, but this is unsupported since tickable is immutable.", block, handler); + } final Point blockPosition = CoordConversion.chunkBlockIndexGetGlobal(index, chunkX, chunkZ); handler.tick(new BlockHandler.Tick(block, instance, blockPosition)); }); diff --git a/src/main/java/net/minestom/server/instance/block/BlockHandler.java b/src/main/java/net/minestom/server/instance/block/BlockHandler.java index 628cf93d7..fff85389f 100644 --- a/src/main/java/net/minestom/server/instance/block/BlockHandler.java +++ b/src/main/java/net/minestom/server/instance/block/BlockHandler.java @@ -75,9 +75,9 @@ public interface BlockHandler { } /** - * Specifies if this block should be ticked. + * Specifies if this block should be ticked, this is immutable after the block is set. *
- * This method is only called when the block is set. + * This method is only called during the block set and later to check immutability. * * @return true if this block should be ticked */