diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch new file mode 100644 index 0000000000..9e735c66d2 --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/world/level/block/InfestedBlock.java ++++ b/net/minecraft/world/level/block/InfestedBlock.java +@@ -18,6 +18,7 @@ + import net.minecraft.world.level.block.state.BlockBehaviour; + import net.minecraft.world.level.block.state.BlockState; + import net.minecraft.world.level.block.state.properties.Property; ++import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit + + public class InfestedBlock extends Block { + +@@ -52,10 +52,10 @@ + private void spawnInfestation(ServerLevel serverlevel, BlockPos blockpos) { + Silverfish silverfish = (Silverfish) EntityType.SILVERFISH.create(serverlevel); + +- if (silverfish != null) { +- silverfish.moveTo((double) blockpos.getX() + 0.5D, (double) blockpos.getY(), (double) blockpos.getZ() + 0.5D, 0.0F, 0.0F); +- serverlevel.addFreshEntity(silverfish); +- silverfish.spawnAnim(); ++ if (entitysilverfish != null) { ++ entitysilverfish.moveTo((double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, 0.0F, 0.0F); ++ level.addFreshEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason ++ entitysilverfish.spawnAnim(); + } + + } |