@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntitySilverfish.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySilverfish.java
|
||||
@@ -45,7 +45,7 @@
|
||||
this.goalSelector.a(3, this.b);
|
||||
@@ -46,7 +46,7 @@
|
||||
this.goalSelector.a(3, this.friendsGoal);
|
||||
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());
|
||||
@@ -9,19 +9,7 @@
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
}
|
||||
|
||||
@@ -183,6 +183,11 @@
|
||||
IBlockData iblockdata = world.getType(blockposition);
|
||||
|
||||
if (BlockMonsterEggs.h(iblockdata)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.a, blockposition, BlockMonsterEggs.c(iblockdata.getBlock())).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, BlockMonsterEggs.c(iblockdata.getBlock()), 3);
|
||||
this.a.doSpawnEffect();
|
||||
this.a.die();
|
||||
@@ -229,6 +234,11 @@
|
||||
@@ -171,6 +171,11 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
if (block instanceof BlockMonsterEggs) {
|
||||
@@ -30,6 +18,18 @@
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||
world.a(blockposition1, true, this.silverfish);
|
||||
} else {
|
||||
@@ -239,6 +244,11 @@
|
||||
IBlockData iblockdata = world.getType(blockposition);
|
||||
|
||||
if (BlockMonsterEggs.h(iblockdata)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, BlockMonsterEggs.n(iblockdata)).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, BlockMonsterEggs.n(iblockdata), 3);
|
||||
this.mob.doSpawnEffect();
|
||||
this.mob.die();
|
||||
|
||||
Reference in New Issue
Block a user