mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
Update FML:d075dafd075dafMerge branch 'master' into snapshot15 Fix up compilation and patching errors1bd6847Fix up packages.csv ordering for easier diffingdd832f2Update for MCP7.30c - fixes redstone rendering issuesaebf6ebAdd in a registry method to allow for alternative TileEntity names- they will be used to support loading maps containing the older definiti8921cfeRemember to add the new patches!cd67596The "ServerStarting" event should now properly crash the server if it fails, so the client will properly exit. Also, added in a "pre-servere1c6630Javadoc cleanup5ce4e31Fix breaking changea99c488Merge branch 'patch-1' of https://github.com/bspkrs/FML into gh-updates94282c5Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates7ad8529Update MCP to MCP7.26a and refresh MCP names15534edUpdate address of the FML repository to the new location in all the filesaa822e3Fix logical error in comment texta14ab91Update license text to make clear that FML is not a way to sidestep MCP licensing.0165742Fix mcp conf md5 signatures for the snapshot26a5b31FMLLogFormatter: dynamic log level name
119 lines
4.8 KiB
Diff
119 lines
4.8 KiB
Diff
--- ../src_base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
|
|
+++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
|
|
@@ -9,6 +9,7 @@
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.inventory.ISidedInventory;
|
|
import net.minecraft.item.Item;
|
|
+import net.minecraft.item.ItemBlock;
|
|
import net.minecraft.item.ItemHoe;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.item.ItemSword;
|
|
@@ -16,8 +17,9 @@
|
|
import net.minecraft.item.crafting.FurnaceRecipes;
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
import net.minecraft.nbt.NBTTagList;
|
|
-
|
|
-public class TileEntityFurnace extends TileEntity implements ISidedInventory
|
|
+import net.minecraftforge.common.ForgeDirection;
|
|
+
|
|
+public class TileEntityFurnace extends TileEntity implements ISidedInventory, net.minecraftforge.common.ISidedInventory
|
|
{
|
|
/**
|
|
* The ItemStacks that hold the items currently being used in the furnace
|
|
@@ -268,8 +270,7 @@
|
|
|
|
if (this.furnaceItemStacks[1].stackSize == 0)
|
|
{
|
|
- Item item = this.furnaceItemStacks[1].getItem().getContainerItem();
|
|
- this.furnaceItemStacks[1] = item != null ? new ItemStack(item) : null;
|
|
+ this.furnaceItemStacks[1] = this.furnaceItemStacks[1].getItem().getContainerItemStack(furnaceItemStacks[1]);
|
|
}
|
|
}
|
|
}
|
|
@@ -315,8 +316,12 @@
|
|
}
|
|
else
|
|
{
|
|
- ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0].getItem().itemID);
|
|
- return itemstack == null ? false : (this.furnaceItemStacks[2] == null ? true : (!this.furnaceItemStacks[2].isItemEqual(itemstack) ? false : (this.furnaceItemStacks[2].stackSize < this.getInventoryStackLimit() && this.furnaceItemStacks[2].stackSize < this.furnaceItemStacks[2].getMaxStackSize() ? true : this.furnaceItemStacks[2].stackSize < itemstack.getMaxStackSize())));
|
|
+ ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);
|
|
+ if (itemstack == null) return false;
|
|
+ if (this.furnaceItemStacks[2] == null) return true;
|
|
+ if (!this.furnaceItemStacks[2].isItemEqual(itemstack)) return false;
|
|
+ int result = furnaceItemStacks[2].stackSize + itemstack.stackSize;
|
|
+ return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize());
|
|
}
|
|
}
|
|
|
|
@@ -327,15 +332,15 @@
|
|
{
|
|
if (this.canSmelt())
|
|
{
|
|
- ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0].getItem().itemID);
|
|
+ ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);
|
|
|
|
if (this.furnaceItemStacks[2] == null)
|
|
{
|
|
this.furnaceItemStacks[2] = itemstack.copy();
|
|
}
|
|
- else if (this.furnaceItemStacks[2].itemID == itemstack.itemID)
|
|
- {
|
|
- ++this.furnaceItemStacks[2].stackSize;
|
|
+ else if (this.furnaceItemStacks[2].isItemEqual(itemstack))
|
|
+ {
|
|
+ furnaceItemStacks[2].stackSize += itemstack.stackSize;
|
|
}
|
|
|
|
--this.furnaceItemStacks[0].stackSize;
|
|
@@ -362,7 +367,7 @@
|
|
int i = par0ItemStack.getItem().itemID;
|
|
Item item = par0ItemStack.getItem();
|
|
|
|
- if (i < 256 && Block.blocksList[i] != null)
|
|
+ if (par0ItemStack.getItem() instanceof ItemBlock && Block.blocksList[i] != null)
|
|
{
|
|
Block block = Block.blocksList[i];
|
|
|
|
@@ -423,4 +428,41 @@
|
|
{
|
|
return 1;
|
|
}
|
|
+
|
|
+ /***********************************************************************************
|
|
+ * This function is here for compatibilities sake, Modders should Check for
|
|
+ * Sided before ContainerWorldly, Vanilla Minecraft does not follow the sided standard
|
|
+ * that Modding has for a while.
|
|
+ *
|
|
+ * In vanilla:
|
|
+ *
|
|
+ * Top: Ores
|
|
+ * Sides: Fuel
|
|
+ * Bottom: Output
|
|
+ *
|
|
+ * Standard Modding:
|
|
+ * Top: Ores
|
|
+ * Sides: Output
|
|
+ * Bottom: Fuel
|
|
+ *
|
|
+ * The Modding one is designed after the GUI, the vanilla one is designed because its
|
|
+ * intended use is for the hopper, which logically would take things in from the top.
|
|
+ *
|
|
+ * This will possibly be removed in future updates, and make vanilla the definitive
|
|
+ * standard.
|
|
+ */
|
|
+
|
|
+ @Override
|
|
+ public int getStartInventorySide(ForgeDirection side)
|
|
+ {
|
|
+ if (side == ForgeDirection.DOWN) return 1;
|
|
+ if (side == ForgeDirection.UP) return 0;
|
|
+ return 2;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getSizeInventorySide(ForgeDirection side)
|
|
+ {
|
|
+ return 1;
|
|
+ }
|
|
}
|