Remove unnecessary access transforming

This commit is contained in:
mDiyo committed 2014-04-12 04:14:00 -08:00
1 parent 780387a6d5
commit ca417349b6
5 files changed
+8 -39

No files matched your search

+3 -17
View File
@@ -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));
}
}
+3 -17
View File
@@ -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));
}
}
}