From 08b570ea368d195fa7fd16fef7280c7f28da384b Mon Sep 17 00:00:00 2001 From: Modmuss50 Date: Wed, 11 Nov 2015 17:08:41 +0000 Subject: [PATCH] Fixes #244 --- src/main/java/techreborn/compat/CompatManager.java | 8 ++++++++ src/main/java/techreborn/init/ModBlocks.java | 2 +- .../java/techreborn/powerSystem/TilePowerAcceptor.java | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/techreborn/compat/CompatManager.java b/src/main/java/techreborn/compat/CompatManager.java index 6502511a8..29f907aac 100644 --- a/src/main/java/techreborn/compat/CompatManager.java +++ b/src/main/java/techreborn/compat/CompatManager.java @@ -17,10 +17,17 @@ public class CompatManager { public static boolean isIC2Loaded = false; public static boolean isIC2ClassicLoaded = false; + public static boolean isClassicEnet = false; public CompatManager() { isIC2Loaded = Loader.isModLoaded("IC2"); isIC2ClassicLoaded = IC2Classic.isIc2ClassicLoaded(); + if(isIC2ClassicLoaded){ + isClassicEnet = true; + } + if(Loader.isModLoaded("Uncomplication")){ + isClassicEnet = true; + } registerCompact(CompatModuleWaila.class, "Waila"); registerCompact(RecipesIC2.class, "IC2"); @@ -71,4 +78,5 @@ public class CompatManager { return false; } } + } diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index a706083e6..71f1b5cb6 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -231,7 +231,7 @@ public class ModBlocks { GameRegistry.registerTileEntity(TileMachineBase.class, "TileMachineBaseTR"); - + registerOreDict(); Core.logHelper.info("TechReborns Blocks Loaded"); } diff --git a/src/main/java/techreborn/powerSystem/TilePowerAcceptor.java b/src/main/java/techreborn/powerSystem/TilePowerAcceptor.java index 80f2aff17..74e025e27 100644 --- a/src/main/java/techreborn/powerSystem/TilePowerAcceptor.java +++ b/src/main/java/techreborn/powerSystem/TilePowerAcceptor.java @@ -18,6 +18,7 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; import reborncore.api.IListInfoProvider; import techreborn.api.power.IEnergyInterfaceTile; +import techreborn.compat.CompatManager; import techreborn.config.ConfigTechReborn; import java.util.List; @@ -283,6 +284,9 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements if (getMaxOutput() != 0) { info.add(ChatFormatting.LIGHT_PURPLE + "Max Output " + ChatFormatting.GREEN + getEUString(getMaxOutput())); } + if(CompatManager.isClassicEnet && isRealTile){ + info.add(ChatFormatting.LIGHT_PURPLE + "Stored energy " + ChatFormatting.GREEN + getEUString(energy)); + } } private String getEUString(double euValue) {