summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityRabbit.patch
blob: f794164eee8d2cc25ec4b8ddcb06f2a7786e204e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- /home/matt/mc-dev-private//net/minecraft/server/EntityRabbit.java	2015-02-26 22:40:22.671608138 +0000
+++ src/main/java/net/minecraft/server/EntityRabbit.java	2015-02-26 22:40:22.675608138 +0000
@@ -21,6 +21,12 @@
         this.g = new EntityRabbit.ControllerJumpRabbit(this);
         this.moveController = new EntityRabbit.ControllerMoveRabbit(this);
         ((Navigation) this.getNavigation()).a(true);
+        this.initializePathFinderGoals(); // CraftBukkit - moved code
+        this.b(0.0D);
+    }
+
+    // CraftBukkit start - code from constructor
+    public void initializePathFinderGoals(){
         this.navigation.a(2.5F);
         this.goalSelector.a(1, new PathfinderGoalFloat(this));
         this.goalSelector.a(1, new EntityRabbit.PathfinderGoalRabbitPanic(this, 1.33D));
@@ -33,8 +39,8 @@
         this.goalSelector.a(11, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F));
         this.bm = new EntityRabbit.PathfinderGoalRabbitAvoidTarget(this, EntityWolf.class, 16.0F, 1.33D, 1.33D);
         this.goalSelector.a(4, this.bm);
-        this.b(0.0D);
     }
+    // CraftBukkit end
 
     protected float bE() {
         return this.moveController.a() && this.moveController.e() > this.locY + 0.5D ? 0.5F : this.bt.b();