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, worldPosition
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
ModifierConstructorDescriptionprotected
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 Summary
Modifier and TypeMethodDescriptionboolean
addToInventory
(net.minecraft.world.item.ItemStack stack) net.minecraft.world.inventory.AbstractContainerMenu
createMenu
(int id, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player) int
net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
net.minecraft.network.chat.Component
net.minecraft.world.item.ItemStack
getItem
(int index) int
boolean
boolean
isEmpty()
void
load
(net.minecraft.nbt.CompoundTag nbt) net.minecraft.world.item.ItemStack
removeItem
(int index, int count) net.minecraft.world.item.ItemStack
removeItemNoUpdate
(int index) void
saveAdditional
(net.minecraft.nbt.CompoundTag nbt) void
setItem
(int index, net.minecraft.world.item.ItemStack stack) boolean
stillValid
(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, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, hasAnyMatching, hasAnyOf, setChanged
Methods inherited from interface com.pixelmonmod.pixelmon.blocks.tileentity.IBasicInventory
canPlaceItem, clearContent, startOpen, stopOpen
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods 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:
load
in 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:
saveAdditional
in classnet.minecraft.world.level.block.entity.BlockEntity
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int index) - Specified by:
getItem
in interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int index, int count) - Specified by:
removeItem
in interfacenet.minecraft.world.Container
- Specified by:
removeItem
in interfaceIBasicInventory
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int index) - Specified by:
removeItemNoUpdate
in interfacenet.minecraft.world.Container
-
setItem
public void setItem(int index, net.minecraft.world.item.ItemStack stack) - Specified by:
setItem
in interfacenet.minecraft.world.Container
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSize
in interfacenet.minecraft.world.Container
- Specified by:
getMaxStackSize
in interfaceIBasicInventory
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValid
in interfacenet.minecraft.world.Container
-
getCustomName
-
hasCustomName
public boolean hasCustomName() -
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()- Specified by:
getDisplayName
in 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:
createMenu
in interfacenet.minecraft.world.inventory.MenuConstructor
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfacenet.minecraft.world.Container
-