|
|
@ -280,23 +280,23 @@ public abstract class Entity
|
|
|
|
this.height = par2;
|
|
|
|
this.height = par2;
|
|
|
|
float var3 = par1 % 2.0F;
|
|
|
|
float var3 = par1 % 2.0F;
|
|
|
|
|
|
|
|
|
|
|
|
if ((double)var3 < 0.375D)
|
|
|
|
if ((float)var3 < 0.375D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_1;
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((double)var3 < 0.75D)
|
|
|
|
else if ((float)var3 < 0.75D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_2;
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((double)var3 < 1.0D)
|
|
|
|
else if ((float)var3 < 1.0D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_3;
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((double)var3 < 1.375D)
|
|
|
|
else if ((float)var3 < 1.375D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_4;
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((double)var3 < 1.75D)
|
|
|
|
else if ((float)var3 < 1.75D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_5;
|
|
|
|
this.myEntitySize = EnumEntitySize.SIZE_5;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -325,7 +325,7 @@ public abstract class Entity
|
|
|
|
this.posZ = par5;
|
|
|
|
this.posZ = par5;
|
|
|
|
float var7 = this.width / 2.0F;
|
|
|
|
float var7 = this.width / 2.0F;
|
|
|
|
float var8 = this.height;
|
|
|
|
float var8 = this.height;
|
|
|
|
this.boundingBox.setBounds(par1 - (double)var7, par3 - (double)this.yOffset + (double)this.ySize, par5 - (double)var7, par1 + (double)var7, par3 - (double)this.yOffset + (double)this.ySize + (double)var8, par5 + (double)var7);
|
|
|
|
this.boundingBox.setBounds(par1 - (float)var7, par3 - (float)this.yOffset + (float)this.ySize, par5 - (float)var7, par1 + (float)var7, par3 - (float)this.yOffset + (float)this.ySize + (float)var8, par5 + (float)var7);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -336,8 +336,8 @@ public abstract class Entity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
float var3 = this.rotationPitch;
|
|
|
|
float var3 = this.rotationPitch;
|
|
|
|
float var4 = this.rotationYaw;
|
|
|
|
float var4 = this.rotationYaw;
|
|
|
|
this.rotationYaw = (float)((double)this.rotationYaw + (double)par1 * 0.15D);
|
|
|
|
this.rotationYaw = (float)((float)this.rotationYaw + (float)par1 * 0.15D);
|
|
|
|
this.rotationPitch = (float)((double)this.rotationPitch - (double)par2 * 0.15D);
|
|
|
|
this.rotationPitch = (float)((float)this.rotationPitch - (float)par2 * 0.15D);
|
|
|
|
|
|
|
|
|
|
|
|
if (this.rotationPitch < -90.0F)
|
|
|
|
if (this.rotationPitch < -90.0F)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -385,13 +385,13 @@ public abstract class Entity
|
|
|
|
if (this.isSprinting() && !this.isInWater())
|
|
|
|
if (this.isSprinting() && !this.isInWater())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BigInteger x = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
BigInteger x = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
int y = MathHelper.floor_double(this.posY - 0.20000000298023224D - (double)this.yOffset);
|
|
|
|
int y = MathHelper.floor_double(this.posY - 0.20000000298023224D - (float)this.yOffset);
|
|
|
|
BigInteger z = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
|
BigInteger z = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
|
int var4 = this.worldObj.getBlockId(x, y, z);
|
|
|
|
int var4 = this.worldObj.getBlockId(x, y, z);
|
|
|
|
|
|
|
|
|
|
|
|
if (var4 > 0)
|
|
|
|
if (var4 > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.worldObj.spawnParticle("tilecrack_" + var4, this.posX + ((double)this.rand.nextFloat() - 0.5D) * (double)this.width, this.boundingBox.minY + 0.1D, this.posZ + ((double)this.rand.nextFloat() - 0.5D) * (double)this.width, -this.motionX * 4.0D, 1.5D, -this.motionZ * 4.0D);
|
|
|
|
this.worldObj.spawnParticle("tilecrack_" + var4, this.posX + ((float)this.rand.nextFloat() - 0.5D) * (float)this.width, this.boundingBox.minY + 0.1D, this.posZ + ((float)this.rand.nextFloat() - 0.5D) * (float)this.width, -this.motionX * 4.0D, 1.5D, -this.motionZ * 4.0D);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -415,14 +415,14 @@ public abstract class Entity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var8 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
var8 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
var5 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
var5 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
this.worldObj.spawnParticle("bubble", this.posX + (double)var8, (double)(var7 + 1.0F), this.posZ + (double)var5, this.motionX, this.motionY - (double)(this.rand.nextFloat() * 0.2F), this.motionZ);
|
|
|
|
this.worldObj.spawnParticle("bubble", this.posX + (float)var8, (float)(var7 + 1.0F), this.posZ + (float)var5, this.motionX, this.motionY - (float)(this.rand.nextFloat() * 0.2F), this.motionZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (var3 = 0; (float)var3 < 1.0F + this.width * 20.0F; ++var3)
|
|
|
|
for (var3 = 0; (float)var3 < 1.0F + this.width * 20.0F; ++var3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var8 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
var8 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
var5 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
var5 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
|
|
|
|
this.worldObj.spawnParticle("splash", this.posX + (double)var8, (double)(var7 + 1.0F), this.posZ + (double)var5, this.motionX, this.motionY, this.motionZ);
|
|
|
|
this.worldObj.spawnParticle("splash", this.posX + (float)var8, (float)(var7 + 1.0F), this.posZ + (float)var5, this.motionX, this.motionY, this.motionZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -467,10 +467,10 @@ public abstract class Entity
|
|
|
|
this.fallDistance *= 0.5F;
|
|
|
|
this.fallDistance *= 0.5F;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.posY < -64.0D)
|
|
|
|
// if (this.posY < -64.0D)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
this.kill();
|
|
|
|
// this.kill();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.worldObj.isRemote)
|
|
|
|
if (!this.worldObj.isRemote)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -542,7 +542,7 @@ public abstract class Entity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.boundingBox.offset(par1, par3, par5);
|
|
|
|
this.boundingBox.offset(par1, par3, par5);
|
|
|
|
this.posX = (this.boundingBox.minX + this.boundingBox.maxX) / 2.0D;
|
|
|
|
this.posX = (this.boundingBox.minX + this.boundingBox.maxX) / 2.0D;
|
|
|
|
this.posY = this.boundingBox.minY + (double)this.yOffset - (double)this.ySize;
|
|
|
|
this.posY = this.boundingBox.minY + (float)this.yOffset - (float)this.ySize;
|
|
|
|
this.posZ = (this.boundingBox.minZ + this.boundingBox.maxZ) / 2.0D;
|
|
|
|
this.posZ = (this.boundingBox.minZ + this.boundingBox.maxZ) / 2.0D;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -696,7 +696,7 @@ public abstract class Entity
|
|
|
|
var23 = par3;
|
|
|
|
var23 = par3;
|
|
|
|
double var25 = par5;
|
|
|
|
double var25 = par5;
|
|
|
|
par1 = var11;
|
|
|
|
par1 = var11;
|
|
|
|
par3 = (double)this.stepHeight;
|
|
|
|
par3 = (float)this.stepHeight;
|
|
|
|
par5 = var15;
|
|
|
|
par5 = var15;
|
|
|
|
AxisAlignedBB var27 = this.boundingBox.copy();
|
|
|
|
AxisAlignedBB var27 = this.boundingBox.copy();
|
|
|
|
this.boundingBox.setBB(var17);
|
|
|
|
this.boundingBox.setBB(var17);
|
|
|
@ -754,7 +754,7 @@ public abstract class Entity
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
par3 = (double)(-this.stepHeight);
|
|
|
|
par3 = (float)(-this.stepHeight);
|
|
|
|
|
|
|
|
|
|
|
|
for (var28 = var30.iterator(); var28.hasNext(); par3 = var29.calculateYOffset(this.boundingBox, par3))
|
|
|
|
for (var28 = var30.iterator(); var28.hasNext(); par3 = var29.calculateYOffset(this.boundingBox, par3))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -773,11 +773,11 @@ public abstract class Entity
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
double var37 = this.boundingBox.minY - (double)((int)this.boundingBox.minY);
|
|
|
|
double var37 = this.boundingBox.minY - (float)((int)this.boundingBox.minY);
|
|
|
|
|
|
|
|
|
|
|
|
if (var37 > 0.0D)
|
|
|
|
if (var37 > 0.0D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.ySize = (float)((double)this.ySize + var37 + 0.01D);
|
|
|
|
this.ySize = (float)((float)this.ySize + var37 + 0.01D);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -785,7 +785,7 @@ public abstract class Entity
|
|
|
|
this.worldObj.theProfiler.endSection();
|
|
|
|
this.worldObj.theProfiler.endSection();
|
|
|
|
this.worldObj.theProfiler.startSection("rest");
|
|
|
|
this.worldObj.theProfiler.startSection("rest");
|
|
|
|
this.posX = (this.boundingBox.minX + this.boundingBox.maxX) / 2.0D;
|
|
|
|
this.posX = (this.boundingBox.minX + this.boundingBox.maxX) / 2.0D;
|
|
|
|
this.posY = this.boundingBox.minY + (double)this.yOffset - (double)this.ySize;
|
|
|
|
this.posY = this.boundingBox.minY + (float)this.yOffset - (float)this.ySize;
|
|
|
|
this.posZ = (this.boundingBox.minZ + this.boundingBox.maxZ) / 2.0D;
|
|
|
|
this.posZ = (this.boundingBox.minZ + this.boundingBox.maxZ) / 2.0D;
|
|
|
|
this.isCollidedHorizontally = var11 != par1 || var15 != par5;
|
|
|
|
this.isCollidedHorizontally = var11 != par1 || var15 != par5;
|
|
|
|
this.isCollidedVertically = var13 != par3;
|
|
|
|
this.isCollidedVertically = var13 != par3;
|
|
|
@ -813,9 +813,9 @@ public abstract class Entity
|
|
|
|
|
|
|
|
|
|
|
|
if (this.canTriggerWalking() && !var18 && this.ridingEntity == null)
|
|
|
|
if (this.canTriggerWalking() && !var18 && this.ridingEntity == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.distanceWalkedModified = (float)((double)this.distanceWalkedModified + (double)MathHelper.sqrt_double(var33 * var33 + var23 * var23) * 0.6D);
|
|
|
|
this.distanceWalkedModified = (float)((float)this.distanceWalkedModified + (float)MathHelper.sqrt_double(var33 * var33 + var23 * var23) * 0.6D);
|
|
|
|
BigInteger var34 = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
BigInteger var34 = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
int var26 = MathHelper.floor_double(this.posY - 0.20000000298023224D - (double)this.yOffset);
|
|
|
|
int var26 = MathHelper.floor_double(this.posY - 0.20000000298023224D - (float)this.yOffset);
|
|
|
|
BigInteger var36 = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
|
BigInteger var36 = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
|
int var38 = this.worldObj.getBlockId(var34, var26, var36);
|
|
|
|
int var38 = this.worldObj.getBlockId(var34, var26, var36);
|
|
|
|
|
|
|
|
|
|
|
@ -940,7 +940,7 @@ public abstract class Entity
|
|
|
|
if (this instanceof EntityLiving)
|
|
|
|
if (this instanceof EntityLiving)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BigInteger var4 = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
BigInteger var4 = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
int var5 = MathHelper.floor_double(this.posY - 0.20000000298023224D - (double)this.yOffset);
|
|
|
|
int var5 = MathHelper.floor_double(this.posY - 0.20000000298023224D - (float)this.yOffset);
|
|
|
|
BigInteger var6 = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
|
BigInteger var6 = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
|
int var7 = this.worldObj.getBlockId(var4, var5, var6);
|
|
|
|
int var7 = this.worldObj.getBlockId(var4, var5, var6);
|
|
|
|
|
|
|
|
|
|
|
@ -961,7 +961,7 @@ public abstract class Entity
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (par1 < 0.0D)
|
|
|
|
else if (par1 < 0.0D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.fallDistance = (float)((double)this.fallDistance - par1);
|
|
|
|
this.fallDistance = (float)((float)this.fallDistance - par1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1031,7 +1031,7 @@ public abstract class Entity
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public boolean isInsideOfMaterial(Material par1Material)
|
|
|
|
public boolean isInsideOfMaterial(Material par1Material)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
double var2 = this.posY + (double)this.getEyeHeight();
|
|
|
|
double var2 = this.posY + (float)this.getEyeHeight();
|
|
|
|
BigInteger var4 = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
BigInteger var4 = MathHelper.floor_double_BigInteger(this.posX);
|
|
|
|
int var5 = MathHelper.floor_float((float)MathHelper.floor_double(var2));
|
|
|
|
int var5 = MathHelper.floor_float((float)MathHelper.floor_double(var2));
|
|
|
|
BigInteger var6 = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
|
BigInteger var6 = MathHelper.floor_double_BigInteger(this.posZ);
|
|
|
@ -1041,7 +1041,7 @@ public abstract class Entity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
float var8 = BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(var4, var5, var6)) - 0.11111111F;
|
|
|
|
float var8 = BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(var4, var5, var6)) - 0.11111111F;
|
|
|
|
float var9 = (float)(var5 + 1) - var8;
|
|
|
|
float var9 = (float)(var5 + 1) - var8;
|
|
|
|
return var2 < (double)var9;
|
|
|
|
return var2 < (float)var9;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1081,10 +1081,10 @@ public abstract class Entity
|
|
|
|
var4 = par3 / var4;
|
|
|
|
var4 = par3 / var4;
|
|
|
|
par1 *= var4;
|
|
|
|
par1 *= var4;
|
|
|
|
par2 *= var4;
|
|
|
|
par2 *= var4;
|
|
|
|
float var5 = MathHelper.sin(this.rotationYaw * (float)Math.PI / 180.0F);
|
|
|
|
float var5 = MathHelper.sin(this.rotationYaw * (float)(float)Math.PI / 180.0F);
|
|
|
|
float var6 = MathHelper.cos(this.rotationYaw * (float)Math.PI / 180.0F);
|
|
|
|
float var6 = MathHelper.cos(this.rotationYaw * (float)(float)Math.PI / 180.0F);
|
|
|
|
this.motionX += (double)(par1 * var6 - par2 * var5);
|
|
|
|
this.motionX += (float)(par1 * var6 - par2 * var5);
|
|
|
|
this.motionZ += (double)(par2 * var6 + par1 * var5);
|
|
|
|
this.motionZ += (float)(par2 * var6 + par1 * var5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1096,7 +1096,7 @@ public abstract class Entity
|
|
|
|
if (this.worldObj.blockExists(var2, 0, var3))
|
|
|
|
if (this.worldObj.blockExists(var2, 0, var3))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
double var4 = (this.boundingBox.maxY - this.boundingBox.minY) * 0.66D;
|
|
|
|
double var4 = (this.boundingBox.maxY - this.boundingBox.minY) * 0.66D;
|
|
|
|
int var6 = MathHelper.floor_double(this.posY - (double)this.yOffset + var4);
|
|
|
|
int var6 = MathHelper.floor_double(this.posY - (float)this.yOffset + var4);
|
|
|
|
return this.worldObj.getLightBrightnessForSkyBlocks(var2, var6, var3, 0);
|
|
|
|
return this.worldObj.getLightBrightnessForSkyBlocks(var2, var6, var3, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1116,7 +1116,7 @@ public abstract class Entity
|
|
|
|
if (this.worldObj.blockExists(var2, 0, var3))
|
|
|
|
if (this.worldObj.blockExists(var2, 0, var3))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
double var4 = (this.boundingBox.maxY - this.boundingBox.minY) * 0.66D;
|
|
|
|
double var4 = (this.boundingBox.maxY - this.boundingBox.minY) * 0.66D;
|
|
|
|
int var6 = MathHelper.floor_double(this.posY - (double)this.yOffset + var4);
|
|
|
|
int var6 = MathHelper.floor_double(this.posY - (float)this.yOffset + var4);
|
|
|
|
return this.worldObj.getLightBrightness(var2, var6, var3);
|
|
|
|
return this.worldObj.getLightBrightness(var2, var6, var3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1144,7 +1144,7 @@ public abstract class Entity
|
|
|
|
this.prevRotationYaw = this.rotationYaw = par7;
|
|
|
|
this.prevRotationYaw = this.rotationYaw = par7;
|
|
|
|
this.prevRotationPitch = this.rotationPitch = par8;
|
|
|
|
this.prevRotationPitch = this.rotationPitch = par8;
|
|
|
|
this.ySize = 0.0F;
|
|
|
|
this.ySize = 0.0F;
|
|
|
|
double var9 = (double)(this.prevRotationYaw - par7);
|
|
|
|
double var9 = (float)(this.prevRotationYaw - par7);
|
|
|
|
|
|
|
|
|
|
|
|
if (var9 < -180.0D)
|
|
|
|
if (var9 < -180.0D)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1166,7 +1166,7 @@ public abstract class Entity
|
|
|
|
public void setLocationAndAngles(double par1, double par3, double par5, float par7, float par8)
|
|
|
|
public void setLocationAndAngles(double par1, double par3, double par5, float par7, float par8)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.lastTickPosX = this.prevPosX = this.posX = par1;
|
|
|
|
this.lastTickPosX = this.prevPosX = this.posX = par1;
|
|
|
|
this.lastTickPosY = this.prevPosY = this.posY = par3 + (double)this.yOffset;
|
|
|
|
this.lastTickPosY = this.prevPosY = this.posY = par3 + (float)this.yOffset;
|
|
|
|
this.lastTickPosZ = this.prevPosZ = this.posZ = par5;
|
|
|
|
this.lastTickPosZ = this.prevPosZ = this.posZ = par5;
|
|
|
|
this.rotationYaw = par7;
|
|
|
|
this.rotationYaw = par7;
|
|
|
|
this.rotationPitch = par8;
|
|
|
|
this.rotationPitch = par8;
|
|
|
@ -1203,7 +1203,7 @@ public abstract class Entity
|
|
|
|
double var7 = this.posX - par1;
|
|
|
|
double var7 = this.posX - par1;
|
|
|
|
double var9 = this.posY - par3;
|
|
|
|
double var9 = this.posY - par3;
|
|
|
|
double var11 = this.posZ - par5;
|
|
|
|
double var11 = this.posZ - par5;
|
|
|
|
return (double)MathHelper.sqrt_double(var7 * var7 + var9 * var9 + var11 * var11);
|
|
|
|
return (float)MathHelper.sqrt_double(var7 * var7 + var9 * var9 + var11 * var11);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -1235,7 +1235,7 @@ public abstract class Entity
|
|
|
|
|
|
|
|
|
|
|
|
if (var6 >= 0.009999999776482582D)
|
|
|
|
if (var6 >= 0.009999999776482582D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var6 = (double)MathHelper.sqrt_double(var6);
|
|
|
|
var6 = (float)MathHelper.sqrt_double(var6);
|
|
|
|
var2 /= var6;
|
|
|
|
var2 /= var6;
|
|
|
|
var4 /= var6;
|
|
|
|
var4 /= var6;
|
|
|
|
double var8 = 1.0D / var6;
|
|
|
|
double var8 = 1.0D / var6;
|
|
|
@ -1249,8 +1249,8 @@ public abstract class Entity
|
|
|
|
var4 *= var8;
|
|
|
|
var4 *= var8;
|
|
|
|
var2 *= 0.05000000074505806D;
|
|
|
|
var2 *= 0.05000000074505806D;
|
|
|
|
var4 *= 0.05000000074505806D;
|
|
|
|
var4 *= 0.05000000074505806D;
|
|
|
|
var2 *= (double)(1.0F - this.entityCollisionReduction);
|
|
|
|
var2 *= (float)(1.0F - this.entityCollisionReduction);
|
|
|
|
var4 *= (double)(1.0F - this.entityCollisionReduction);
|
|
|
|
var4 *= (float)(1.0F - this.entityCollisionReduction);
|
|
|
|
this.addVelocity(-var2, 0.0D, -var4);
|
|
|
|
this.addVelocity(-var2, 0.0D, -var4);
|
|
|
|
par1Entity.addVelocity(var2, 0.0D, var4);
|
|
|
|
par1Entity.addVelocity(var2, 0.0D, var4);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1362,7 +1362,7 @@ public abstract class Entity
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
|
|
|
|
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
par1NBTTagCompound.setTag("Pos", this.newDoubleNBTList(new double[] {this.posX, this.posY + (double)this.ySize, this.posZ}));
|
|
|
|
par1NBTTagCompound.setTag("Pos", this.newDoubleNBTList(new double[] {this.posX, this.posY + (float)this.ySize, this.posZ}));
|
|
|
|
par1NBTTagCompound.setTag("Motion", this.newDoubleNBTList(new double[] {this.motionX, this.motionY, this.motionZ}));
|
|
|
|
par1NBTTagCompound.setTag("Motion", this.newDoubleNBTList(new double[] {this.motionX, this.motionY, this.motionZ}));
|
|
|
|
par1NBTTagCompound.setTag("Rotation", this.newFloatNBTList(new float[] {this.rotationYaw, this.rotationPitch}));
|
|
|
|
par1NBTTagCompound.setTag("Rotation", this.newFloatNBTList(new float[] {this.rotationYaw, this.rotationPitch}));
|
|
|
|
par1NBTTagCompound.setFloat("FallDistance", this.fallDistance);
|
|
|
|
par1NBTTagCompound.setFloat("FallDistance", this.fallDistance);
|
|
|
@ -1493,7 +1493,7 @@ public abstract class Entity
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public EntityItem entityDropItem(ItemStack par1ItemStack, float par2)
|
|
|
|
public EntityItem entityDropItem(ItemStack par1ItemStack, float par2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
EntityItem var3 = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack);
|
|
|
|
EntityItem var3 = new EntityItem(this.worldObj, this.posX, this.posY + (float)par2, this.posZ, par1ItemStack);
|
|
|
|
var3.delayBeforeCanPickup = 10;
|
|
|
|
var3.delayBeforeCanPickup = 10;
|
|
|
|
this.worldObj.spawnEntityInWorld(var3);
|
|
|
|
this.worldObj.spawnEntityInWorld(var3);
|
|
|
|
return var3;
|
|
|
|
return var3;
|
|
|
@ -1517,9 +1517,9 @@ public abstract class Entity
|
|
|
|
float var2 = ((float)((var1 >> 0) % 2) - 0.5F) * this.width * 0.8F;
|
|
|
|
float var2 = ((float)((var1 >> 0) % 2) - 0.5F) * this.width * 0.8F;
|
|
|
|
float var3 = ((float)((var1 >> 1) % 2) - 0.5F) * 0.1F;
|
|
|
|
float var3 = ((float)((var1 >> 1) % 2) - 0.5F) * 0.1F;
|
|
|
|
float var4 = ((float)((var1 >> 2) % 2) - 0.5F) * this.width * 0.8F;
|
|
|
|
float var4 = ((float)((var1 >> 2) % 2) - 0.5F) * this.width * 0.8F;
|
|
|
|
BigInteger var5 = MathHelper.floor_double_BigInteger(this.posX + (double)var2);
|
|
|
|
BigInteger var5 = MathHelper.floor_double_BigInteger(this.posX + (float)var2);
|
|
|
|
int var6 = MathHelper.floor_double(this.posY + (double)this.getEyeHeight() + (double)var3);
|
|
|
|
int var6 = MathHelper.floor_double(this.posY + (float)this.getEyeHeight() + (float)var3);
|
|
|
|
BigInteger var7 = MathHelper.floor_double_BigInteger(this.posZ + (double)var4);
|
|
|
|
BigInteger var7 = MathHelper.floor_double_BigInteger(this.posZ + (float)var4);
|
|
|
|
|
|
|
|
|
|
|
|
if (this.worldObj.isBlockNormalCube(var5, var6, var7))
|
|
|
|
if (this.worldObj.isBlockNormalCube(var5, var6, var7))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1566,9 +1566,9 @@ public abstract class Entity
|
|
|
|
if (this.ridingEntity != null)
|
|
|
|
if (this.ridingEntity != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.ridingEntity.updateRiderPosition();
|
|
|
|
this.ridingEntity.updateRiderPosition();
|
|
|
|
this.entityRiderYawDelta += (double)(this.ridingEntity.rotationYaw - this.ridingEntity.prevRotationYaw);
|
|
|
|
this.entityRiderYawDelta += (float)(this.ridingEntity.rotationYaw - this.ridingEntity.prevRotationYaw);
|
|
|
|
|
|
|
|
|
|
|
|
for (this.entityRiderPitchDelta += (double)(this.ridingEntity.rotationPitch - this.ridingEntity.prevRotationPitch); this.entityRiderYawDelta >= 180.0D; this.entityRiderYawDelta -= 360.0D)
|
|
|
|
for (this.entityRiderPitchDelta += (float)(this.ridingEntity.rotationPitch - this.ridingEntity.prevRotationPitch); this.entityRiderYawDelta >= 180.0D; this.entityRiderYawDelta -= 360.0D)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
;
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1592,30 +1592,30 @@ public abstract class Entity
|
|
|
|
double var3 = this.entityRiderPitchDelta * 0.5D;
|
|
|
|
double var3 = this.entityRiderPitchDelta * 0.5D;
|
|
|
|
float var5 = 10.0F;
|
|
|
|
float var5 = 10.0F;
|
|
|
|
|
|
|
|
|
|
|
|
if (var1 > (double)var5)
|
|
|
|
if (var1 > (float)var5)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var1 = (double)var5;
|
|
|
|
var1 = (float)var5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var1 < (double)(-var5))
|
|
|
|
if (var1 < (float)(-var5))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var1 = (double)(-var5);
|
|
|
|
var1 = (float)(-var5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var3 > (double)var5)
|
|
|
|
if (var3 > (float)var5)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var3 = (double)var5;
|
|
|
|
var3 = (float)var5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var3 < (double)(-var5))
|
|
|
|
if (var3 < (float)(-var5))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var3 = (double)(-var5);
|
|
|
|
var3 = (float)(-var5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.entityRiderYawDelta -= var1;
|
|
|
|
this.entityRiderYawDelta -= var1;
|
|
|
|
this.entityRiderPitchDelta -= var3;
|
|
|
|
this.entityRiderPitchDelta -= var3;
|
|
|
|
this.rotationYaw = (float)((double)this.rotationYaw + var1);
|
|
|
|
this.rotationYaw = (float)((float)this.rotationYaw + var1);
|
|
|
|
this.rotationPitch = (float)((double)this.rotationPitch + var3);
|
|
|
|
this.rotationPitch = (float)((float)this.rotationPitch + var3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1637,7 +1637,7 @@ public abstract class Entity
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public double getYOffset()
|
|
|
|
public double getYOffset()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return (double)this.yOffset;
|
|
|
|
return (float)this.yOffset;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -1645,7 +1645,7 @@ public abstract class Entity
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public double getMountedYOffset()
|
|
|
|
public double getMountedYOffset()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return (double)this.height * 0.75D;
|
|
|
|
return (float)this.height * 0.75D;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -1660,7 +1660,7 @@ public abstract class Entity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (this.ridingEntity != null)
|
|
|
|
if (this.ridingEntity != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.setLocationAndAngles(this.ridingEntity.posX, this.ridingEntity.boundingBox.minY + (double)this.ridingEntity.height, this.ridingEntity.posZ, this.rotationYaw, this.rotationPitch);
|
|
|
|
this.setLocationAndAngles(this.ridingEntity.posX, this.ridingEntity.boundingBox.minY + (float)this.ridingEntity.height, this.ridingEntity.posZ, this.rotationYaw, this.rotationPitch);
|
|
|
|
this.ridingEntity.riddenByEntity = null;
|
|
|
|
this.ridingEntity.riddenByEntity = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1695,7 +1695,7 @@ public abstract class Entity
|
|
|
|
public void unmountEntity(Entity par1Entity)
|
|
|
|
public void unmountEntity(Entity par1Entity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
double var3 = par1Entity.posX;
|
|
|
|
double var3 = par1Entity.posX;
|
|
|
|
double var5 = par1Entity.boundingBox.minY + (double)par1Entity.height;
|
|
|
|
double var5 = par1Entity.boundingBox.minY + (float)par1Entity.height;
|
|
|
|
double var7 = par1Entity.posZ;
|
|
|
|
double var7 = par1Entity.posZ;
|
|
|
|
|
|
|
|
|
|
|
|
for (double var9 = -1.5D; var9 < 2.0D; ++var9)
|
|
|
|
for (double var9 = -1.5D; var9 < 2.0D; ++var9)
|
|
|
@ -1926,9 +1926,9 @@ public abstract class Entity
|
|
|
|
BigInteger var7 = MathHelper.floor_double_BigInteger(par1);
|
|
|
|
BigInteger var7 = MathHelper.floor_double_BigInteger(par1);
|
|
|
|
int var8 = MathHelper.floor_double(par3);
|
|
|
|
int var8 = MathHelper.floor_double(par3);
|
|
|
|
BigInteger var9 = MathHelper.floor_double_BigInteger(par5);
|
|
|
|
BigInteger var9 = MathHelper.floor_double_BigInteger(par5);
|
|
|
|
double var10 = par1 - (double)var7.doubleValue();
|
|
|
|
double var10 = par1 - (float)var7.doubleValue();
|
|
|
|
double var12 = par3 - (double)var8;
|
|
|
|
double var12 = par3 - (float)var8;
|
|
|
|
double var14 = par5 - (double)var9.doubleValue();
|
|
|
|
double var14 = par5 - (float)var9.doubleValue();
|
|
|
|
|
|
|
|
|
|
|
|
if (this.worldObj.isBlockNormalCube(var7, var8, var9))
|
|
|
|
if (this.worldObj.isBlockNormalCube(var7, var8, var9))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1981,32 +1981,32 @@ public abstract class Entity
|
|
|
|
|
|
|
|
|
|
|
|
if (var22 == 0)
|
|
|
|
if (var22 == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.motionX = (double)(-var25);
|
|
|
|
this.motionX = (float)(-var25);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var22 == 1)
|
|
|
|
if (var22 == 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.motionX = (double)var25;
|
|
|
|
this.motionX = (float)var25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var22 == 2)
|
|
|
|
if (var22 == 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.motionY = (double)(-var25);
|
|
|
|
this.motionY = (float)(-var25);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var22 == 3)
|
|
|
|
if (var22 == 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.motionY = (double)var25;
|
|
|
|
this.motionY = (float)var25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var22 == 4)
|
|
|
|
if (var22 == 4)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.motionZ = (double)(-var25);
|
|
|
|
this.motionZ = (float)(-var25);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (var22 == 5)
|
|
|
|
if (var22 == 5)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.motionZ = (double)var25;
|
|
|
|
this.motionZ = (float)var25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|