mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 08:54:12 +00:00
Remove unnecessary access transforming
This commit is contained in:
1 parent
780387a6d5
commit
ca417349b6
5 files changed
+8
-39
No files matched your search
@@ -25,26 +25,12 @@ public class GlueBlock extends TConstructBlock
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
EntityLivingBase lvb = (EntityLivingBase) entity;
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
// Well you'd feel ill too standing on glue...
|
||||
if (lvb.isPotionActive(Potion.hunger))
|
||||
{
|
||||
lvb.getActivePotionEffect(Potion.hunger).duration = 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvb.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 20, 4));
|
||||
}
|
||||
living.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 20, 4));
|
||||
|
||||
// Glue is sticky stuff
|
||||
if (lvb.isPotionActive(Potion.moveSlowdown))
|
||||
{
|
||||
lvb.getActivePotionEffect(Potion.moveSlowdown).duration = 30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvb.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30, 4));
|
||||
}
|
||||
living.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30, 4));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,26 +49,12 @@ public class GlueFluid extends BlockFluidFinite
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
EntityLivingBase lvb = (EntityLivingBase) entity;
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
// Well you'd feel ill too standing in glue...
|
||||
if (lvb.isPotionActive(Potion.hunger))
|
||||
{
|
||||
lvb.getActivePotionEffect(Potion.hunger).duration = 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvb.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 20, 4));
|
||||
}
|
||||
living.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 20, 4));
|
||||
|
||||
// Glue is sticky stuff
|
||||
if (lvb.isPotionActive(Potion.moveSlowdown))
|
||||
{
|
||||
lvb.getActivePotionEffect(Potion.moveSlowdown).duration = 30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvb.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30, 4));
|
||||
}
|
||||
living.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class CartRender extends Render
|
||||
public void renderPullcart (CartEntity cart, double posX, double posY, double posZ, float par8, float par9)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
long var10 = (long) cart.entityId * 493286711L;
|
||||
long var10 = (long) cart.hashCode() * 493286711L;
|
||||
var10 = var10 * var10 * 4392167121L + var10 * 98761L;
|
||||
float var12 = (((float) (var10 >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
|
||||
float var13 = (((float) (var10 >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F;
|
||||
|
||||
@@ -206,7 +206,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
if (movingobjectposition.entityHit != null)
|
||||
{
|
||||
speed = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
double damageSpeed = (double) speed * this.damage;
|
||||
double damageSpeed = (double) speed * this.getDamage();
|
||||
damageSpeed *= baseDamage;
|
||||
damageSpeed /= 5D;
|
||||
int damageInflicted = MathHelper.ceiling_double_int(damageSpeed);
|
||||
|
||||
Reference in new issue
Block a user