diff options
author | md_5 <git@md-5.net> | 2016-06-09 11:43:49 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-06-09 11:43:49 +1000 |
commit | a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d (patch) | |
tree | 9efb0ce242b802a188032bd500ef7afaf29032a3 /nms-patches/BlockPumpkin.patch | |
parent | 0cd0397a8295992112ad3bf0d37795a04d22503e (diff) | |
download | craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.gz craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.lz craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.xz craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.zip |
Update to Minecraft 1.10
Diffstat (limited to 'nms-patches/BlockPumpkin.patch')
-rw-r--r-- | nms-patches/BlockPumpkin.patch | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/nms-patches/BlockPumpkin.patch b/nms-patches/BlockPumpkin.patch index 4404b2f3..27c335cc 100644 --- a/nms-patches/BlockPumpkin.patch +++ b/nms-patches/BlockPumpkin.patch @@ -13,11 +13,12 @@ public class BlockPumpkin extends BlockFacingHorizontal { private ShapeDetector snowGolemPart; -@@ -41,17 +47,24 @@ +@@ -40,18 +46,25 @@ + int i; int j; - if ((shapedetector_shapedetectorcollection = this.getDetectorSnowGolem().a(world, blockposition)) != null) { -+ BlockStateListPopulator blockList = new BlockStateListPopulator(world.getWorld()); // CraftBukkit - Use BlockStateListPopulator ++ BlockStateListPopulator blockList = new BlockStateListPopulator(world.getWorld()); // CraftBukkit - Use BlockStateListPopulator + if (shapedetector_shapedetectorcollection != null) { for (i = 0; i < this.getDetectorSnowGolem().b(); ++i) { ShapeDetectorBlock shapedetectorblock = shapedetector_shapedetectorcollection.a(0, i, 0); @@ -40,38 +41,38 @@ 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,10 +75,16 @@ +@@ -62,12 +75,17 @@ world.update(shapedetectorblock1.getPosition(), Blocks.AIR); } + } // CraftBukkit end - } else if ((shapedetector_shapedetectorcollection = this.getDetectorIronGolem().a(world, blockposition)) != null) { -+ BlockStateListPopulator blockList = new BlockStateListPopulator(world.getWorld()); // CraftBukkit - Use BlockStateListPopulator - for (i = 0; i < this.getDetectorIronGolem().c(); ++i) { - for (int k = 0; k < this.getDetectorIronGolem().b(); ++k) { -- world.setTypeAndData(shapedetector_shapedetectorcollection.a(i, k, 0).getPosition(), Blocks.AIR.getBlockData(), 2); -+ // CraftBukkit start -+ // world.setTypeAndData(shapedetectorcollection.a(i, k, 0).d(), Blocks.AIR.getBlockData(), 2); -+ BlockPosition pos = shapedetector_shapedetectorcollection.a(i, k, 0).getPosition(); -+ blockList.setTypeId(pos.getX(), pos.getY(), pos.getZ(), 0); -+ // CraftBukkit end + } else { + shapedetector_shapedetectorcollection = this.getDetectorIronGolem().a(world, blockposition); + if (shapedetector_shapedetectorcollection != null) { + for (i = 0; i < this.getDetectorIronGolem().c(); ++i) { + for (int k = 0; k < this.getDetectorIronGolem().b(); ++k) { +- world.setTypeAndData(shapedetector_shapedetectorcollection.a(i, k, 0).getPosition(), Blocks.AIR.getBlockData(), 2); ++ // CraftBukkit start ++ // world.setTypeAndData(shapedetector_shapedetectorcollection.a(i, k, 0).getPosition(), Blocks.AIR.getBlockData(), 2); ++ BlockPosition pos = shapedetector_shapedetectorcollection.a(i, k, 0).getPosition(); ++ blockList.setTypeId(pos.getX(), pos.getY(), pos.getZ(), 0); ++ // CraftBukkit end + } } - } -@@ -74,7 +93,10 @@ +@@ -76,7 +94,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); -- world.addEntity(entityirongolem); -+ + entityirongolem.setPlayerCreated(true); + entityirongolem.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.05D, (double) blockposition2.getZ() + 0.5D, 0.0F, 0.0F); +- world.addEntity(entityirongolem); + // CraftBukkit start + if (world.addEntity(entityirongolem, SpawnReason.BUILD_IRONGOLEM)) { + blockList.updateList(); - 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]); -@@ -87,6 +109,7 @@ - world.update(shapedetectorblock2.getPosition(), Blocks.AIR); + 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 @@ + } } } + } // CraftBukkit end |