diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch new file mode 100644 index 0000000000..b858fa3c4c --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/InfestedBlock.java.patch @@ -0,0 +1,28 @@ +--- 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 { + public static final MapCodec<InfestedBlock> CODEC = RecordCodecBuilder.mapCodec( +@@ -49,11 +50,12 @@ + } + + private void spawnInfestation(ServerLevel level, BlockPos pos) { +- Silverfish silverfish = EntityType.SILVERFISH.create(level); +- if (silverfish != null) { +- silverfish.moveTo((double)pos.getX() + 0.5, (double)pos.getY(), (double)pos.getZ() + 0.5, 0.0F, 0.0F); +- level.addFreshEntity(silverfish); +- silverfish.spawnAnim(); ++ Silverfish entitysilverfish = (Silverfish) EntityType.SILVERFISH.create(level); ++ ++ 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(); + } + } + |