diff options
Diffstat (limited to 'nms-patches/EntitySilverfish.patch')
-rw-r--r-- | nms-patches/EntitySilverfish.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nms-patches/EntitySilverfish.patch b/nms-patches/EntitySilverfish.patch index 9ea99cd9..10e635b5 100644 --- a/nms-patches/EntitySilverfish.patch +++ b/nms-patches/EntitySilverfish.patch @@ -1,18 +1,18 @@ --- a/net/minecraft/server/EntitySilverfish.java +++ b/net/minecraft/server/EntitySilverfish.java -@@ -144,6 +144,11 @@ +@@ -149,6 +149,11 @@ IBlockData iblockdata = world.getType(blockposition); - if (BlockMonsterEggs.d(iblockdata)) { + if (BlockMonsterEggs.i(iblockdata)) { + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.MONSTER_EGG, Block.getId(BlockMonsterEggs.getById(iblockdata.getBlock().toLegacyData(iblockdata)))).isCancelled()) { + return; + } + // CraftBukkit end world.setTypeAndData(blockposition, Blocks.MONSTER_EGG.getBlockData().set(BlockMonsterEggs.VARIANT, BlockMonsterEggs.EnumMonsterEggVarient.a(iblockdata)), 3); - this.silverfish.y(); + this.silverfish.doSpawnEffect(); this.silverfish.die(); -@@ -187,6 +192,11 @@ +@@ -192,6 +197,11 @@ IBlockData iblockdata = world.getType(blockposition1); if (iblockdata.getBlock() == Blocks.MONSTER_EGG) { |