mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
More comments
This commit is contained in:
parent
b3ff154f24
commit
b38743d713
@ -307,6 +307,7 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BlockState state = block.getState();
|
BlockState state = block.getState();
|
||||||
|
// We set the block to air to make use of BlockData#isSupported.
|
||||||
block.setType(Material.AIR, false);
|
block.setType(Material.AIR, false);
|
||||||
for (BlockFace face : CARDINAL_BLOCKFACES) {
|
for (BlockFace face : CARDINAL_BLOCKFACES) {
|
||||||
if (!isSupported(block.getRelative(face).getBlockData(), block.getRelative(face))) {
|
if (!isSupported(block.getRelative(face).getBlockData(), block.getRelative(face))) {
|
||||||
@ -319,6 +320,7 @@ public class BlockListener implements Listener {
|
|||||||
checkForSensitiveBlocks(relative, ++count, isDropItems);
|
checkForSensitiveBlocks(relative, ++count, isDropItems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Set the BlockData back: this makes it so containers and spawners drop correctly. This is a hacky fix.
|
||||||
block.setBlockData(state.getBlockData(), false);
|
block.setBlockData(state.getBlockData(), false);
|
||||||
state.update(true, false);
|
state.update(true, false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user