- Joined
- Jul 11, 2020
- Messages
- 0
- Reaction score
- 26
- Points
- 0
Könnt ihr mir helfen? ps hier meine entityplayersp class
Code:
public void func_175161_p()
{
EventPreMotionUpdate eventPre = new EventPreMotionUpdate(this.posY, this.rotationYaw, this.renderArmPitch, this.onGround);
EventManager.call(eventPre);
EventAim eventAim = new EventAim(this.rotationYaw, this.rotationPitch);
EventManager.call(eventAim);
boolean var1 = isSprinting();
if (var1 != this.field_175171_bO)
{
if (var1) {
this.sendQueue.addToSendQueue(new C0BPacketEntityAction(this, C0BPacketEntityAction.Action.START_SPRINTING));
} else {
this.sendQueue.addToSendQueue(new C0BPacketEntityAction(this, C0BPacketEntityAction.Action.STOP_SPRINTING));
}
this.field_175171_bO = var1;
}
boolean var2 = isSneaking();
if (var2 != this.field_175170_bN)
{
if (var2) {
this.sendQueue.addToSendQueue(new C0BPacketEntityAction(this, C0BPacketEntityAction.Action.START_SNEAKING));
} else {
this.sendQueue.addToSendQueue(new C0BPacketEntityAction(this, C0BPacketEntityAction.Action.STOP_SNEAKING));
}
this.field_175170_bN = var2;
}
if (func_175160_A())
{
double var3 = this.posX - this.field_175172_bI;
double var5 = getEntityBoundingBox().minY - this.field_175166_bJ;
double var7 = this.posZ - this.field_175167_bK;
double var9 = this.rotationYaw - this.field_175164_bL;
double var11 = this.rotationPitch - this.field_175165_bM;
boolean var13 = (var3 * var3 + var5 * var5 + var7 * var7 > 9.0E-4D) || (this.field_175168_bP >= 20);
boolean var14 = (var9 != 0.0D) || (var11 != 0.0D);
if (this.ridingEntity == null)
{
boolean sendlook = true;
if ((var13) && (var14)) {
this.sendQueue.addToSendQueue(new C03PacketPlayer.C06PacketPlayerPosLook(this.posX, getEntityBoundingBox().minY, this.posZ, this.rotationYaw, this.rotationPitch, this.onGround));
} else if (var13) {
this.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(this.posX, getEntityBoundingBox().minY, this.posZ, this.onGround));
} else if (var14) {
this.sendQueue.addToSendQueue(new C03PacketPlayer.C05PacketPlayerLook(this.rotationYaw, this.rotationPitch, this.onGround));
} else {
this.sendQueue.addToSendQueue(new C03PacketPlayer(this.onGround));
sendlook = false;
}
if(sendlook == false && Autist.instance.moduleManager.getModule(Aura.class).isEnabled()) {
if(TimeHelper.hasReached(85)) {
this.sendQueue.addToSendQueue(new C03PacketPlayer.C05PacketPlayerLook(this.rotationYaw, this.rotationPitch, this.onGround));
TimeHelper.reset();
}
}
}
else
{
this.sendQueue.addToSendQueue(new C03PacketPlayer.C06PacketPlayerPosLook(this.motionX, -999.0D, this.motionZ, this.rotationYaw, this.rotationPitch, this.onGround));
var13 = false;
}
this.field_175168_bP += 1;
if (var13)
{
this.field_175172_bI = this.posX;
this.field_175166_bJ = getEntityBoundingBox().minY;
this.field_175167_bK = this.posZ;
this.field_175168_bP = 0;
}
if (var14)
{
this.field_175164_bL = this.rotationYaw;
this.field_175165_bM = this.rotationPitch;
}
}
}
//rotation code