Skip to content

Commit

Permalink
Merge pull request #4048 from JustAHuman-xD/fix/patch-sensitive-block…
Browse files Browse the repository at this point in the history
…-issue
  • Loading branch information
Sfiguz7 authored Dec 9, 2023
2 parents 123e3b5 + e1d230d commit ae983c9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ private void checkForSensitiveBlocks(Block block, Integer count) {
if (count >= Bukkit.getServer().getMaxChainedNeighborUpdates()) {
return;
}
BlockData blockData = block.getBlockData();
block.setType(Material.AIR, false);
for (BlockFace face : CARDINAL_BLOCKFACES) {
block.setType(Material.AIR, false);
if (!isSupported(block.getRelative(face).getBlockData(), block.getRelative(face))) {
Block relative = block.getRelative(face);
for (ItemStack drop : relative.getDrops()) {
Expand All @@ -267,6 +268,7 @@ private void checkForSensitiveBlocks(Block block, Integer count) {
checkForSensitiveBlocks(relative, ++count);
}
}
block.setBlockData(blockData, false);
}

/**
Expand Down

0 comments on commit ae983c9

Please sign in to comment.