Fixed Hellfire Forge's GUI
This commit is contained in:
parent
4fd39b6348
commit
cbe858e581
2 changed files with 28 additions and 24 deletions
|
@ -2,6 +2,7 @@
|
||||||
Version 2.0.0-20
|
Version 2.0.0-20
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
- Fixed Blood Altar crashing on odd occasions.
|
- Fixed Blood Altar crashing on odd occasions.
|
||||||
|
- Fixed GUI of hellfire forge.
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
Version 2.0.0-19
|
Version 2.0.0-19
|
||||||
|
|
|
@ -51,9 +51,25 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil
|
||||||
@Override
|
@Override
|
||||||
public void update()
|
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())
|
if (!hasSoulGemOrSoul())
|
||||||
|
@ -62,24 +78,6 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil
|
||||||
return;
|
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();
|
double soulsInGem = getWill();
|
||||||
|
|
||||||
List<ItemStack> inputList = new ArrayList<ItemStack>();
|
List<ItemStack> inputList = new ArrayList<ItemStack>();
|
||||||
|
@ -106,11 +104,14 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil
|
||||||
double requiredSouls = recipe.getSoulsDrained();
|
double requiredSouls = recipe.getSoulsDrained();
|
||||||
if (requiredSouls > 0)
|
if (requiredSouls > 0)
|
||||||
{
|
{
|
||||||
consumeSouls(requiredSouls);
|
if (!worldObj.isRemote)
|
||||||
|
{
|
||||||
|
consumeSouls(requiredSouls);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
craftItem(recipe);
|
if (!worldObj.isRemote)
|
||||||
|
craftItem(recipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
burnTime = 0;
|
burnTime = 0;
|
||||||
|
@ -122,8 +123,10 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil
|
||||||
{
|
{
|
||||||
burnTime = 0;
|
burnTime = 0;
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
burnTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getProgressForGui()
|
public double getProgressForGui()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue