Class InventoryTileEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.pixelmonmod.pixelmon.blocks.tileentity.InventoryTileEntity
- All Implemented Interfaces:
IBasicInventory,net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
BoxTileEntity,EndTableTileEntity,FridgeTileEntity,MowerTileEntity
public abstract class InventoryTileEntity
extends net.minecraft.world.level.block.entity.BlockEntity
implements IBasicInventory, net.minecraft.world.MenuProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZEFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInventoryTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, String inventoryName, int rows, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddToInventory(net.minecraft.world.item.ItemStack stack) net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int id, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player) intnet.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>net.minecraft.network.chat.Componentnet.minecraft.world.item.ItemStackgetItem(int index) intbooleanbooleanisEmpty()voidload(net.minecraft.nbt.CompoundTag nbt) net.minecraft.world.item.ItemStackremoveItem(int index, int count) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int index) voidsaveAdditional(net.minecraft.nbt.CompoundTag nbt) voidsetItem(int index, net.minecraft.world.item.ItemStack stack) booleanstillValid(net.minecraft.world.entity.player.Player player) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, hasAnyMatching, hasAnyOf, setChangedMethods inherited from interface com.pixelmonmod.pixelmon.blocks.tileentity.IBasicInventory
canPlaceItem, clearContent, startOpen, stopOpenMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Constructor Details
-
InventoryTileEntity
protected InventoryTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, String inventoryName, int rows, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
-
-
Method Details
-
getContents
public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getContents() -
load
public void load(net.minecraft.nbt.CompoundTag nbt) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
addToInventory
public boolean addToInventory(net.minecraft.world.item.ItemStack stack) -
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag nbt) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int index) - Specified by:
getItemin interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int index, int count) - Specified by:
removeItemin interfacenet.minecraft.world.Container- Specified by:
removeItemin interfaceIBasicInventory
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int index) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
setItem
public void setItem(int index, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSizein interfacenet.minecraft.world.Container- Specified by:
getMaxStackSizein interfaceIBasicInventory
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container
-
getCustomName
-
hasCustomName
public boolean hasCustomName() -
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()- Specified by:
getDisplayNamein interfacenet.minecraft.world.MenuProvider
-
createMenu
public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int id, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player) - Specified by:
createMenuin interfacenet.minecraft.world.inventory.MenuConstructor
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-