mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Merge pull request #458 from Project-Cepi/add-chunk-ref-to-block-handler-methods
Add chunk reference to Tick, blockPosition (Tick) -> relativeBlockPosition
This commit is contained in:
commit
e77e32889b
@ -93,9 +93,9 @@ public class DynamicChunk extends Chunk {
|
||||
final Block block = entry.getValue();
|
||||
final BlockHandler handler = block.handler();
|
||||
if (handler == null) return;
|
||||
final int x = ChunkUtils.blockIndexToChunkPositionX(index);
|
||||
final int y = ChunkUtils.blockIndexToChunkPositionY(index);
|
||||
final int z = ChunkUtils.blockIndexToChunkPositionZ(index);
|
||||
final int x = ChunkUtils.blockIndexToPositionX(index, chunkX);
|
||||
final int y = ChunkUtils.blockIndexToPositionY(index);
|
||||
final int z = ChunkUtils.blockIndexToPositionZ(index, chunkZ);
|
||||
final Vec blockPosition = new Vec(x, y, z);
|
||||
handler.tick(new BlockHandler.Tick(block, instance, blockPosition));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user