general code cleanup

try and add changes generation back into gradle again
This commit is contained in:
2016-07-27 11:29:58 +02:00
parent e8976365a2
commit faa70ed224
32 changed files with 49 additions and 124 deletions

View File

@@ -12,6 +12,8 @@ import slimeknights.tconstruct.library.traits.AbstractTrait;
import slimeknights.tconstruct.library.utils.TagUtil;
import slimeknights.tconstruct.library.utils.TinkerUtil;
import static com.sosnitzka.taiga.util.Utils.isNight;
public class TraitBright extends AbstractTrait {
@@ -22,7 +24,7 @@ public class TraitBright extends AbstractTrait {
@Override
public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
int time = (int) target.getEntityWorld().getWorldTime();
if (isDay(time)) {
if (!isNight(time)) {
newDamage += damage / 2f;
}
return super.damage(tool, player, target, damage, newDamage, isCritical);
@@ -37,14 +39,5 @@ public class TraitBright extends AbstractTrait {
e.addPotionEffect(new PotionEffect(MobEffects.GLOWING, 100));
}
}
}
public boolean isDay(int time) {
if (time < 12500) {
return true;
} else {
return false;
}
}
}