mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39: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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user