@@ -1,18 +1,27 @@
|
||||
--- a/net/minecraft/server/EntitySilverfish.java
|
||||
+++ b/net/minecraft/server/EntitySilverfish.java
|
||||
@@ -153,6 +153,11 @@
|
||||
@@ -19,7 +19,7 @@
|
||||
this.goalSelector.a(3, this.c);
|
||||
this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 1.0D, false));
|
||||
this.goalSelector.a(5, new EntitySilverfish.PathfinderGoalSilverfishHideInBlock(this));
|
||||
- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a());
|
||||
+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // CraftBukkit - decompile error
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
}
|
||||
|
||||
@@ -167,6 +167,11 @@
|
||||
IBlockData iblockdata = world.getType(blockposition);
|
||||
|
||||
if (BlockMonsterEggs.k(iblockdata)) {
|
||||
if (BlockMonsterEggs.j(iblockdata)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.a, blockposition, BlockMonsterEggs.f(iblockdata.getBlock())).isCancelled()) {
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.a, blockposition, BlockMonsterEggs.e(iblockdata.getBlock())).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, BlockMonsterEggs.f(iblockdata.getBlock()), 3);
|
||||
world.setTypeAndData(blockposition, BlockMonsterEggs.e(iblockdata.getBlock()), 3);
|
||||
this.a.doSpawnEffect();
|
||||
this.a.die();
|
||||
@@ -197,6 +202,11 @@
|
||||
@@ -213,6 +218,11 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
if (block instanceof BlockMonsterEggs) {
|
||||
@@ -22,5 +31,5 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (world.getGameRules().getBoolean("mobGriefing")) {
|
||||
world.setAir(blockposition1, true);
|
||||
world.b(blockposition1, true);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user