Paper/nms-patches/EntityRabbit.patch

26 lines
1.1 KiB
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/EntityRabbit.java
+++ b/net/minecraft/server/EntityRabbit.java
2014-12-06 22:45:51 +01:00
@@ -21,6 +21,12 @@
2015-02-26 23:41:06 +01:00
this.g = new EntityRabbit.ControllerJumpRabbit(this);
this.moveController = new EntityRabbit.ControllerMoveRabbit(this);
2014-12-06 22:45:51 +01:00
((Navigation) this.getNavigation()).a(true);
+ this.initializePathFinderGoals(); // CraftBukkit - moved code
+ this.b(0.0D);
+ }
2015-02-26 23:41:06 +01:00
+
2014-12-06 22:45:51 +01:00
+ // CraftBukkit start - code from constructor
+ public void initializePathFinderGoals(){
this.navigation.a(2.5F);
this.goalSelector.a(1, new PathfinderGoalFloat(this));
2015-02-26 23:41:06 +01:00
this.goalSelector.a(1, new EntityRabbit.PathfinderGoalRabbitPanic(this, 1.33D));
@@ -33,8 +39,8 @@
2014-12-06 22:45:51 +01:00
this.goalSelector.a(11, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F));
2015-02-26 23:41:06 +01:00
this.bm = new EntityRabbit.PathfinderGoalRabbitAvoidTarget(this, EntityWolf.class, 16.0F, 1.33D, 1.33D);
this.goalSelector.a(4, this.bm);
2014-12-06 22:45:51 +01:00
- this.b(0.0D);
}
+ // CraftBukkit end
2015-02-26 23:41:06 +01:00
protected float bE() {
return this.moveController.a() && this.moveController.e() > this.locY + 0.5D ? 0.5F : this.bt.b();