Skip to content

Commit

Permalink
Cleanup disabled sensitive block code
Browse files Browse the repository at this point in the history
  • Loading branch information
WalshyDev committed Jan 13, 2024
1 parent 158c6ee commit 92e6dc1
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void onBlockBreak(BlockBreakEvent e) {
dropItems(e, drops);

// Checks for vanilla sensitive blocks everywhere
checkForSensitiveBlocks(e.getBlock(), 0, e.isDropItems());
// checkForSensitiveBlocks(e.getBlock(), 0, e.isDropItems());
}
}

Expand Down Expand Up @@ -306,8 +306,7 @@ private void checkForSensitiveBlockAbove(Player player, Block block, ItemStack i
// Disabled for now due to #4069 - Servers crashing due to this check
// There is additionally a second bug with `getMaxChainedNeighborUpdates` not existing in 1.17
@ParametersAreNonnullByDefault
private void checkForSensitiveBlocks(Block block, Integer count, boolean isDropItems) {
/*
private void checkForSensitiveBlocks(Block block, int count, boolean isDropItems) {
if (count >= Bukkit.getServer().getMaxChainedNeighborUpdates()) {
return;
}
Expand All @@ -329,7 +328,6 @@ private void checkForSensitiveBlocks(Block block, Integer count, boolean isDropI
// Set the BlockData back: this makes it so containers and spawners drop correctly. This is a hacky fix.
block.setBlockData(state.getBlockData(), false);
state.update(true, false);
*/
}

/**
Expand Down

0 comments on commit 92e6dc1

Please sign in to comment.