diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch new file mode 100644 index 0000000000..d1513a9c00 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch @@ -0,0 +1,31 @@ +--- a/net/minecraft/world/level/block/CarvedPumpkinBlock.java ++++ b/net/minecraft/world/level/block/CarvedPumpkinBlock.java +@@ -22,6 +23,9 @@ + import net.minecraft.world.level.block.state.pattern.BlockPatternBuilder; + import net.minecraft.world.level.block.state.predicate.BlockStatePredicate; + import net.minecraft.world.level.block.state.properties.DirectionProperty; ++// CraftBukkit start ++import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; ++// CraftBukkit end + + public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { + public static final MapCodec<CarvedPumpkinBlock> CODEC = simpleCodec(CarvedPumpkinBlock::new); +@@ -78,9 +89,15 @@ + } + + private static void spawnGolemInWorld(Level level, BlockPattern.BlockPatternMatch patternMatch, Entity golem, BlockPos pos) { +- clearPatternBlocks(level, patternMatch); +- golem.moveTo((double)pos.getX() + 0.5, (double)pos.getY() + 0.05, (double)pos.getZ() + 0.5, 0.0F, 0.0F); +- level.addFreshEntity(golem); ++ // clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - moved down ++ golem.moveTo((double) pos.getX() + 0.5D, (double) pos.getY() + 0.05D, (double) pos.getZ() + 0.5D, 0.0F, 0.0F); ++ // CraftBukkit start ++ if (!level.addFreshEntity(golem, SpawnReason.BUILD_IRONGOLEM)) { ++ return; ++ } ++ clearPatternBlocks(level, patternMatch); // CraftBukkit - from above ++ // CraftBukkit end ++ Iterator iterator = level.getEntitiesOfClass(ServerPlayer.class, golem.getBoundingBox().inflate(5.0D)).iterator(); + + for (ServerPlayer serverPlayer : level.getEntitiesOfClass(ServerPlayer.class, golem.getBoundingBox().inflate(5.0))) { + CriteriaTriggers.SUMMONED_ENTITY.trigger(serverPlayer, golem); |