mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 23:13:15 +00:00
35 lines
1.9 KiB
Diff
35 lines
1.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
|
|
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
|
|
@@ -223,8 +223,7 @@
|
|
|
|
if (this.field_145957_n[1].stackSize == 0)
|
|
{
|
|
- Item item = this.field_145957_n[1].getItem().getContainerItem();
|
|
- this.field_145957_n[1] = item != null ? new ItemStack(item) : null;
|
|
+ this.field_145957_n[1] = field_145957_n[1].getItem().getContainerItem(field_145957_n[1]);
|
|
}
|
|
}
|
|
}
|
|
@@ -268,7 +267,11 @@
|
|
else
|
|
{
|
|
ItemStack itemstack = FurnaceRecipes.smelting().func_151395_a(this.field_145957_n[0]);
|
|
- return itemstack == null ? false : (this.field_145957_n[2] == null ? true : (!this.field_145957_n[2].isItemEqual(itemstack) ? false : (this.field_145957_n[2].stackSize < this.getInventoryStackLimit() && this.field_145957_n[2].stackSize < this.field_145957_n[2].getMaxStackSize() ? true : this.field_145957_n[2].stackSize < itemstack.getMaxStackSize())));
|
|
+ if (itemstack == null) return false;
|
|
+ if (this.field_145957_n[2] == null) return true;
|
|
+ if (!this.field_145957_n[2].isItemEqual(itemstack)) return false;
|
|
+ int result = field_145957_n[2].stackSize + itemstack.stackSize;
|
|
+ return result < getInventoryStackLimit() && result <= this.field_145957_n[2].getMaxStackSize(); //Forge BugFix: Make it respect stack sizes properly.
|
|
}
|
|
}
|
|
|
|
@@ -284,7 +287,7 @@
|
|
}
|
|
else if (this.field_145957_n[2].getItem() == itemstack.getItem())
|
|
{
|
|
- ++this.field_145957_n[2].stackSize;
|
|
+ this.field_145957_n[2].stackSize += itemstack.stackSize; // Forge BugFix: Results may have multiple items
|
|
}
|
|
|
|
--this.field_145957_n[0].stackSize;
|