Package info.u_team.u_team_core.menu
Klasse UBlockEntityContainerMenu<T extends net.minecraft.world.level.block.entity.BlockEntity>
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
info.u_team.u_team_core.menu.UAbstractContainerMenu
info.u_team.u_team_core.menu.FluidContainerMenu
info.u_team.u_team_core.menu.UContainerMenu
info.u_team.u_team_core.menu.UBlockEntityContainerMenu<T>
public abstract class UBlockEntityContainerMenu<T extends net.minecraft.world.level.block.entity.BlockEntity>
extends UContainerMenu
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen info.u_team.u_team_core.menu.FluidContainerMenu
FluidContainerMenu.FluidContainerDelegator -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected final Tprotected final net.minecraft.world.entity.player.InventoryVon Klasse geerbte Felder net.minecraft.world.inventory.AbstractContainerMenu
CARRIED_SLOT_SIZE, containerId, lastSlots, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungUBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.FriendlyByteBuf buffer) This is the client constructor.UBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.FriendlyByteBuf buffer, boolean callInit) This is the client constructor.UBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, T blockEntity) This is the server constructor.UBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, T blockEntity, boolean callInit) This is the server constructor. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGets the block entityprotected abstract voidinit(NetworkEnvironment environment) Is called after the server and client constructor.Von Klasse geerbte Methoden info.u_team.u_team_core.menu.UContainerMenu
addDataHolderToClient, addDataHolderToServer, broadcastChanges, broadcastChangesToServer, sendAllDataToRemote, setDataHolder, stillValidVon Klasse geerbte Methoden info.u_team.u_team_core.menu.FluidContainerMenu
broadcastFullState, getDelegatorVon Klasse geerbte Methoden info.u_team.u_team_core.menu.UAbstractContainerMenu
addPlayerInventory, addSlots, addSlots, getLastSlots, getSynchronizerPlayer, initMenu, setSynchronizerPlayerVon Klasse geerbte Methoden net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, quickMoveStack, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Felddetails
-
playerInventory
protected final net.minecraft.world.entity.player.Inventory playerInventory -
blockEntity
-
-
Konstruktordetails
-
UBlockEntityContainerMenu
public UBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, T blockEntity) This is the server constructor. The methodinit(NetworkEnvironment)is called.- Parameter:
menuType- Menu typecontainerId- Container idplayerInventory- Player inventoryblockEntity- Block entity
-
UBlockEntityContainerMenu
public UBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, T blockEntity, boolean callInit) This is the server constructor.- Parameter:
menuType- Menu typecontainerId- Container idplayerInventory- Player inventoryblockEntity- Block entitycallInit- If the constructor should callinit(NetworkEnvironment)
-
UBlockEntityContainerMenu
public UBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.FriendlyByteBuf buffer) This is the client constructor. This methods reads the block entity pos from the suppliedFriendlyByteBufand tries to get the block entity at the client side. The block pos must be the first entry in the buffer! The methodinit(NetworkEnvironment)is called.- Parameter:
menuType- Menu typecontainerId- Container idplayerInventory- Player inventorybuffer- Initial menu data (specified withMenuUtil.openMenu(net.minecraft.server.level.ServerPlayer, net.minecraft.world.MenuProvider, java.util.function.Consumer, boolean))
-
UBlockEntityContainerMenu
public UBlockEntityContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.FriendlyByteBuf buffer, boolean callInit) This is the client constructor. This methods reads the block entity pos from the suppliedFriendlyByteBufand tries to get the block entity at the client side. The block pos must be the first entry in the buffer!- Parameter:
menuType- Menu typecontainerId- Container idplayerInventory- Player inventorybuffer- Initial menu data (specified withMenuUtil.openMenu(net.minecraft.server.level.ServerPlayer, net.minecraft.world.MenuProvider, java.util.function.Consumer, boolean))callInit- If the constructor should callinit(NetworkEnvironment)
-
-
Methodendetails
-
init
Is called after the server and client constructor. If you want to use your own fields in the init method, set the last constructor boolean to false and then call this method in all constructors of the implementing class.- Parameter:
environment- Logical side this method is called on
-
getBlockEntity
Gets the block entity- Gibt zurück:
- Block entity associated with this menu
-