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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user