mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
make worktable inventory adapter a private static class
This commit is contained in:
1 parent
59b90044b7
commit
4bfb2a3662
1 file changed
+12
-6
@@ -50,12 +50,7 @@ public class TileWorktable extends TileBase implements ICrafter {
|
||||
|
||||
public TileWorktable() {
|
||||
craftingInventory = new TileInventoryAdapter(this, 10, "CraftItems");
|
||||
setInternalInventory(new TileInventoryAdapter(this, 18, "Items") {
|
||||
@Override
|
||||
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
|
||||
return GuiUtil.isIndexInRange(slotIndex, SLOT_INVENTORY_1, SLOT_INVENTORY_COUNT);
|
||||
}
|
||||
});
|
||||
setInternalInventory(new WorktableInventoryAdapter(this));
|
||||
|
||||
memorized = new RecipeMemory();
|
||||
}
|
||||
@@ -212,4 +207,15 @@ public class TileWorktable extends TileBase implements ICrafter {
|
||||
public InventoryAdapter getCraftingInventory() {
|
||||
return craftingInventory;
|
||||
}
|
||||
|
||||
private static class WorktableInventoryAdapter extends TileInventoryAdapter {
|
||||
public WorktableInventoryAdapter(TileWorktable worktable) {
|
||||
super(worktable, 18, "Items");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
|
||||
return GuiUtil.isIndexInRange(slotIndex, SLOT_INVENTORY_1, SLOT_INVENTORY_COUNT);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user