13
0
geforkt von Mirrors/Paper

use local class for movecontrol stuff to prevent reobf mapping issue

Dieser Commit ist enthalten in:
MiniDigger | Martin 2021-06-14 01:19:51 +02:00
Ursprung 7abf7d1838
Commit 865f430ea4

Datei anzeigen

@ -14,7 +14,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60);
- this.moveControl = new FlyingMoveControl(this, 20, true);
+ // Paper start - apply gravity to bees when they get stuck in the void, fixes MC-167279
+ this.moveControl = new FlyingMoveControl(this, 20, true) {
+ class BeeFlyingMoveControl extends FlyingMoveControl {
+ public BeeFlyingMoveControl(final Mob entity, final int maxPitchChange, final boolean noGravity) {
+ super(entity, maxPitchChange, noGravity);
+ }
+
+ @Override
+ public void tick() {
+ if (this.mob.getY() <= 0) {
@ -22,7 +26,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ super.tick();
+ }
+ };
+ }
+ this.moveControl = new BeeFlyingMoveControl(this, 20, true);
+ // Paper end
this.lookControl = new Bee.BeeLookControl(this);
this.setPathfindingMalus(BlockPathTypes.DANGER_FIRE, -1.0F);