Merge branch 'master' of https://github.com/GeyserMC/Geyser into feature/1.18

This commit is contained in:
Camotoy 2021-11-14 13:38:22 -05:00
commit 6249292903
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
3 changed files with 29 additions and 26 deletions

View file

@ -110,8 +110,12 @@ public class GeyserPistonListener implements Listener {
List<Block> blocks = isExtend ? ((BlockPistonExtendEvent) event).getBlocks() : ((BlockPistonRetractEvent) event).getBlocks();
for (Block block : blocks) {
Location attachedLocation = block.getLocation();
attachedBlocks.put(getVector(attachedLocation), worldManager.getBlockNetworkId(player, block,
attachedLocation.getBlockX(), attachedLocation.getBlockY(), attachedLocation.getBlockZ()));
int blockId = worldManager.getBlockNetworkId(player, block,
attachedLocation.getBlockX(), attachedLocation.getBlockY(), attachedLocation.getBlockZ());
// Ignore blocks that will be destroyed
if (BlockStateValues.canPistonMoveBlock(blockId, isExtend)) {
attachedBlocks.put(getVector(attachedLocation), blockId);
}
}
blocksFilled = true;
}