Fixed warning by hasContainerItem()
This commit is contained in:
parent
3945a961ef
commit
5961ce5961
1 changed files with 6 additions and 6 deletions
|
@ -86,13 +86,13 @@ public class TileIronFurnace extends TileLegacyMachineBase
|
||||||
if (this.fuel <= 0 && this.canSmelt()) {
|
if (this.fuel <= 0 && this.canSmelt()) {
|
||||||
this.fuel = this.fuelGague = (int) (TileEntityFurnace.getItemBurnTime(this.getStackInSlot(this.fuelslot)) * 1.25);
|
this.fuel = this.fuelGague = (int) (TileEntityFurnace.getItemBurnTime(this.getStackInSlot(this.fuelslot)) * 1.25);
|
||||||
if (this.fuel > 0) {
|
if (this.fuel > 0) {
|
||||||
if (this.getStackInSlot(this.fuelslot).getItem().hasContainerItem()) // Fuel
|
// Fuel slot
|
||||||
// slot
|
ItemStack fuelStack = this.getStackInSlot(this.fuelslot);
|
||||||
{
|
if (fuelStack.getItem().hasContainerItem(fuelStack)) {
|
||||||
this.setInventorySlotContents(this.fuelslot, new ItemStack(this.getStackInSlot(this.fuelslot).getItem().getContainerItem()));
|
this.setInventorySlotContents(this.fuelslot, new ItemStack(fuelStack.getItem().getContainerItem()));
|
||||||
} else if (this.getStackInSlot(this.fuelslot).getCount() > 1) {
|
} else if (fuelStack.getCount() > 1) {
|
||||||
this.decrStackSize(this.fuelslot, 1);
|
this.decrStackSize(this.fuelslot, 1);
|
||||||
} else if (this.getStackInSlot(this.fuelslot).getCount() == 1) {
|
} else if (fuelStack.getCount() == 1) {
|
||||||
this.setInventorySlotContents(this.fuelslot, ItemStack.EMPTY);
|
this.setInventorySlotContents(this.fuelslot, ItemStack.EMPTY);
|
||||||
}
|
}
|
||||||
updateInventory = true;
|
updateInventory = true;
|
||||||
|
|
Loading…
Reference in a new issue