From da35b509fd01cb63b0385676d42d3f137c90de7c Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Thu, 31 Jul 2014 19:19:03 -0400 Subject: [PATCH] Creative Energy Cube now won't be drained of or receive power. --- src/main/java/mekanism/common/Tier.java | 2 +- src/main/java/mekanism/common/tile/TileEntityEnergyCube.java | 3 ++- src/main/java/mekanism/common/util/MekanismUtils.java | 5 +++++ src/main/resources/assets/mekanism/lang/en_US.lang | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/mekanism/common/Tier.java b/src/main/java/mekanism/common/Tier.java index 5f118ed85..5a820d10d 100644 --- a/src/main/java/mekanism/common/Tier.java +++ b/src/main/java/mekanism/common/Tier.java @@ -46,7 +46,7 @@ public final class Tier ADVANCED("Advanced", EnumColor.DARK_RED, 8000000, 3200), ELITE("Elite", EnumColor.DARK_BLUE, 32000000, 12800), ULTIMATE("Ultimate", EnumColor.PURPLE, 128000000, 51200), - CREATIVE("Creative", EnumColor.BLACK, Integer.MAX_VALUE, Integer.MAX_VALUE/2D); + CREATIVE("Creative", EnumColor.BLACK, Integer.MAX_VALUE, Integer.MAX_VALUE); public double MAX_ELECTRICITY; public double OUTPUT; diff --git a/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java b/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java index 7fc670bed..7c12ac636 100644 --- a/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java +++ b/src/main/java/mekanism/common/tile/TileEntityEnergyCube.java @@ -247,8 +247,9 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IPe { if(tier == EnergyCubeTier.CREATIVE) { - energy = Integer.MAX_VALUE / 2D; + return; } + super.setEnergy(energy); int newRedstoneLevel = getRedstoneLevel(); diff --git a/src/main/java/mekanism/common/util/MekanismUtils.java b/src/main/java/mekanism/common/util/MekanismUtils.java index 2f761de84..c5460269b 100644 --- a/src/main/java/mekanism/common/util/MekanismUtils.java +++ b/src/main/java/mekanism/common/util/MekanismUtils.java @@ -1156,6 +1156,11 @@ public final class MekanismUtils */ public static String getEnergyDisplay(double energy) { + if(energy == Integer.MAX_VALUE) + { + return localize("gui.infinite"); + } + switch(Mekanism.activeType) { case J: diff --git a/src/main/resources/assets/mekanism/lang/en_US.lang b/src/main/resources/assets/mekanism/lang/en_US.lang index c1495f543..47a22a362 100644 --- a/src/main/resources/assets/mekanism/lang/en_US.lang +++ b/src/main/resources/assets/mekanism/lang/en_US.lang @@ -162,6 +162,7 @@ tile.EnergyCube.Basic.name=Basic Energy Cube tile.EnergyCube.Advanced.name=Advanced Energy Cube tile.EnergyCube.Elite.name=Elite Energy Cube tile.EnergyCube.Ultimate.name=Ultimate Energy Cube +tile.EnergyCube.Creative.name=Creative Energy Cube //Dust item.ironDust.name=Iron Dust @@ -357,6 +358,7 @@ gui.id=ID gui.finished=Finished gui.well=All is well! gui.upgrade=Upgrade +gui.infinite=Infinite gui.upgrades=Upgrades gui.upgrades.supported=Supported