mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 08:32:07 -07:00
Implement Rabbit types.
This commit is contained in:
25
nms-patches/EntityRabbit.patch
Normal file
25
nms-patches/EntityRabbit.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityRabbit.java Sat Dec 6 21:44:10 2014
|
||||
+++ src/main/java/net/minecraft/server/EntityRabbit.java Sat Dec 6 21:33:23 2014
|
||||
@@ -21,6 +21,12 @@
|
||||
this.g = new ControllerJumpRabbit(this, this);
|
||||
this.moveController = new 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 PathfinderGoalRabbitPanic(this, 1.33D));
|
||||
@@ -31,8 +37,8 @@
|
||||
this.goalSelector.a(11, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F));
|
||||
this.bk = new PathfinderGoalRabbitAvoidTarget(this, new EntitySelectorRabbitWolf(this), 16.0F, 1.33D, 1.33D);
|
||||
this.goalSelector.a(4, this.bk);
|
||||
- this.b(0.0D);
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
protected float bD() {
|
||||
return this.moveController.a() && this.moveController.e() > this.locY + 0.5D ? 0.5F : this.br.b();
|
Reference in New Issue
Block a user