Code cleanup

This commit is contained in:
LemADEC 2015-10-04 23:50:34 +02:00
parent 26f4cc34d5
commit 9414f773bb
2 changed files with 15 additions and 14 deletions

View file

@ -22,6 +22,7 @@ import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.ForgeChunkManager.Type;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.EnumHelper;
import org.apache.logging.log4j.Logger;
import cpw.mods.fml.common.FMLCommonHandler;

View file

@ -24,7 +24,7 @@ public class TileEntityLaserMedium extends TileEntityAbstractEnergy {
if (ticks > 20) {
ticks = 0;
int metadata = Math.max(0, Math.min(10, Math.round((getEnergyStored() * 10) / getMaxEnergyStored())));
int metadata = Math.max(0, Math.min(7, Math.round((getEnergyStored() * 8) / getMaxEnergyStored())));
if (getBlockMetadata() != metadata) {
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, metadata, 3);
}