diff options
author | md_5 <git@md-5.net> | 2017-05-14 12:00:00 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-05-14 12:00:00 +1000 |
commit | 5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5 (patch) | |
tree | 0314ba59f51141bb5e0e7ff6ca7723d168ac94b9 /nms-patches/BlockPortal.patch | |
parent | 6e3cec8bc78269d72ef7ef49ce82a5eadfb9615a (diff) | |
download | craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar.gz craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar.lz craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar.xz craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.zip |
Update to Minecraft 1.12-pre2
Diffstat (limited to 'nms-patches/BlockPortal.patch')
-rw-r--r-- | nms-patches/BlockPortal.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nms-patches/BlockPortal.patch b/nms-patches/BlockPortal.patch index 064c6f62..4956296f 100644 --- a/nms-patches/BlockPortal.patch +++ b/nms-patches/BlockPortal.patch @@ -19,7 +19,7 @@ + Entity entity = ItemMonsterEgg.spawnCreature(world, EntityTypes.getName(EntityPigZombie.class), (double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 1.1D, (double) blockposition1.getZ() + 0.5D, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL); if (entity != null) { - entity.portalCooldown = entity.aE(); + entity.portalCooldown = entity.aK(); @@ -70,14 +74,16 @@ BlockPortal.Shape blockportal_shape = new BlockPortal.Shape(world, blockposition, EnumDirection.EnumAxis.X); @@ -44,7 +44,7 @@ @@ -108,6 +114,10 @@ public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) { - if (!entity.isPassenger() && !entity.isVehicle() && entity.aX()) { + if (!entity.isPassenger() && !entity.isVehicle() && entity.bd()) { + // CraftBukkit start - Entity in portal + EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ())); + world.getServer().getPluginManager().callEvent(event); @@ -52,7 +52,7 @@ entity.e(blockposition); } -@@ -212,6 +222,7 @@ +@@ -216,6 +226,7 @@ private BlockPosition position; private int height; private int width; @@ -60,7 +60,7 @@ public Shape(World world, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) { this.a = world; -@@ -270,6 +281,10 @@ +@@ -274,6 +285,10 @@ } protected int c() { @@ -71,7 +71,7 @@ int i; label56: -@@ -290,11 +305,21 @@ +@@ -294,11 +309,21 @@ block = this.a.getType(blockposition.shift(this.d)).getBlock(); if (block != Blocks.OBSIDIAN) { break label56; @@ -93,7 +93,7 @@ } } } -@@ -304,6 +329,11 @@ +@@ -308,6 +333,11 @@ if (this.a.getType(this.position.shift(this.c, i).up(this.height)).getBlock() != Blocks.OBSIDIAN) { this.height = 0; break; @@ -105,7 +105,7 @@ } } -@@ -325,7 +355,27 @@ +@@ -329,7 +359,27 @@ return this.position != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21; } @@ -134,7 +134,7 @@ for (int i = 0; i < this.width; ++i) { BlockPosition blockposition = this.position.shift(this.c, i); -@@ -334,6 +384,7 @@ +@@ -338,6 +388,7 @@ } } |