renamed addSlot to addSlotToContainer

This commit is contained in:
Krapht 2012-08-11 18:20:21 +02:00
parent b22facb873
commit 60cb683d27
11 changed files with 41 additions and 41 deletions

View file

@ -31,20 +31,20 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer {
this.library = library; this.library = library;
// if (player.username.equals(library.owner)) { // if (player.username.equals(library.owner)) {
addSlot(new Slot(library, 0, 153, 61)); addSlotToContainer(new Slot(library, 0, 153, 61));
addSlot(new Slot(library, 1, 109, 61)); addSlotToContainer(new Slot(library, 1, 109, 61));
// } // }
addSlot(new Slot(library, 2, 109, 79)); addSlotToContainer(new Slot(library, 2, 109, 79));
addSlot(new Slot(library, 3, 153, 79)); addSlotToContainer(new Slot(library, 3, 153, 79));
// Player inventory // Player inventory
for (int l = 0; l < 3; l++) for (int l = 0; l < 3; l++)
for (int k1 = 0; k1 < 9; k1++) for (int k1 = 0; k1 < 9; k1++)
addSlot(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 140 + l * 18)); addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 140 + l * 18));
for (int i1 = 0; i1 < 9; i1++) for (int i1 = 0; i1 < 9; i1++)
addSlot(new Slot(playerInventory, i1, 8 + i1 * 18, 198)); addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 198));
} }
@Override @Override

View file

@ -24,24 +24,24 @@ class CraftingBuilder extends BuildCraftContainer {
this.playerIInventory = playerInventory; this.playerIInventory = playerInventory;
this.builder = builder; this.builder = builder;
addSlot(new Slot(builder, 0, 80, 27)); addSlotToContainer(new Slot(builder, 0, 80, 27));
for (int k = 0; k < 3; k++) { for (int k = 0; k < 3; k++) {
for (int j1 = 0; j1 < 9; j1++) { for (int j1 = 0; j1 < 9; j1++) {
addSlot(new Slot(builder, 1 + j1 + k * 9, 8 + j1 * 18, 72 + k * 18)); addSlotToContainer(new Slot(builder, 1 + j1 + k * 9, 8 + j1 * 18, 72 + k * 18));
} }
} }
for (int l = 0; l < 3; l++) { for (int l = 0; l < 3; l++) {
for (int k1 = 0; k1 < 9; k1++) { for (int k1 = 0; k1 < 9; k1++) {
addSlot(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 140 + l * 18)); addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 140 + l * 18));
} }
} }
for (int i1 = 0; i1 < 9; i1++) { for (int i1 = 0; i1 < 9; i1++) {
addSlot(new Slot(playerInventory, i1, 8 + i1 * 18, 198)); addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 198));
} }
} }

View file

@ -26,25 +26,25 @@ class CraftingFiller extends BuildCraftContainer {
for (int k = 0; k < 3; k++) { for (int k = 0; k < 3; k++) {
for (int j1 = 0; j1 < 3; j1++) { for (int j1 = 0; j1 < 3; j1++) {
addSlot(new Slot(fillerInventory, j1 + k * 3, 31 + j1 * 18, 16 + k * 18)); addSlotToContainer(new Slot(fillerInventory, j1 + k * 3, 31 + j1 * 18, 16 + k * 18));
} }
} }
for (int k = 0; k < 3; k++) { for (int k = 0; k < 3; k++) {
for (int j1 = 0; j1 < 9; j1++) { for (int j1 = 0; j1 < 9; j1++) {
addSlot(new Slot(fillerInventory, 9 + j1 + k * 9, 8 + j1 * 18, 85 + k * 18)); addSlotToContainer(new Slot(fillerInventory, 9 + j1 + k * 9, 8 + j1 * 18, 85 + k * 18));
} }
} }
for (int l = 0; l < 3; l++) { for (int l = 0; l < 3; l++) {
for (int k1 = 0; k1 < 9; k1++) { for (int k1 = 0; k1 < 9; k1++) {
addSlot(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 153 + l * 18)); addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 153 + l * 18));
} }
} }
for (int i1 = 0; i1 < 9; i1++) { for (int i1 = 0; i1 < 9; i1++) {
addSlot(new Slot(playerInventory, i1, 8 + i1 * 18, 211)); addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 211));
} }
} }

View file

