@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user