2024-04-24 01:15:00 +10:00

30 lines
1.1 KiB
Diff

--- a/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/net/minecraft/world/entity/animal/camel/Camel.java
@@ -141,7 +141,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();
@@ -451,9 +451,15 @@
}
@Override
- protected void actuallyHurt(DamageSource damagesource, float f) {
+ // CraftBukkit start - void -> boolean
+ public boolean actuallyHurt(DamageSource damagesource, float f) {
+ boolean hurt = super.actuallyHurt(damagesource, f);
+ if (!hurt) {
+ return hurt;
+ }
+ // CraftBukkit end
this.standUpInstantly();
- super.actuallyHurt(damagesource, f);
+ return hurt; // CraftBukkit
}
@Override