Fixed the Hellfire Forge filling the Tartaric Gem with the incorrect Will from the Demon Aura, without actually adding to the gem

This commit is contained in:
WayofTime 2016-07-09 21:45:35 -04:00
parent c34bd48aa5
commit b8745e34ee
5 changed files with 20 additions and 25 deletions

View file

@ -54,7 +54,7 @@ public class TileDemonCrucible extends TileInventory implements ITickable, IDemo
double fillAmount = Math.min(gemDrainRate, current);
if (fillAmount > 0)
{
fillAmount = gemItem.fillWill(type, stack, fillAmount);
fillAmount = gemItem.fillWill(type, stack, fillAmount, true);
if (willMap.get(type) - fillAmount <= 0)
{
willMap.remove(type);
@ -80,7 +80,7 @@ public class TileDemonCrucible extends TileInventory implements ITickable, IDemo
double currentAmount = WorldDemonWillHandler.getCurrentWill(worldObj, pos, type);
double drainAmount = Math.min(maxWill - currentAmount, gemDrainRate);
double filled = WorldDemonWillHandler.fillWillToMaximum(worldObj, pos, type, drainAmount, maxWill, false);
filled = gemItem.drainWill(type, stack, filled);
filled = gemItem.drainWill(type, stack, filled, true);
if (filled > 0)
{
WorldDemonWillHandler.fillWillToMaximum(worldObj, pos, type, filled, maxWill, true);

View file

@ -231,7 +231,7 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil
if (soulStack.getItem() instanceof IDemonWillGem)
{
IDemonWillGem soul = (IDemonWillGem) soulStack.getItem();
return soul.drainWill(EnumDemonWillType.DEFAULT, soulStack, requested);
return soul.drainWill(EnumDemonWillType.DEFAULT, soulStack, requested, true);
}
}
@ -288,15 +288,7 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil
IDemonWillGem willGem = (IDemonWillGem) stack.getItem();
double maxWill = willGem.getMaxWill(type, stack);
double current = willGem.getWill(type, stack);
if (!doFill)
{
return Math.min(maxWill - current, amount);
}
double filled = willGem.fillWill(type, stack, amount);
double filled = willGem.fillWill(type, stack, amount, doFill);
return filled;
}
@ -321,7 +313,7 @@ public class TileSoulForge extends TileInventory implements ITickable, IDemonWil
if (doDrain)
{
drained = willGem.drainWill(type, stack, drained);
drained = willGem.drainWill(type, stack, drained, true);
}
return drained;