Small sculk cleanup

Don't check for empty items anymore in FishingHook.

Removes some diff + we handle it gracefully in add fresh entity
This commit is contained in:
Owen1212055
2024-12-19 00:00:37 -05:00
parent 413751ae2d
commit 2935905ced
2 changed files with 9 additions and 26 deletions

View File

@@ -1,16 +1,13 @@
--- a/net/minecraft/world/level/block/SculkBlock.java
+++ b/net/minecraft/world/level/block/SculkBlock.java
@@ -37,8 +_,11 @@
@@ -37,8 +_,9 @@
if (random.nextInt(growthSpawnCost) < charge) {
BlockPos blockPos = pos1.above();
BlockState randomGrowthState = this.getRandomGrowthState(level, blockPos, random, spreader.isWorldGeneration());
- level.setBlock(blockPos, randomGrowthState, 3);
- level.playSound(null, pos1, randomGrowthState.getSoundType().getPlaceSound(), SoundSource.BLOCKS, 1.0F, 1.0F);
+ // CraftBukkit start - Call BlockSpreadEvent
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, pos, blockPos, randomGrowthState, 3)) {
+ level.playSound(null, pos1, randomGrowthState.getSoundType().getPlaceSound(), SoundSource.BLOCKS, 1.0F, 1.0F);
+ }
+ // CraftBukkit end
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, pos, blockPos, randomGrowthState, 3)) { // CraftBukkit - Call BlockSpreadEvent
level.playSound(null, pos1, randomGrowthState.getSoundType().getPlaceSound(), SoundSource.BLOCKS, 1.0F, 1.0F);
+ } // CraftBukkit - Call BlockSpreadEvent
}
return Math.max(0, charge - growthSpawnCost);