diff --git a/resources/assets/resonantinduction/textures/gui/batterybox_gui.png b/resources/assets/resonantinduction/textures/gui/batterybox_gui.png index b0e31bbc..c4b64bbd 100644 Binary files a/resources/assets/resonantinduction/textures/gui/batterybox_gui.png and b/resources/assets/resonantinduction/textures/gui/batterybox_gui.png differ diff --git a/src/resonantinduction/ResonantInduction.java b/src/resonantinduction/ResonantInduction.java index 93a43200..6aac6f8f 100644 --- a/src/resonantinduction/ResonantInduction.java +++ b/src/resonantinduction/ResonantInduction.java @@ -62,7 +62,7 @@ public class ResonantInduction public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVISION_VERSION; @Instance(ID) - public static ResonantInduction INSTNACE; + public static ResonantInduction INSTANCE; @SidedProxy(clientSide = ID + ".ClientProxy", serverSide = ID + ".CommonProxy") public static CommonProxy proxy; @@ -168,8 +168,6 @@ public class ResonantInduction GameRegistry.registerTileEntity(TileEntityEMContractor.class, blockEMContractor.getUnlocalizedName()); GameRegistry.registerTileEntity(TileEntityBattery.class, blockBattery.getUnlocalizedName()); - TickRegistry.registerTickHandler(new BatteryManager(), Side.SERVER); - ResonantInduction.proxy.registerRenderers(); TabRI.ITEMSTACK = new ItemStack(blockTesla); diff --git a/src/resonantinduction/battery/BatteryManager.java b/src/resonantinduction/battery/BatteryManager.java index 8480fa60..e3db07de 100644 --- a/src/resonantinduction/battery/BatteryManager.java +++ b/src/resonantinduction/battery/BatteryManager.java @@ -1,42 +1,14 @@ package resonantinduction.battery; -import java.util.EnumSet; - import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import resonantinduction.api.IBattery; -import cpw.mods.fml.common.ITickHandler; -import cpw.mods.fml.common.TickType; -public class BatteryManager implements ITickHandler +public class BatteryManager { public static final int CELLS_PER_BATTERY = 16; - @Override - public void tickStart(EnumSet type, Object... tickData) - { - - } - - @Override - public void tickEnd(EnumSet type, Object... tickData) - { - - } - - @Override - public EnumSet ticks() - { - return EnumSet.of(TickType.WORLD); - } - - @Override - public String getLabel() - { - return "BatteryMultiblockManager"; - } - public static class SlotOut extends Slot { public SlotOut(IInventory inventory, int index, int x, int y) diff --git a/src/resonantinduction/battery/BlockBattery.java b/src/resonantinduction/battery/BlockBattery.java index 9e757c55..1fea2648 100644 --- a/src/resonantinduction/battery/BlockBattery.java +++ b/src/resonantinduction/battery/BlockBattery.java @@ -127,7 +127,7 @@ public class BlockBattery extends BlockBase implements ITileEntityProvider if (!world.isRemote) { - entityPlayer.openGui(ResonantInduction.INSTNACE, 0, world, x, y, z); + entityPlayer.openGui(ResonantInduction.INSTANCE, 0, world, x, y, z); } return true; diff --git a/src/resonantinduction/multimeter/BlockMultimeter.java b/src/resonantinduction/multimeter/BlockMultimeter.java index 47262170..6c94b59a 100644 --- a/src/resonantinduction/multimeter/BlockMultimeter.java +++ b/src/resonantinduction/multimeter/BlockMultimeter.java @@ -90,7 +90,7 @@ public class BlockMultimeter extends BlockBase implements ITileEntityProvider } else { - entityPlayer.openGui(ResonantInduction.INSTNACE, 0, world, x, y, z); + entityPlayer.openGui(ResonantInduction.INSTANCE, 0, world, x, y, z); } return true; diff --git a/src/resonantinduction/render/RenderBattery.java b/src/resonantinduction/render/RenderBattery.java index faa3b3a1..0f549ddc 100644 --- a/src/resonantinduction/render/RenderBattery.java +++ b/src/resonantinduction/render/RenderBattery.java @@ -71,9 +71,13 @@ public class RenderBattery extends TileEntitySpecialRenderer MODEL.render(0.0625f); GL11.glPopMatrix(); - int renderAmount = 16; - - itemRender: + int renderAmount = Math.min(((TileEntityBattery)t).clientCells, 16); + + if(renderAmount == 0) + { + return; + } + for (int i = 2; i < 6; i++) { ForgeDirection direction = ForgeDirection.getOrientation(i); @@ -130,9 +134,9 @@ public class RenderBattery extends TileEntitySpecialRenderer this.renderItemSimple(this.fakeBattery); GL11.glPopMatrix(); - if (renderAmount-- <= 0) + if (--renderAmount == 0) { - break itemRender; + return; } } }