public abstract class UTileEntityContainer<T extends net.minecraft.tileentity.TileEntity> extends UContainer
UContainer.SlotHandlerFunction, UContainer.SlotInventoryFunction| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.entity.player.PlayerInventory |
playerInventory |
protected T |
tileEntity |
| Constructor and Description |
|---|
UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
net.minecraft.network.PacketBuffer buffer)
This is the client constructor for the container.
|
UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
net.minecraft.network.PacketBuffer buffer,
boolean init)
This is the client constructor for the container.
|
UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
T tileEntity)
This is the server constructor for the container.
|
UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
T tileEntity,
boolean init)
This is the server constructor for the container.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getTileEntity()
Gets the tile entity
|
protected abstract void |
init(boolean server)
Is called after the server and client constructor.
|
addClientToServerTracker, addServerToClientTracker, appendInventory, appendInventory, appendInventory, appendInventory, appendPlayerInventory, canInteractWith, detectAndSendChanges, updateTrackedServerToClient, updateValueaddListener, addSlot, areItemsAndTagsEqual, assertIntArraySize, assertInventorySize, calcRedstone, calcRedstoneFromInventory, canAddItemToSlot, canDragIntoSlot, canMergeSlot, clearContainer, computeStackSize, enchantItem, extractDragMode, getCanCraft, getDragEvent, getInventory, getNextTransactionID, getQuickcraftMask, getSlot, getType, isValidDragMode, isWithinUsableDistance, mergeItemStack, onContainerClosed, onCraftMatrixChanged, putStackInSlot, removeListener, resetDrag, setAll, setCanCraft, slotClick, trackInt, trackIntArray, transferStackInSlot, updateProgressBarprotected final net.minecraft.entity.player.PlayerInventory playerInventory
protected final T extends net.minecraft.tileentity.TileEntity tileEntity
public UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
T tileEntity)
init(boolean) is called.type - Container typeid - Window idplayerInventory - Player inventorytileEntity - Tile entitypublic UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
T tileEntity,
boolean init)
type - Container typeid - Window idplayerInventory - Player inventorytileEntity - Tile entityinit - If the constructor should call init(boolean)public UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
net.minecraft.network.PacketBuffer buffer)
getClientTileEntity(PacketBuffer) to get the tile
entity. The init(boolean) is called.type - Container typeid - Window idplayerInventory - Player inventorybuffer - Initial data (specified with
NetworkHooks.openGui(net.minecraft.entity.player.ServerPlayerEntity, net.minecraft.inventory.container.INamedContainerProvider, java.util.function.Consumer))public UTileEntityContainer(net.minecraft.inventory.container.ContainerType<?> type,
int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
net.minecraft.network.PacketBuffer buffer,
boolean init)
getClientTileEntity(PacketBuffer) to get the tile
entity.type - Container typeid - Window idplayerInventory - Player inventorybuffer - Initial data (specified with
NetworkHooks.openGui(net.minecraft.entity.player.ServerPlayerEntity, net.minecraft.inventory.container.INamedContainerProvider, java.util.function.Consumer))init - If the constructor should call init(boolean)protected abstract void init(boolean server)
server - True if its the server side false otherwisepublic T getTileEntity()