summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockPumpkin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/BlockPumpkin.patch')
-rw-r--r--nms-patches/BlockPumpkin.patch22
1 files changed, 11 insertions, 11 deletions
diff --git a/nms-patches/BlockPumpkin.patch b/nms-patches/BlockPumpkin.patch
index d0fc889a..04cdad4b 100644
--- a/nms-patches/BlockPumpkin.patch
+++ b/nms-patches/BlockPumpkin.patch
@@ -1,7 +1,7 @@
--- a/net/minecraft/server/BlockPumpkin.java
+++ b/net/minecraft/server/BlockPumpkin.java
-@@ -3,6 +3,12 @@
- import com.google.common.base.Predicate;
+@@ -4,6 +4,12 @@
+ import java.util.Iterator;
import javax.annotation.Nullable;
+// CraftBukkit start
@@ -13,8 +13,8 @@
public class BlockPumpkin extends BlockFacingHorizontal {
private ShapeDetector snowGolemPart;
-@@ -40,18 +46,25 @@
- int i;
+@@ -43,18 +49,25 @@
+ EntityPlayer entityplayer;
int j;
+ BlockStateListPopulator blockList = new BlockStateListPopulator(world.getWorld()); // CraftBukkit - Use BlockStateListPopulator
@@ -38,10 +38,10 @@
+ // CraftBukkit start
+ if (world.addEntity(entitysnowman, SpawnReason.BUILD_SNOWMAN)) {
+ blockList.updateList();
+ iterator = world.a(EntityPlayer.class, entitysnowman.getBoundingBox().g(5.0D)).iterator();
- for (j = 0; j < 120; ++j) {
- world.addParticle(EnumParticle.SNOW_SHOVEL, (double) blockposition1.getX() + world.random.nextDouble(), (double) blockposition1.getY() + world.random.nextDouble() * 2.5D, (double) blockposition1.getZ() + world.random.nextDouble(), 0.0D, 0.0D, 0.0D, new int[0]);
-@@ -62,12 +75,17 @@
+ while (iterator.hasNext()) {
+@@ -71,12 +84,17 @@
world.update(shapedetectorblock1.getPosition(), Blocks.AIR, false);
}
@@ -60,7 +60,7 @@
}
}
-@@ -76,7 +94,9 @@
+@@ -85,7 +103,9 @@
entityirongolem.setPlayerCreated(true);
entityirongolem.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.05D, (double) blockposition2.getZ() + 0.5D, 0.0F, 0.0F);
@@ -68,10 +68,10 @@
+ // CraftBukkit start
+ if (world.addEntity(entityirongolem, SpawnReason.BUILD_IRONGOLEM)) {
+ blockList.updateList();
+ iterator = world.a(EntityPlayer.class, entityirongolem.getBoundingBox().g(5.0D)).iterator();
- for (j = 0; j < 120; ++j) {
- world.addParticle(EnumParticle.SNOWBALL, (double) blockposition2.getX() + world.random.nextDouble(), (double) blockposition2.getY() + world.random.nextDouble() * 3.9D, (double) blockposition2.getZ() + world.random.nextDouble(), 0.0D, 0.0D, 0.0D, new int[0]);
-@@ -90,6 +110,7 @@
+ while (iterator.hasNext()) {
+@@ -105,6 +125,7 @@
}
}
}