2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/entity/animal/EntityBee.java
|
|
|
|
+++ b/net/minecraft/world/entity/animal/EntityBee.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -243,7 +243,7 @@
|
2020-02-02 01:16:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (b0 > 0) {
|
2021-06-11 07:00:00 +02:00
|
|
|
- ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this);
|
|
|
|
+ ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
|
2020-02-02 01:16:01 +01:00
|
|
|
}
|
2019-12-10 23:00:00 +01:00
|
|
|
}
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -642,11 +642,15 @@
|
|
|
|
if (this.isInvulnerable(damagesource)) {
|
|
|
|
return false;
|
2019-12-19 02:25:11 +01:00
|
|
|
} else {
|
2021-06-11 07:00:00 +02:00
|
|
|
- if (!this.level.isClientSide) {
|
2019-12-19 02:25:11 +01:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ boolean result = super.damageEntity(damagesource, f);
|
|
|
|
+
|
2021-06-11 07:00:00 +02:00
|
|
|
+ if (result && !this.level.isClientSide) {
|
|
|
|
this.beePollinateGoal.l();
|
2019-12-19 02:25:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
- return super.damageEntity(damagesource, f);
|
|
|
|
+ return result;
|
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -1216,7 +1220,7 @@
|
2020-01-21 04:33:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (flag) {
|
|
|
|
+ if (flag && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(EntityBee.this, blockposition, iblockdata.set(blockstateinteger, (Integer) iblockdata.get(blockstateinteger) + 1)).isCancelled()) { // Spigot
|
2021-06-11 07:00:00 +02:00
|
|
|
EntityBee.this.level.triggerEffect(2005, blockposition, 0);
|
|
|
|
EntityBee.this.level.setTypeUpdate(blockposition, (IBlockData) iblockdata.set(blockstateinteger, (Integer) iblockdata.get(blockstateinteger) + 1));
|
2021-07-06 16:00:00 +02:00
|
|
|
EntityBee.this.fS();
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -1289,7 +1293,7 @@
|
2019-12-10 23:00:00 +01:00
|
|
|
@Override
|
|
|
|
protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) {
|
2021-06-11 07:00:00 +02:00
|
|
|
if (entityinsentient instanceof EntityBee && this.mob.hasLineOfSight(entityliving)) {
|
2019-12-10 23:00:00 +01:00
|
|
|
- entityinsentient.setGoalTarget(entityliving);
|
|
|
|
+ entityinsentient.setGoalTarget(entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); // CraftBukkit - reason
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -1298,7 +1302,7 @@
|
|
|
|
private static class c extends PathfinderGoalNearestAttackableTarget<EntityHuman> {
|
|
|
|
|
|
|
|
c(EntityBee entitybee) {
|
|
|
|
- Objects.requireNonNull(entitybee);
|
|
|
|
+ // Objects.requireNonNull(entitybee); // CraftBukkit - decompile error
|
|
|
|
super(entitybee, EntityHuman.class, 10, true, false, entitybee::a_);
|
|
|
|
}
|
|
|
|
|