Fixed Hellfire Forge's GUI

This commit is contained in:
WayofTime 2016-03-07 06:39:37 -05:00
parent 4fd39b6348
commit cbe858e581
2 changed files with 28 additions and 24 deletions

View file

@ -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

View file

@ -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<ItemStack> inputList = new ArrayList<ItemStack>();
@ -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()