Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ProperContainer extends Container {
- public ProperContainer(InventoryPlayer playerinv, IInventory holder, int[] coords){
- assert(coords.length %2 == 0);
- bind(this, playerinv);
- int x, y;
- for(int i=0; i!=coords.length; i+=2){
- x= coords[i];
- y= coords[i+1];
- addSlotToContainer(new Slot(holder, i, x, y));
- }
- }
- @Override
- public boolean canInteractWith(EntityPlayer var1) {return true; }
- public static void bind(ProperContainer cont, InventoryPlayer playerinv){
- for (int x = 0; x < 9; x++) {
- cont.addSlotToContainer(new Slot(playerinv, x, 8+x*18, 126)); }
- for (int y = 0; y < 3; y++) {
- for (int x = 0; x < 9; x++) {
- cont.addSlotToContainer(new Slot(playerinv, y*9+x+9, 8+x*18, 68+y*18)); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement