From cbe858e581edcaa7e243612429783c46593e57d3 Mon Sep 17 00:00:00 2001 From: WayofTime Date: Mon, 7 Mar 2016 06:39:37 -0500 Subject: [PATCH] Fixed Hellfire Forge's GUI --- changelog.txt | 1 + .../bloodmagic/tile/TileSoulForge.java | 51 ++++++++++--------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/changelog.txt b/changelog.txt index 857fecc8..922eef34 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Version 2.0.0-20 ------------------------------------------------------ - Fixed Blood Altar crashing on odd occasions. +- Fixed GUI of hellfire forge. ------------------------------------------------------ Version 2.0.0-19 diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java b/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java index d4b40d38..b2d882e1 100644 --- a/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java +++ b/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java @@ -51,9 +51,25 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil @Override public void update() { - if (worldObj.isRemote) + if (!worldObj.isRemote) { - return; + for (EnumDemonWillType type : EnumDemonWillType.values()) + { + double willInWorld = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); + double filled = Math.min(willInWorld, worldWillTransferRate); + + if (filled > 0) + { + filled = this.fillDemonWill(type, filled, false); + filled = WorldDemonWillHandler.drainWill(worldObj, pos, type, filled, false); + + if (filled > 0) + { + this.fillDemonWill(type, filled, true); + WorldDemonWillHandler.drainWill(worldObj, pos, type, filled, true); + } + } + } } if (!hasSoulGemOrSoul()) @@ -62,24 +78,6 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil return; } - for (EnumDemonWillType type : EnumDemonWillType.values()) - { - double willInWorld = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type); - double filled = Math.min(willInWorld, worldWillTransferRate); - - if (filled > 0) - { - filled = this.fillDemonWill(type, filled, false); - filled = WorldDemonWillHandler.drainWill(worldObj, pos, type, filled, false); - - if (filled > 0) - { - this.fillDemonWill(type, filled, true); - WorldDemonWillHandler.drainWill(worldObj, pos, type, filled, true); - } - } - } - double soulsInGem = getWill(); List inputList = new ArrayList(); @@ -106,11 +104,14 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil double requiredSouls = recipe.getSoulsDrained(); if (requiredSouls > 0) { - consumeSouls(requiredSouls); + if (!worldObj.isRemote) + { + consumeSouls(requiredSouls); + } } - craftItem(recipe); - + if (!worldObj.isRemote) + craftItem(recipe); } burnTime = 0; @@ -122,8 +123,10 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil { burnTime = 0; } + } else + { + burnTime = 0; } - } public double getProgressForGui()