mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 08:00:02 +03:00
80 lines
2.9 KiB
Diff
80 lines
2.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/ai/EntityMoveHelper.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityMoveHelper.java
|
|
@@ -16,7 +16,7 @@
|
|
protected double speed;
|
|
protected float moveForward;
|
|
protected float moveStrafe;
|
|
- public EntityMoveHelper.Action action = EntityMoveHelper.Action.WAIT;
|
|
+ public Action action = Action.WAIT;
|
|
|
|
public EntityMoveHelper(EntityLiving entitylivingIn)
|
|
{
|
|
@@ -25,7 +25,7 @@
|
|
|
|
public boolean isUpdating()
|
|
{
|
|
- return this.action == EntityMoveHelper.Action.MOVE_TO;
|
|
+ return this.action == Action.MOVE_TO;
|
|
}
|
|
|
|
public double getSpeed()
|
|
@@ -39,12 +39,12 @@
|
|
this.posY = y;
|
|
this.posZ = z;
|
|
this.speed = speedIn;
|
|
- this.action = EntityMoveHelper.Action.MOVE_TO;
|
|
+ this.action = Action.MOVE_TO;
|
|
}
|
|
|
|
public void strafe(float forward, float strafe)
|
|
{
|
|
- this.action = EntityMoveHelper.Action.STRAFE;
|
|
+ this.action = Action.STRAFE;
|
|
this.moveForward = forward;
|
|
this.moveStrafe = strafe;
|
|
this.speed = 0.25D;
|
|
@@ -63,7 +63,7 @@
|
|
|
|
public void onUpdateMoveHelper()
|
|
{
|
|
- if (this.action == EntityMoveHelper.Action.STRAFE)
|
|
+ if (this.action == Action.STRAFE)
|
|
{
|
|
float f = (float)this.entity.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue();
|
|
float f1 = (float)this.speed * f;
|
|
@@ -100,11 +100,11 @@
|
|
this.entity.setAIMoveSpeed(f1);
|
|
this.entity.setMoveForward(this.moveForward);
|
|
this.entity.setMoveStrafing(this.moveStrafe);
|
|
- this.action = EntityMoveHelper.Action.WAIT;
|
|
+ this.action = Action.WAIT;
|
|
}
|
|
- else if (this.action == EntityMoveHelper.Action.MOVE_TO)
|
|
+ else if (this.action == Action.MOVE_TO)
|
|
{
|
|
- this.action = EntityMoveHelper.Action.WAIT;
|
|
+ this.action = Action.WAIT;
|
|
double d0 = this.posX - this.entity.posX;
|
|
double d1 = this.posZ - this.entity.posZ;
|
|
double d2 = this.posY - this.entity.posY;
|
|
@@ -123,16 +123,16 @@
|
|
if (d2 > (double)this.entity.stepHeight && d0 * d0 + d1 * d1 < (double)Math.max(1.0F, this.entity.width))
|
|
{
|
|
this.entity.getJumpHelper().setJumping();
|
|
- this.action = EntityMoveHelper.Action.JUMPING;
|
|
+ this.action = Action.JUMPING;
|
|
}
|
|
}
|
|
- else if (this.action == EntityMoveHelper.Action.JUMPING)
|
|
+ else if (this.action == Action.JUMPING)
|
|
{
|
|
this.entity.setAIMoveSpeed((float)(this.speed * this.entity.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue()));
|
|
|
|
if (this.entity.onGround)
|
|
{
|
|
- this.action = EntityMoveHelper.Action.WAIT;
|
|
+ this.action = Action.WAIT;
|
|
}
|
|
}
|
|
else
|