From 434650a7d804d5fa305e55b538b07bd3615c8ade Mon Sep 17 00:00:00 2001 From: pahimar Date: Sat, 21 Dec 2013 18:47:55 -0500 Subject: [PATCH] Forcing EmcValues to have (at most) 4 points of precision --- build.properties | 4 +- .../com/pahimar/ee3/EquivalentExchange3.java | 2 + .../inventory/GuiPortableTransmutation.java | 4 -- .../java/com/pahimar/ee3/emc/EmcValue.java | 27 ++++--- .../com/pahimar/ee3/emc/EmcValuesDefault.java | 2 +- .../com/pahimar/ee3/helper/DebugHelper.java | 11 +++ .../pahimar/ee3/item/ItemAlchemicalDust.java | 2 +- .../ee3/recipe/CalcinationManager.java | 71 ++++--------------- 8 files changed, 43 insertions(+), 80 deletions(-) diff --git a/build.properties b/build.properties index f7db21b8..384b2fdf 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ # -#Tue Dec 17 19:56:56 EST 2013 +#Sat Dec 21 18:48:29 EST 2013 minecraft_version=1.6.4 forge_version=9.11.1.964 +build_number=31 mod_version=0.0 -build_number=30 diff --git a/src/main/java/com/pahimar/ee3/EquivalentExchange3.java b/src/main/java/com/pahimar/ee3/EquivalentExchange3.java index e94f2587..8e70e0de 100644 --- a/src/main/java/com/pahimar/ee3/EquivalentExchange3.java +++ b/src/main/java/com/pahimar/ee3/EquivalentExchange3.java @@ -6,6 +6,7 @@ import com.pahimar.ee3.command.CommandHandler; import com.pahimar.ee3.configuration.ConfigurationHandler; import com.pahimar.ee3.creativetab.CreativeTabEE3; import com.pahimar.ee3.handler.*; +import com.pahimar.ee3.helper.DebugHelper; import com.pahimar.ee3.helper.FluidHelper; import com.pahimar.ee3.helper.LogHelper; import com.pahimar.ee3.helper.VersionHelper; @@ -163,6 +164,7 @@ public class EquivalentExchange3 public void postInit(FMLPostInitializationEvent event) { // NOOP + DebugHelper.printEmcValueToStackMappings(); } @EventHandler diff --git a/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java b/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java index c4f7a1c3..140ac8a9 100644 --- a/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java +++ b/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java @@ -23,15 +23,12 @@ public class GuiPortableTransmutation extends GuiContainer public GuiPortableTransmutation(Container par1Container) { - super(par1Container); - // TODO Auto-generated constructor stub } @Override protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(Textures.GUI_PORTABLE_TRANSMUTATION); int var5 = (width - xSize) / 2; @@ -42,7 +39,6 @@ public class GuiPortableTransmutation extends GuiContainer @Override public void onGuiClosed() { - super.onGuiClosed(); if (mc.thePlayer != null) diff --git a/src/main/java/com/pahimar/ee3/emc/EmcValue.java b/src/main/java/com/pahimar/ee3/emc/EmcValue.java index 147da8ce..7a19fb47 100644 --- a/src/main/java/com/pahimar/ee3/emc/EmcValue.java +++ b/src/main/java/com/pahimar/ee3/emc/EmcValue.java @@ -5,6 +5,7 @@ import com.pahimar.ee3.helper.LogHelper; import com.pahimar.ee3.lib.Compare; import java.lang.reflect.Type; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -21,7 +22,7 @@ public class EmcValue implements Comparable, JsonDeserializer, JsonDeserializer, JsonDeserializer, JsonDeserializer 0) @@ -150,7 +151,6 @@ public class EmcValue implements Comparable, JsonDeserializer, JsonDeserializer calcinationResults = new ArrayList(); EmcValue emcValue = EmcRegistry.getInstance().getEmcValue(itemStack); + EmcValue ashEmcValue = EmcRegistry.getInstance().getEmcValue(ASH_DUST_STACK); + EmcValue miniumEmcValue = EmcRegistry.getInstance().getEmcValue(MINIUM_DUST_STACK); + EmcValue verdantEmcValue = EmcRegistry.getInstance().getEmcValue(VERDANT_DUST_STACK); + EmcValue azureEmcValue = EmcRegistry.getInstance().getEmcValue(AZURE_DUST_STACK); + EmcValue amarathineEmcValue = EmcRegistry.getInstance().getEmcValue(AMARANTHINE_DUST_STACK); + EmcValue iridescentEmcValue = EmcRegistry.getInstance().getEmcValue(IRIDESCENT_DUST_STACK); + if (emcValue != null) { -// // ASH -// if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(ASH_DUST_STACK).getValue()) == Compare.LESSER_THAN) -// { -// -// } -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(ASH_DUST_STACK).getValue()) == Compare.EQUALS) -// { -// -// } -// // MINIUM -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(MINIUM_DUST_STACK).getValue()) == Compare.LESSER_THAN) -// { -// -// } -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(MINIUM_DUST_STACK).getValue()) == Compare.EQUALS) -// { -// -// } -// // VERDANT -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(VERDANT_DUST_STACK).getValue()) == Compare.LESSER_THAN) -// { -// -// } -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(VERDANT_DUST_STACK).getValue()) == Compare.EQUALS) -// { -// -// } -// // AZURE -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(AZURE_DUST_STACK).getValue()) == Compare.LESSER_THAN) -// { -// -// } -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(AZURE_DUST_STACK).getValue()) == Compare.EQUALS) -// { -// -// } -// // AMARATHINE -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(AMARANTHINE_DUST_STACK).getValue()) == Compare.LESSER_THAN) -// { -// -// } -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(AMARANTHINE_DUST_STACK).getValue()) == Compare.EQUALS) -// { -// -// } -// // IRIDESCENT -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(IRIDESCENT_DUST_STACK).getValue()) == Compare.LESSER_THAN) -// { -// -// } -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(IRIDESCENT_DUST_STACK).getValue()) == Compare.LESSER_THAN) -// { -// -// } -// else if (Float.compare(emcValue.getValue(), EmcRegistry.getEmcValue(IRIDESCENT_DUST_STACK).getValue()) == Compare.GREATER_THAN) -// { -// -// } + if (Float.compare(emcValue.getValue(), ashEmcValue.getValue()) <= Compare.EQUALS) + { + + } + else if } else {