A new start. Clean out mantle and copy in stuff from tcon and whatever made sense from the old version

This commit is contained in:
Bernhard Bonigl committed 2015-09-27 22:07:13 +02:00
1 parent dd29c42654
commit bf8988ec62
128 files changed
+3389 -5654

No files matched your search

@@ -0,0 +1,36 @@
package slimeknights.mantle.inventory;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import slimeknights.mantle.tileentity.TileInventory;
public class ContainerSimpleChest extends BaseContainer<TileInventory> {
public ContainerSimpleChest(TileInventory tile, int rows, int columns, InventoryPlayer playerInventory) {
super(tile);
int index = 0;
// chest inventory
for(int i = 0; i < rows; ++i) {
for(int j = 0; j < columns; ++j) {
// safety
if(index > tile.getSizeInventory()) {
break;
}
this.addSlotToContainer(createSlot(tile, index, 8 + j * 18, 18 + i * 18));
index++;
}
}
// player inventory
addPlayerInventory(playerInventory, 17, 86);
}
protected Slot createSlot(IInventory inventory, int index, int x, int y) {
return new Slot(inventory, index, x, y);
}
}