Fix stackoverflow error with horses/pigs, fix player movement

This commit is contained in:
fullwall 2016-05-11 21:53:12 +08:00
parent 9af9a2fba1
commit f9edd70041
3 changed files with 3 additions and 8 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;