41 lines
1.4 KiB
Diff

--- a/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/net/minecraft/world/entity/animal/camel/Camel.java
@@ -50,6 +50,10 @@
import net.minecraft.world.phys.Vec2F;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityDamageEvent;
+// CraftBukkit end
+
public class Camel extends EntityHorseAbstract implements IJumpable, ISaddleable {
public static final float BABY_SCALE = 0.45F;
@@ -141,7 +145,7 @@
@Override
protected void customServerAiStep() {
this.level().getProfiler().push("camelBrain");
- BehaviorController<?> behaviorcontroller = this.getBrain();
+ BehaviorController<Camel> behaviorcontroller = (BehaviorController<Camel>) this.getBrain(); // CraftBukkit - decompile error
behaviorcontroller.tick((WorldServer) this.level(), this);
this.level().getProfiler().pop();
@@ -452,9 +456,15 @@
}
@Override
- protected void actuallyHurt(DamageSource damagesource, float f) {
+ // CraftBukkit start - void -> boolean
+ public boolean actuallyHurt(DamageSource damagesource, float f, EntityDamageEvent event) {
+ boolean damageResult = super.actuallyHurt(damagesource, f, event);
+ if (!damageResult) {
+ return false;
+ }
+ // CraftBukkit end
this.standUpInstantly();
- super.actuallyHurt(damagesource, f);
+ return true; // CraftBukkit
}
@Override