@ -25,18 +25,18 @@ public class CraftingTemplateRoot extends BuildCraftContainer {
this.playerIInventory = playerInventory; this.playerIInventory = playerInventory;
this.template = template; this.template = template;
addSlot(new Slot(template, 0, 55, 35)); addSlotToContainer(new Slot(template, 0, 55, 35));
addSlot(new Slot(template, 1, 114, 35)); addSlotToContainer(new Slot(template, 1, 114, 35));
for (int l = 0; l < 3; l++) { for (int l = 0; l < 3; l++) {
for (int k1 = 0; k1 < 9; k1++) { for (int k1 = 0; k1 < 9; k1++) {
addSlot(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 84 + l * 18)); addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 84 + l * 18));
} }
} }
for (int i1 = 0; i1 < 9; i1++) { for (int i1 = 0; i1 < 9; i1++) {
addSlot(new Slot(playerInventory, i1, 8 + i1 * 18, 142)); addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 142));
} }
} }

View file

@ -22,20 +22,20 @@ public class ContainerEngineRoot extends BuildCraftContainer {
engine = tileEngine; engine = tileEngine;
if (tileEngine.engine instanceof EngineStone) { if (tileEngine.engine instanceof EngineStone) {
addSlot(new Slot(tileEngine, 0, 80, 41)); addSlotToContainer(new Slot(tileEngine, 0, 80, 41));
} else { } else {
addSlot(new Slot(tileEngine, 0, 52, 41)); addSlotToContainer(new Slot(tileEngine, 0, 52, 41));
} }
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
for (int k = 0; k < 9; k++) { for (int k = 0; k < 9; k++) {
addSlot(new Slot(inventoryplayer, k + i * 9 + 9, 8 + k * 18, 84 + i * 18)); addSlotToContainer(new Slot(inventoryplayer, k + i * 9 + 9, 8 + k * 18, 84 + i * 18));
} }
} }
for (int j = 0; j < 9; j++) { for (int j = 0; j < 9; j++) {
addSlot(new Slot(inventoryplayer, j, 8 + j * 18, 142)); addSlotToContainer(new Slot(inventoryplayer, j, 8 + j * 18, 142));
} }
} }

View file

@ -82,23 +82,23 @@ public class ContainerAutoWorkbench extends BuildCraftContainer {
craftResult = new InventoryCraftResult(); craftResult = new InventoryCraftResult();
this.tile = tile; this.tile = tile;
addSlot(new SlotAutoCrafting(inventoryplayer.player, tile, craftResult, 0, 124, 35)); addSlotToContainer(new SlotAutoCrafting(inventoryplayer.player, tile, craftResult, 0, 124, 35));
for (int l = 0; l < 3; l++) { for (int l = 0; l < 3; l++) {
for (int k1 = 0; k1 < 3; k1++) { for (int k1 = 0; k1 < 3; k1++) {
addSlot(new Slot(tile, k1 + l * 3, 30 + k1 * 18, 17 + l * 18)); addSlotToContainer(new Slot(tile, k1 + l * 3, 30 + k1 * 18, 17 + l * 18));
} }
} }
for (int i1 = 0; i1 < 3; i1++) { for (int i1 = 0; i1 < 3; i1++) {
for (int l1 = 0; l1 < 9; l1++) { for (int l1 = 0; l1 < 9; l1++) {
addSlot(new Slot(inventoryplayer, l1 + i1 * 9 + 9, 8 + l1 * 18, 84 + i1 * 18)); addSlotToContainer(new Slot(inventoryplayer, l1 + i1 * 9 + 9, 8 + l1 * 18, 84 + i1 * 18));
} }
} }
for (int j1 = 0; j1 < 9; j1++) { for (int j1 = 0; j1 < 9; j1++) {
addSlot(new Slot(inventoryplayer, j1, 8 + j1 * 18, 142)); addSlotToContainer(new Slot(inventoryplayer, j1, 8 + j1 * 18, 142));
} }
onCraftMatrixChanged(tile); onCraftMatrixChanged(tile);

View file

@ -17,20 +17,20 @@ public class ContainerHopper extends BuildCraftContainer {
hopper = tile; hopper = tile;
// Adding hopper inventory // Adding hopper inventory
addSlot(new Slot(tile, 0, 62, 18)); addSlotToContainer(new Slot(tile, 0, 62, 18));
addSlot(new Slot(tile, 1, 80, 18)); addSlotToContainer(new Slot(tile, 1, 80, 18));
addSlot(new Slot(tile, 2, 98, 18)); addSlotToContainer(new Slot(tile, 2, 98, 18));
addSlot(new Slot(tile, 3, 80, 36)); addSlotToContainer(new Slot(tile, 3, 80, 36));
// Player inventory // Player inventory
for (int i1 = 0; i1 < 3; i1++) for (int i1 = 0; i1 < 3; i1++)
for (int l1 = 0; l1 < 9; l1++) { for (int l1 = 0; l1 < 9; l1++) {
addSlot(new Slot(inventory, l1 + i1 * 9 + 9, 8 + l1 * 18, 71 + i1 * 18)); addSlotToContainer(new Slot(inventory, l1 + i1 * 9 + 9, 8 + l1 * 18, 71 + i1 * 18));
} }
// Player hotbar // Player hotbar
for (int j1 = 0; j1 < 9; j1++) for (int j1 = 0; j1 < 9; j1++)
addSlot(new Slot(inventory, j1, 8 + j1 * 18, 129)); addSlotToContainer(new Slot(inventory, j1, 8 + j1 * 18, 129));
} }

