mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
use local class for movecontrol stuff to prevent reobf mapping issue
This commit is contained in:
parent
7abf7d1838
commit
865f430ea4
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue