Skip to content

Commit

Permalink
restructure if for better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
way2muchnoise committed Jan 11, 2016
1 parent af4c8e2 commit 5562dd3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/jeresources/jei/mob/MobWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,19 @@ private float getScale(EntityLivingBase entityLivingBase)
private int getOffsetY(EntityLivingBase entityLivingBase)
{
int offsetY = 0;
if (ModList.thaumcraft.isLoaded() && entityLivingBase instanceof EntityTaintacle) offsetY = 50;
else if (entityLivingBase instanceof EntitySquid) offsetY = 20;
if (entityLivingBase instanceof EntitySquid) offsetY = 20;
else if (entityLivingBase instanceof EntityWitch) offsetY = -10;
else if (entityLivingBase instanceof EntityGhast) offsetY = 15;
else if (ModList.thaumcraft.isLoaded() && entityLivingBase instanceof EntityTaintVillager) offsetY = -10;
else if (ModList.thaumcraft.isLoaded() && entityLivingBase instanceof EntityCultist) offsetY = -10;
else if (entityLivingBase instanceof EntityWither) offsetY = -15;
else if (entityLivingBase instanceof EntityDragon) offsetY = 15;
else if (entityLivingBase instanceof EntityEnderman) offsetY = -10;
else if (entityLivingBase instanceof EntityGolem) offsetY = -10;
else if (ModList.thaumcraft.isLoaded())
{
if (entityLivingBase instanceof EntityTaintacle) offsetY = 50;
else if (entityLivingBase instanceof EntityTaintVillager) offsetY = -10;
else if (entityLivingBase instanceof EntityCultist) offsetY = -10;
}
return offsetY;
}
}

0 comments on commit 5562dd3

Please sign in to comment.