Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.server;
- public abstract class ContainerNormal extends Container {
- public ProperContainer(InventoryPlayer playerinv, IInventory holder, int[][] coords) {
- bindPlayerInventory(playerinv);
- setupSlots(holder, coords);
- }
- public ProperContainer(InventoryPlayer playerinv) {
- bindPlayerInventory(playerinv);
- }
- public void bindPlayerInventory(InventoryPlayer playerinv) {
- for (int x = 0; x < 9; x++) {
- addSlotToContainer(new Slot(playerinv, x, 8+x*18, 126));
- }
- for (int y = 0; y < 3; y++) {
- for (int x = 0; x < 9; x++) {
- addSlotToContainer(new Slot(playerinv, y*9+x+9, 8+x*18, 68+y*18));
- }
- }
- }
- public void setupSlots(IInventory holder, int[][] coords) {
- for(int i = 0; i < coords.length; i++) {
- addSlotToContainer(new Slot(holder, i, coords[i][0], coords[i][1]));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement