mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-10-06 03:17:27 +02:00
Fix stackoverflow error with horses/pigs, fix player movement
This commit is contained in:
parent
9af9a2fba1
commit
f9edd70041
@ -154,11 +154,8 @@ public class HorseController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void g(float f, float f1) {
|
||||
if (npc == null) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.g(f, f1);
|
||||
return;
|
||||
} else if (!npc.isFlyable()) {
|
||||
g(f, f1);
|
||||
} else {
|
||||
NMS.flyingMoveLogic(this, f, f1);
|
||||
}
|
||||
|
@ -138,10 +138,8 @@ public class PigController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void g(float f, float f1) {
|
||||
if (npc == null) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.g(f, f1);
|
||||
} else if (!npc.isFlyable()) {
|
||||
g(f, f1);
|
||||
} else {
|
||||
NMS.flyingMoveLogic(this, f, f1);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
AttributeInstance speed = this.a.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
speed.setValue(0.1D * this.e);
|
||||
float movement = (float) (this.e * speed.getValue()) * 10;
|
||||
this.a.be = movement;
|
||||
this.a.bf = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
|
Loading…
Reference in New Issue
Block a user