public class ContainerBackpack
extends net.minecraft.inventory.Container
| Constructor and Description |
|---|
ContainerBackpack(net.minecraft.entity.player.EntityPlayer entityPlayer,
InventoryBackpack backpackInventory,
BackpackTypes type) |
ContainerBackpack(net.minecraft.entity.player.EntityPlayer entityPlayer,
InventoryBackpack backpackInventory,
BackpackTypes type,
int xSize,
int ySize) |
| Modifier and Type | Method and Description |
|---|---|
void |
backpackToInventory()
Moves items from the backpack to the player's inventory
|
boolean |
canInteractWith(net.minecraft.entity.player.EntityPlayer player) |
InventoryBackpack |
getInventoryBackpack() |
int |
getNumColumns() |
net.minecraft.entity.player.EntityPlayer |
getPlayer() |
BackpackTypes |
getType() |
boolean |
getVerticalButtons() |
void |
hotbarToBackpack()
Moves items from the player's hotbar to the backpack
|
void |
inventoryToBackpack()
Moves items from the player's inventory to the backpack
|
protected void |
layoutContainer(net.minecraft.inventory.IInventory playerInventory,
net.minecraft.inventory.IInventory backpackInventory,
int xSize,
int ySize,
BackpackTypes type)
Adds the slots to the continer.
|
void |
onContainerClosed(net.minecraft.entity.player.EntityPlayer player) |
void |
save(net.minecraft.entity.player.EntityPlayer player)
Saves via updating the inventory.
|
net.minecraft.item.ItemStack |
slotClick(int slot,
int button,
int flag,
net.minecraft.entity.player.EntityPlayer player) |
void |
sort()
Sorts the backpack by merging the stacks that can be, swapping out empty spaced to condense the pack, and then reorders via alphabetization of the stacks' display names.
|
net.minecraft.item.ItemStack |
transferStackInSlot(net.minecraft.entity.player.EntityPlayer p,
int i) |
net.minecraft.item.ItemStack |
transferStackInSlot(net.minecraft.item.ItemStack itemToPutInBackpack)
Checks if the item can be put into the backpack
|
addSlotToContainer, calcRedstone, calcRedstoneFromInventory, canAddItemToSlot, canDragIntoSlot, canMergeSlot, computeStackSize, detectAndSendChanges, enchantItem, extractDragMode, func_94534_d, getCanCraft, getDragEvent, getInventory, getNextTransactionID, getSlot, getSlotFromInventory, isValidDragMode, mergeItemStack, onCraftGuiOpened, onCraftMatrixChanged, putStackInSlot, putStacksInSlots, removeCraftingFromCrafters, resetDrag, retrySlotClick, setCanCraft, updateProgressBarpublic ContainerBackpack(net.minecraft.entity.player.EntityPlayer entityPlayer,
InventoryBackpack backpackInventory,
BackpackTypes type,
int xSize,
int ySize)
public ContainerBackpack(net.minecraft.entity.player.EntityPlayer entityPlayer,
InventoryBackpack backpackInventory,
BackpackTypes type)
public net.minecraft.entity.player.EntityPlayer getPlayer()
public InventoryBackpack getInventoryBackpack()
public BackpackTypes getType()
protected void layoutContainer(net.minecraft.inventory.IInventory playerInventory,
net.minecraft.inventory.IInventory backpackInventory,
int xSize,
int ySize,
BackpackTypes type)
playerInventory - - the player's inventorybackpackInventory - - the backpack inventoryxSize - - the x locationySize - - the y locationtype - - the backpack's typepublic net.minecraft.item.ItemStack transferStackInSlot(net.minecraft.entity.player.EntityPlayer p,
int i)
transferStackInSlot in class net.minecraft.inventory.Containerpublic net.minecraft.item.ItemStack transferStackInSlot(net.minecraft.item.ItemStack itemToPutInBackpack)
itemToPutInBackpack - - the itemstack to put inpublic boolean canInteractWith(net.minecraft.entity.player.EntityPlayer player)
canInteractWith in class net.minecraft.inventory.Containerpublic void onContainerClosed(net.minecraft.entity.player.EntityPlayer player)
onContainerClosed in class net.minecraft.inventory.Containerpublic net.minecraft.item.ItemStack slotClick(int slot,
int button,
int flag,
net.minecraft.entity.player.EntityPlayer player)
slotClick in class net.minecraft.inventory.Containerpublic void save(net.minecraft.entity.player.EntityPlayer player)
player - - the playerpublic void backpackToInventory()
public void inventoryToBackpack()
public void hotbarToBackpack()
public int getNumColumns()
public boolean getVerticalButtons()
public void sort()