Пример #1
0
 public void handleEntity(Packet30Entity var1) {
   Entity var2 = this.getEntityByID(var1.entityId);
   if (var2 != null) {
     var2.serverPosX += var1.xPosition;
     var2.serverPosY += var1.yPosition;
     var2.serverPosZ += var1.zPosition;
     double var3 = (double) var2.serverPosX / 32.0D;
     double var5 = (double) var2.serverPosY / 32.0D;
     double var7 = (double) var2.serverPosZ / 32.0D;
     float var9 = var1.rotating ? (float) (var1.yaw * 360) / 256.0F : var2.rotationYaw;
     float var10 = var1.rotating ? (float) (var1.pitch * 360) / 256.0F : var2.rotationPitch;
     var2.setPositionAndRotation2(var3, var5, var7, var9, var10, 3);
   }
 }
Пример #2
0
 public void handleEntityTeleport(Packet34EntityTeleport var1) {
   Entity var2 = this.getEntityByID(var1.entityId);
   if (var2 != null) {
     var2.serverPosX = var1.xPosition;
     var2.serverPosY = var1.yPosition;
     var2.serverPosZ = var1.zPosition;
     double var3 = (double) var2.serverPosX / 32.0D;
     double var5 = (double) var2.serverPosY / 32.0D + 0.015625D;
     double var7 = (double) var2.serverPosZ / 32.0D;
     float var9 = (float) (var1.yaw * 360) / 256.0F;
     float var10 = (float) (var1.pitch * 360) / 256.0F;
     var2.setPositionAndRotation2(var3, var5, var7, var9, var10, 3);
   }
 }