mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-26 14:33:50 +00:00
Merge pull request #628 from blue42u/patch-singot
Fix the casting glitch
This commit is contained in:
commit
14b9541deb
2 files changed
+44
-52
No files matched your search
@@ -70,22 +70,19 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
|||||||
|
|
||||||
public int updateCapacity () // Only used to initialize
|
public int updateCapacity () // Only used to initialize
|
||||||
{
|
{
|
||||||
int ret = TConstruct.ingotLiquidValue;
|
|
||||||
|
|
||||||
ItemStack inv = inventory[0];
|
ItemStack inv = inventory[0];
|
||||||
|
int ret = TConstruct.ingotLiquidValue;
|
||||||
|
int rec = TConstruct.basinCasting.getCastingAmount(this.liquid, inv);
|
||||||
|
|
||||||
if (inv != null && inv.getItem() instanceof IPattern)
|
if (rec > 0)
|
||||||
{
|
ret = rec;
|
||||||
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
else {
|
||||||
if (cost > 0)
|
if (inv != null && inv.getItem() instanceof IPattern)
|
||||||
ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
|
{
|
||||||
else
|
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
||||||
ret = TConstruct.basinCasting.getCastingAmount(this.liquid, inv);
|
if (cost > 0)
|
||||||
}
|
ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
|
||||||
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ret = TConstruct.basinCasting.getCastingAmount(this.liquid, inv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TConstruct.logger.info("Ret: " + ret);
|
TConstruct.logger.info("Ret: " + ret);
|
||||||
@@ -96,19 +93,18 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
|
|||||||
{
|
{
|
||||||
int ret = TConstruct.ingotLiquidValue;
|
int ret = TConstruct.ingotLiquidValue;
|
||||||
|
|
||||||
ItemStack inv = inventory[0];
|
if (capacity > 0)
|
||||||
|
|
||||||
if (inv != null && inv.getItem() instanceof IPattern)
|
|
||||||
{
|
|
||||||
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
|
||||||
if (cost > 0)
|
|
||||||
ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
|
|
||||||
else
|
|
||||||
ret = capacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
ret = capacity;
|
ret = capacity;
|
||||||
|
else {
|
||||||
|
ItemStack inv = inventory[0];
|
||||||
|
|
||||||
|
if (inv != null && inv.getItem() instanceof IPattern)
|
||||||
|
{
|
||||||
|
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
||||||
|
if (cost > 0)
|
||||||
|
ret *= cost * 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,22 +70,19 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
|||||||
|
|
||||||
public int updateCapacity () // Only used to initialize
|
public int updateCapacity () // Only used to initialize
|
||||||
{
|
{
|
||||||
int ret = TConstruct.ingotLiquidValue;
|
|
||||||
|
|
||||||
ItemStack inv = inventory[0];
|
ItemStack inv = inventory[0];
|
||||||
|
int ret = TConstruct.ingotLiquidValue;
|
||||||
|
int rec = TConstruct.tableCasting.getCastingAmount(this.liquid, inv);
|
||||||
|
|
||||||
if (inv != null && inv.getItem() instanceof IPattern)
|
if (rec > 0)
|
||||||
{
|
ret = rec;
|
||||||
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
else {
|
||||||
if (cost > 0)
|
if (inv != null && inv.getItem() instanceof IPattern)
|
||||||
ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
|
{
|
||||||
else
|
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
||||||
ret = TConstruct.tableCasting.getCastingAmount(this.liquid, inv);
|
if (cost > 0)
|
||||||
}
|
ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
|
||||||
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ret = TConstruct.tableCasting.getCastingAmount(this.liquid, inv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TConstruct.logger.info("Ret: " + ret);
|
TConstruct.logger.info("Ret: " + ret);
|
||||||
@@ -96,19 +93,18 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
|
|||||||
{
|
{
|
||||||
int ret = TConstruct.ingotLiquidValue;
|
int ret = TConstruct.ingotLiquidValue;
|
||||||
|
|
||||||
ItemStack inv = inventory[0];
|
if (capacity > 0)
|
||||||
|
|
||||||
if (inv != null && inv.getItem() instanceof IPattern)
|
|
||||||
{
|
|
||||||
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
|
||||||
if (cost > 0)
|
|
||||||
ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
|
|
||||||
else
|
|
||||||
ret = capacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
ret = capacity;
|
ret = capacity;
|
||||||
|
else {
|
||||||
|
ItemStack inv = inventory[0];
|
||||||
|
|
||||||
|
if (inv != null && inv.getItem() instanceof IPattern)
|
||||||
|
{
|
||||||
|
int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
|
||||||
|
if (cost > 0)
|
||||||
|
ret *= cost * 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user