Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Container
- package com.nextlevelminecraft.cad435.ClientDependencies.GUI.GliderGui;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.Container;
- import net.minecraft.inventory.Slot;
- import net.minecraft.item.ItemStack;
- //Slot handling
- public class GliderGuiContainer extends Container {
- public GliderGuiContainer(InventoryPlayer inventoryPlayer)
- {
- //Stick places
- addSlotToContainer(new Slot(inventoryPlayer, 36, -14, 10));
- addSlotToContainer(new Slot(inventoryPlayer, 37, -14, 40));
- addSlotToContainer(new Slot(inventoryPlayer, 38, -14, 70));
- //Belt Places
- addSlotToContainer(new Slot(inventoryPlayer, 39, 39, 63));
- addSlotToContainer(new Slot(inventoryPlayer, 40, 67, 63)); // this crashes the integrated server
- addSlotToContainer(new Slot(inventoryPlayer, 41, 39, 96));
- //Wings
- addSlotToContainer(new Slot(inventoryPlayer, 42, 90, 6));
- addSlotToContainer(new Slot(inventoryPlayer, 43, 31, -5));
- //End-Product
- addSlotToContainer(new Slot(inventoryPlayer, 44, 165, 29));
- //Normal Player Inv
- bindPlayerInventory(inventoryPlayer);
- }
- protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) {
- //Use-Bar
- for (int i = 0; i < 9; i++) {
- addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142 + 24));
- //System.out.println(i);
- }
- //Player-Inventory
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9,
- 8 + j * 18, 84 + 24 + i * 18));
- }
- }
- }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
- @Override
- public ItemStack transferStackInSlot(EntityPlayer player, int slot) {
- //TODO: do the transfer
- return null;
- }
- //Todo: validate if item can stay in slot
- //Todo: drop remaining item(s) on close
- //Todo: destroy Plan on crafting success
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement