Implemented ISidedInventory for Brewing Stands.

Top is input, 1 slot
All other sides are output, 3 slots.
This commit is contained in:
LexManos 2011-12-19 06:33:20 +00:00
parent 8c9762fd9a
commit c84b8740b4
2 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,35 @@
--- ../src_base/minecraft/net/minecraft/src/TileEntityBrewingStand.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft/net/minecraft/src/TileEntityBrewingStand.java 0000-00-00 00:00:00.000000000 -0000
@@ -4,6 +4,8 @@
package net.minecraft.src;
+import net.minecraft.src.forge.ISidedInventory;
+
// Referenced classes of package net.minecraft.src:
// TileEntity, IInventory, ItemStack, World,
@@ -11,7 +13,7 @@
// NBTTagList, EntityPlayer
public class TileEntityBrewingStand extends TileEntity
- implements IInventory
+ implements IInventory, ISidedInventory
{
private ItemStack brewingItemStacks[];
@@ -280,4 +282,14 @@
return i;
}
+
+ @Override
+ public int getStartInventorySide(int side) {
+ return (side == 1 ? 3 : 0);
+ }
+
+ @Override
+ public int getSizeInventorySide(int side) {
+ return (side == 1 ? 1 : 3);
+ }
}

View file

@ -0,0 +1,37 @@
--- ../src_base/minecraft_server/net/minecraft/src/TileEntityBrewingStand.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft_server/net/minecraft/src/TileEntityBrewingStand.java 0000-00-00 00:00:00.000000000 -0000
@@ -4,6 +4,8 @@
package net.minecraft.src;
+import net.minecraft.src.forge.ISidedInventory;
+
// Referenced classes of package net.minecraft.src:
// TileEntity, IInventory, ItemStack, World,
@@ -11,7 +13,7 @@
// NBTTagList, EntityPlayer
public class TileEntityBrewingStand extends TileEntity
- implements IInventory
+ implements IInventory, ISidedInventory
{
private ItemStack field_40083_a[];
@@ -274,5 +276,15 @@
}
return i;
- }
+ }
+
+ @Override
+ public int getStartInventorySide(int side) {
+ return (side == 1 ? 3 : 0);
+ }
+
+ @Override
+ public int getSizeInventorySide(int side) {
+ return (side == 1 ? 1 : 3);
+ }
}