From b0d449a6f34695353c0c7c7ece4ba614efc4f742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Lind=C3=A9n?= Date: Sat, 17 Nov 2018 10:46:58 +0100 Subject: [PATCH] Always notify about block change when setting block metadata. --- src/World.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/World.js b/src/World.js index 1c8fa4f..b6ea0c7 100644 --- a/src/World.js +++ b/src/World.js @@ -799,14 +799,12 @@ com.mordritch.mcSim.World = function(BlockObj, worldDataObj) { this.setBlockMetadataWithNotify = function(posX, posY, posZ, blockMetadata) { if (this.setBlockMetadata(posX, posY, posZ, blockMetadata)) { - var blockID = this.getBlockId(posX, posY, posZ); - if(this.Block.blocksList[blockID & 0xff].requiresSelfNotify) - { - this.notifyBlockChange(posX, posY, posZ, blockID); - } - else { - this.notifyBlocksOfNeighborChange(posX, posY, posZ, blockID); - } + var blockID = this.getBlockId(posX, posY, posZ); + this.notifyBlockChange(posX, posY, posZ, blockID); + if(!this.Block.blocksList[blockID & 0xff].requiresSelfNotify) + { + this.notifyBlocksOfNeighborChange(posX, posY, posZ, blockID); + } } };