aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch
new file mode 100644
index 0000000000..5da2390b07
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch
@@ -0,0 +1,34 @@
+--- a/net/minecraft/world/level/block/CarvedPumpkinBlock.java
++++ b/net/minecraft/world/level/block/CarvedPumpkinBlock.java
+@@ -23,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 {
+
+@@ -87,11 +88,16 @@
+
+ }
+
+- private static void spawnGolemInWorld(Level level, BlockPattern.BlockPatternMatch blockpattern_blockpatternmatch, Entity entity, BlockPos blockpos) {
+- clearPatternBlocks(level, blockpattern_blockpatternmatch);
+- entity.moveTo((double) blockpos.getX() + 0.5D, (double) blockpos.getY() + 0.05D, (double) blockpos.getZ() + 0.5D, 0.0F, 0.0F);
+- level.addFreshEntity(entity);
+- Iterator iterator = level.getEntitiesOfClass(ServerPlayer.class, entity.getBoundingBox().inflate(5.0D)).iterator();
++ private static void spawnGolemInWorld(Level level, BlockPattern.BlockPatternMatch patternMatch, Entity golem, BlockPos pos) {
++ // 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();
+
+ while (iterator.hasNext()) {
+ ServerPlayer serverplayer = (ServerPlayer) iterator.next();