View file

@ -28,12 +28,12 @@ public class ContainerRefinery extends BuildCraftContainer {
for (int l = 0; l < 3; l++) { for (int l = 0; l < 3; l++) {
for (int k1 = 0; k1 < 9; k1++) { for (int k1 = 0; k1 < 9; k1++) {
addSlot(new Slot(inventory, k1 + l * 9 + 9, 8 + k1 * 18, 123 + l * 18)); addSlotToContainer(new Slot(inventory, k1 + l * 9 + 9, 8 + k1 * 18, 123 + l * 18));
} }
} }
for (int i1 = 0; i1 < 9; i1++) { for (int i1 = 0; i1 < 9; i1++) {
addSlot(new Slot(inventory, i1, 8 + i1 * 18, 181)); addSlotToContainer(new Slot(inventory, i1, 8 + i1 * 18, 181));
} }
this.refinery = refinery; this.refinery = refinery;

View file

@ -30,20 +30,20 @@ class ContainerAssemblyTable extends BuildCraftContainer {
for (int l = 0; l < 4; l++) { for (int l = 0; l < 4; l++) {
for (int k1 = 0; k1 < 3; k1++) { for (int k1 = 0; k1 < 3; k1++) {
addSlot(new Slot(table, k1 + l * 3, 8 + k1 * 18, 36 + l * 18)); addSlotToContainer(new Slot(table, k1 + l * 3, 8 + k1 * 18, 36 + l * 18));
} }
} }
for (int l = 0; l < 3; l++) { for (int l = 0; l < 3; l++) {
for (int k1 = 0; k1 < 9; k1++) { for (int k1 = 0; k1 < 9; k1++) {
addSlot(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 123 + l * 18)); addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 123 + l * 18));
} }
} }
for (int i1 = 0; i1 < 9; i1++) { for (int i1 = 0; i1 < 9; i1++) {
addSlot(new Slot(playerInventory, i1, 8 + i1 * 18, 181)); addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 181));
} }
this.table = table; this.table = table;

View file

@ -26,10 +26,10 @@ class CraftingDiamondPipe extends BuildCraftContainer {
for (int l = 0; l < 3; l++) for (int l = 0; l < 3; l++)
for (int k1 = 0; k1 < 9; k1++) for (int k1 = 0; k1 < 9; k1++)
addSlot(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 140 + l * 18)); addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 140 + l * 18));
for (int i1 = 0; i1 < 9; i1++) for (int i1 = 0; i1 < 9; i1++)
addSlot(new Slot(playerInventory, i1, 8 + i1 * 18, 198)); addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 198));
} }
@Override @Override

View file

@ -53,10 +53,10 @@ public class CraftingGateInterface extends BuildCraftContainer {
for (int l = 0; l < 3; l++) for (int l = 0; l < 3; l++)
for (int k1 = 0; k1 < 9; k1++) for (int k1 = 0; k1 < 9; k1++)
addSlot(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 123 + l * 18)); addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 123 + l * 18));
for (int i1 = 0; i1 < 9; i1++) for (int i1 = 0; i1 < 9; i1++)
addSlot(new Slot(playerInventory, i1, 8 + i1 * 18, 181)); addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 181));
this.pipe = pipe; this.pipe = pipe;