2018-07-20 08:04:37 +02:00
|
|
|
--- a/net/minecraft/server/EntityDolphin.java
|
|
|
|
+++ b/net/minecraft/server/EntityDolphin.java
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -106,7 +106,7 @@
|
|
|
|
this.goalSelector.a(8, new EntityDolphin.d());
|
|
|
|
this.goalSelector.a(8, new PathfinderGoalFollowBoat(this));
|
|
|
|
this.goalSelector.a(9, new PathfinderGoalAvoidTarget<>(this, EntityGuardian.class, 8.0F, 1.0D, 1.0D));
|
2019-05-27 22:30:00 +02:00
|
|
|
- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityGuardian.class})).a());
|
|
|
|
+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityGuardian.class})).a(new Class[0])); // CraftBukkit - decompile error
|
2019-04-23 04:00:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-17 23:19:52 +02:00
|
|
|
@@ -178,6 +178,11 @@
|
|
|
|
ItemStack itemstack = entityitem.getItemStack();
|
|
|
|
|
|
|
|
if (this.g(itemstack)) {
|
|
|
|
+ // CraftBukkit start - call EntityPickupItemEvent
|
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, false).isCancelled()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
|
|
|
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
|
|
|
|
this.receive(entityitem, itemstack.getCount());
|
|
|
|
@@ -422,7 +427,7 @@
|
2018-07-20 08:04:37 +02:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2018-07-20 08:04:37 +02:00
|
|
|
public void c() {
|
|
|
|
- this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100));
|
|
|
|
+ this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
|
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2019-05-17 23:19:52 +02:00
|
|
|
@@ -441,7 +446,7 @@
|
2018-07-20 08:04:37 +02:00
|
|
|
}
|
|
|
|
|
2018-07-22 04:00:00 +02:00
|
|
|
if (this.c.isSwimming() && this.c.world.random.nextInt(6) == 0) {
|
2018-07-20 08:04:37 +02:00
|
|
|
- this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100));
|
|
|
|
+ this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|