0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2025-04-21 15:19:04 +00:00
Files

41 lines
1.5 KiB
Diff
Raw Permalink Normal View History

2024-03-03 11:30:57 +11:00
--- a/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/net/minecraft/world/entity/animal/camel/Camel.java
2025-03-26 03:05:00 +11:00
@@ -55,6 +55,10 @@
import net.minecraft.world.phys.Vec2F;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityDamageEvent;
+// CraftBukkit end
+
2024-10-23 02:15:00 +11:00
public class Camel extends EntityHorseAbstract {
public static final float BABY_SCALE = 0.45F;
2025-03-26 03:05:00 +11:00
@@ -153,7 +157,7 @@
2024-10-23 02:15:00 +11:00
GameProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("camelBrain");
2024-03-03 11:30:57 +11:00
- BehaviorController<?> behaviorcontroller = this.getBrain();
+ BehaviorController<Camel> behaviorcontroller = (BehaviorController<Camel>) this.getBrain(); // CraftBukkit - decompile error
2024-10-23 02:15:00 +11:00
behaviorcontroller.tick(worldserver, this);
gameprofilerfiller.pop();
2025-03-26 03:05:00 +11:00
@@ -464,9 +468,15 @@
2024-03-03 11:30:57 +11:00
}
@Override
2024-10-23 02:15:00 +11:00
- protected void actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f) {
+ // CraftBukkit start - void -> boolean
2024-10-23 02:15:00 +11:00
+ public boolean actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f, EntityDamageEvent event) {
+ boolean damageResult = super.actuallyHurt(worldserver, damagesource, f, event);
+ if (!damageResult) {
+ return false;
2024-03-03 11:30:57 +11:00
+ }
+ // CraftBukkit end
this.standUpInstantly();
2024-10-23 02:15:00 +11:00
- super.actuallyHurt(worldserver, damagesource, f);
+ return true; // CraftBukkit
2024-03-03 11:30:57 +11:00
}
@Override