mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
SPIGOT-5968: Killer rabbits can't be set to the non-killer rabbit behavior
This commit is contained in:
parent
69fddc725b
commit
60f8a29d12
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/EntityRabbit.java
|
--- a/net/minecraft/server/EntityRabbit.java
|
||||||
+++ b/net/minecraft/server/EntityRabbit.java
|
+++ b/net/minecraft/server/EntityRabbit.java
|
||||||
@@ -17,8 +17,14 @@
|
@@ -17,11 +17,17 @@
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
this.bp = new EntityRabbit.ControllerJumpRabbit(this);
|
this.bp = new EntityRabbit.ControllerJumpRabbit(this);
|
||||||
this.moveController = new EntityRabbit.ControllerMoveRabbit(this);
|
this.moveController = new EntityRabbit.ControllerMoveRabbit(this);
|
||||||
@ -14,7 +14,11 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initPathfinder() {
|
- protected void initPathfinder() {
|
||||||
|
+ public void initPathfinder() {
|
||||||
|
this.goalSelector.a(1, new PathfinderGoalFloat(this));
|
||||||
|
this.goalSelector.a(1, new EntityRabbit.PathfinderGoalRabbitPanic(this, 2.2D));
|
||||||
|
this.goalSelector.a(2, new PathfinderGoalBreed(this, 0.8D));
|
||||||
@@ -285,7 +291,7 @@
|
@@ -285,7 +291,7 @@
|
||||||
if (i == 99) {
|
if (i == 99) {
|
||||||
this.getAttributeInstance(GenericAttributes.ARMOR).setValue(8.0D);
|
this.getAttributeInstance(GenericAttributes.ARMOR).setValue(8.0D);
|
||||||
|
@ -43,6 +43,7 @@ public class CraftRabbit extends CraftAnimals implements Rabbit {
|
|||||||
World world = ((CraftWorld) this.getWorld()).getHandle();
|
World world = ((CraftWorld) this.getWorld()).getHandle();
|
||||||
entity.goalSelector = new PathfinderGoalSelector(world.getMethodProfilerSupplier());
|
entity.goalSelector = new PathfinderGoalSelector(world.getMethodProfilerSupplier());
|
||||||
entity.targetSelector = new PathfinderGoalSelector(world.getMethodProfilerSupplier());
|
entity.targetSelector = new PathfinderGoalSelector(world.getMethodProfilerSupplier());
|
||||||
|
entity.initPathfinder();
|
||||||
entity.initializePathFinderGoals();
|
entity.initializePathFinderGoals();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user