Correct visual ID when overriding in PlayerBlockPlaceEvent

This commit is contained in:
jglrxavpok 2020-04-29 00:20:20 +02:00
parent 263713ab49
commit 365cdf7818

View File

@ -101,6 +101,7 @@ public class BlockPlacementListener {
short customBlockId = playerBlockPlaceEvent.getCustomBlockId(); short customBlockId = playerBlockPlaceEvent.getCustomBlockId();
if(customBlockId != 0) { if(customBlockId != 0) {
instance.setCustomBlock(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ(), playerBlockPlaceEvent.getCustomBlockId()); instance.setCustomBlock(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ(), playerBlockPlaceEvent.getCustomBlockId());
instance.refreshBlockId(blockPosition, playerBlockPlaceEvent.getBlockId());
} else { } else {
instance.setBlock(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ(), playerBlockPlaceEvent.getBlockId()); instance.setBlock(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ(), playerBlockPlaceEvent.getBlockId());
} }