diff --git a/libs/TerraFirmaCraft-MC1.12-1.0.9.137-deobf.jar b/libs/TerraFirmaCraft-MC1.12.2-1.1.0.142-deobf.jar similarity index 90% rename from libs/TerraFirmaCraft-MC1.12-1.0.9.137-deobf.jar rename to libs/TerraFirmaCraft-MC1.12.2-1.1.0.142-deobf.jar index f1f71c5..ba18c15 100644 Binary files a/libs/TerraFirmaCraft-MC1.12-1.0.9.137-deobf.jar and b/libs/TerraFirmaCraft-MC1.12.2-1.1.0.142-deobf.jar differ diff --git a/src/main/java/tfctech/client/gui/GuiElectricForge.java b/src/main/java/tfctech/client/gui/GuiElectricForge.java index 445b04b..590d553 100644 --- a/src/main/java/tfctech/client/gui/GuiElectricForge.java +++ b/src/main/java/tfctech/client/gui/GuiElectricForge.java @@ -71,7 +71,7 @@ protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, i drawTexturedModalRect(guiLeft + 8, guiTop + 66 - temperaturePixels, 36, 54, 15, 5); // Draw the energy bar - int energyPixels = 60 * tile.getField(1) / tile.getEnergyCapacity(); + int energyPixels = Math.round(60 * tile.getField(1) / (float)tile.getEnergyCapacity()); int emptyPixels = 60 - energyPixels; drawTexturedModalRect(guiLeft + 153, guiTop + 6, 0, 0, 18, emptyPixels); drawTexturedModalRect(guiLeft + 153, guiTop + 6 + emptyPixels, 18, emptyPixels, 18, energyPixels); diff --git a/src/main/java/tfctech/client/gui/GuiInductionCrucible.java b/src/main/java/tfctech/client/gui/GuiInductionCrucible.java index bbb5c9b..48ec663 100644 --- a/src/main/java/tfctech/client/gui/GuiInductionCrucible.java +++ b/src/main/java/tfctech/client/gui/GuiInductionCrucible.java @@ -1,9 +1,12 @@ package tfctech.client.gui; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; +import net.dries007.tfc.TerraFirmaCraft; import net.dries007.tfc.client.gui.GuiCrucible; import tfctech.client.TechGuiHandler; import tfctech.objects.tileentities.TEInductionCrucible; @@ -18,7 +21,6 @@ public GuiInductionCrucible(Container container, InventoryPlayer playerInv, TEIn @Override protected void renderHoveredToolTip(int mouseX, int mouseY) { - super.renderHoveredToolTip(mouseX, mouseY); if (mouseX >= guiLeft + 8 && mouseX <= guiLeft + 8 + 16 && mouseY >= guiTop + 79 && mouseY <= guiTop + 79 + 57) { int energy = tile.getField(1); @@ -31,10 +33,10 @@ protected void renderHoveredToolTip(int mouseX, int mouseY) protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY); - + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); // Draw the energy bar mc.getTextureManager().bindTexture(TechGuiHandler.GUI_ELEMENTS); - int energyPixels = 60 * tile.getField(1) / ((TEInductionCrucible) tile).getEnergyCapacity(); + int energyPixels = Math.round(60 * tile.getField(1) / (float)((TEInductionCrucible) tile).getEnergyCapacity()); int emptyPixels = 60 - energyPixels; drawTexturedModalRect(guiLeft + 7, guiTop + 78, 0, 0, 18, emptyPixels); drawTexturedModalRect(guiLeft + 7, guiTop + 78 + emptyPixels, 18, emptyPixels, 18, energyPixels); diff --git a/src/main/java/tfctech/compat/waila/TOPPlugin.java b/src/main/java/tfctech/compat/waila/TOPPlugin.java index 1aa0077..953043a 100644 --- a/src/main/java/tfctech/compat/waila/TOPPlugin.java +++ b/src/main/java/tfctech/compat/waila/TOPPlugin.java @@ -59,41 +59,6 @@ public void addProbeInfo(ProbeMode probeMode, IProbeInfo iProbeInfo, EntityPlaye { IProbeInfo horizontalPane = iProbeInfo.horizontal(iProbeInfo.defaultLayoutStyle().alignment(ElementAlignment.ALIGN_CENTER)); horizontalPane.text((new TextComponentTranslation("waila.tfctech.fridge.efficiency", (int) fridge.getEfficiency())).getFormattedText()); - iProbeInfo.progress(fridge.getEnergyStored(), fridge.getEnergyCapacity(), - iProbeInfo.defaultProgressStyle() - .suffix("RF") - .filledColor(0xFF419099) - .alternateFilledColor(0xFF43748E) - .borderColor(0xFFFFFFFF) - .numberFormat(NumberFormat.COMPACT)); - } - } - if (b instanceof BlockElectricForge) - { - TEElectricForge forge = Helpers.getTE(world, pos, TEElectricForge.class); - if (forge != null) - { - iProbeInfo.progress(forge.getEnergyStored(), forge.getEnergyCapacity(), - iProbeInfo.defaultProgressStyle() - .suffix("RF") - .filledColor(0xFF419099) - .alternateFilledColor(0xFF43748E) - .borderColor(0xFFFFFFFF) - .numberFormat(NumberFormat.COMPACT)); - } - } - if (b instanceof BlockInductionCrucible) - { - TEInductionCrucible crucible = Helpers.getTE(world, pos, TEInductionCrucible.class); - if (crucible != null) - { - iProbeInfo.progress(crucible.getEnergyStored(), crucible.getEnergyCapacity(), - iProbeInfo.defaultProgressStyle() - .suffix("RF") - .filledColor(0xFF419099) - .alternateFilledColor(0xFF43748E) - .borderColor(0xFFFFFFFF) - .numberFormat(NumberFormat.COMPACT)); } } if (b instanceof BlockLatexExtractor) diff --git a/src/main/java/tfctech/objects/tileentities/TEElectricForge.java b/src/main/java/tfctech/objects/tileentities/TEElectricForge.java index a471115..d87751c 100644 --- a/src/main/java/tfctech/objects/tileentities/TEElectricForge.java +++ b/src/main/java/tfctech/objects/tileentities/TEElectricForge.java @@ -123,7 +123,7 @@ public void update() if (targetTemperature > itemTemp && energyContainer.consumeEnergy(energy, false)) { float heatSpeed = (float) TechConfig.DEVICES.electricForgeSpeed * 15.0F; - float temp = cap.getTemperature() + heatSpeed * cap.getHeatCapacity() * (float) ConfigTFC.GENERAL.temperatureModifierGlobal; + float temp = cap.getTemperature() + heatSpeed * cap.getHeatCapacity() * (float) ConfigTFC.Devices.TEMPERATURE.globalModifier; cap.setTemperature(Math.min(temp, targetTemperature)); litTime = 15; } diff --git a/src/main/java/tfctech/objects/tileentities/TEInductionCrucible.java b/src/main/java/tfctech/objects/tileentities/TEInductionCrucible.java index bb18f5e..5ac6adb 100644 --- a/src/main/java/tfctech/objects/tileentities/TEInductionCrucible.java +++ b/src/main/java/tfctech/objects/tileentities/TEInductionCrucible.java @@ -212,7 +212,7 @@ public void setField(int index, int value) { if (index == 0) { - super.setField(index, value); + super.setField(0, value); } else if (index == 1) { @@ -229,7 +229,7 @@ public int getField(int index) { if (index == 0) { - return super.getField(index); + return super.getField(0); } else if (index == 1) { diff --git a/src/main/java/tfctech/objects/tileentities/TESmelteryCauldron.java b/src/main/java/tfctech/objects/tileentities/TESmelteryCauldron.java index 1870dac..e01a894 100644 --- a/src/main/java/tfctech/objects/tileentities/TESmelteryCauldron.java +++ b/src/main/java/tfctech/objects/tileentities/TESmelteryCauldron.java @@ -87,7 +87,7 @@ else if (temp <= 0 && state.getValue(LIT)) inventory.setStackInSlot(i, input.get(i)); } tank.fillInternal(output, true); - temp -= ConfigTFC.GENERAL.temperatureModifierHeating * 150; + temp -= ConfigTFC.Devices.TEMPERATURE.heatingModifier * 150; if (firebox != null) { firebox.setTemperature(temp); diff --git a/src/main/java/tfctech/objects/tileentities/TESmelteryFirebox.java b/src/main/java/tfctech/objects/tileentities/TESmelteryFirebox.java index c08a6ab..6712488 100644 --- a/src/main/java/tfctech/objects/tileentities/TESmelteryFirebox.java +++ b/src/main/java/tfctech/objects/tileentities/TESmelteryFirebox.java @@ -11,6 +11,7 @@ import net.dries007.tfc.api.capability.heat.CapabilityItemHeat; import net.dries007.tfc.objects.te.ITileFields; import net.dries007.tfc.objects.te.TEInventory; +import net.dries007.tfc.objects.te.TETickableInventory; import net.dries007.tfc.util.calendar.CalendarTFC; import net.dries007.tfc.util.calendar.ICalendarTickable; import net.dries007.tfc.util.fuel.Fuel; @@ -19,7 +20,7 @@ import static net.dries007.tfc.objects.blocks.property.ILightableBlock.LIT; -public class TESmelteryFirebox extends TEInventory implements ITickable, ICalendarTickable, ITileFields +public class TESmelteryFirebox extends TETickableInventory implements ITickable, ICalendarTickable, ITileFields { private float temperature; private float burnTemperature; @@ -76,7 +77,8 @@ public int getField(int index) @Override public void update() { - ICalendarTickable.super.update(); + super.update(); + checkForCalendarUpdate(); if (!world.isRemote) { IBlockState state = world.getBlockState(pos); @@ -112,7 +114,7 @@ public void update() float targetTemperature = burnTemperature + airTicks; if (temperature != targetTemperature) { - float delta = (float) ConfigTFC.GENERAL.temperatureModifierHeating; + float delta = (float) ConfigTFC.Devices.TEMPERATURE.heatingModifier; temperature = CapabilityItemHeat.adjustTempTowards(temperature, targetTemperature, delta * (airTicks > 0 ? 2 : 1)); } } @@ -153,14 +155,14 @@ public void onCalendarUpdate(long deltaPlayerTicks) if (burnTicks > deltaPlayerTicks) { burnTicks -= deltaPlayerTicks; - float delta = (float) ConfigTFC.GENERAL.temperatureModifierHeating * deltaPlayerTicks; + float delta = (float) ConfigTFC.Devices.TEMPERATURE.heatingModifier * deltaPlayerTicks; temperature = CapabilityItemHeat.adjustTempTowards(temperature, burnTemperature, delta, delta); deltaPlayerTicks = 0; } else { deltaPlayerTicks -= burnTicks; - float delta = (float) ConfigTFC.GENERAL.temperatureModifierHeating * burnTicks; + float delta = (float) ConfigTFC.Devices.TEMPERATURE.heatingModifier * burnTicks; temperature = CapabilityItemHeat.adjustTempTowards(temperature, burnTemperature, delta, delta); consumeFuel(); }