Class RandomizableContainerBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
- All Implemented Interfaces:
Clearable
,Container
,MenuConstructor
,MenuProvider
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
BarrelBlockEntity
,ChestBlockEntity
,DispenserBlockEntity
,HopperBlockEntity
,ShulkerBoxBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected ResourceLocation
protected long
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface net.minecraft.world.Container
LARGE_MAX_STACK_SIZE
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
ModifierConstructorDescriptionprotected
RandomizableContainerBlockEntity
(BlockEntityType<?> p_155629_, BlockPos p_155630_, BlockState p_155631_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
createMenu
(int p_59637_, Inventory p_59638_, Player p_59639_) getItem
(int p_59611_) protected abstract NonNullList<ItemStack>
getItems()
boolean
isEmpty()
removeItem
(int p_59613_, int p_59614_) removeItemNoUpdate
(int p_59630_) void
protected abstract void
setItems
(NonNullList<ItemStack> p_59625_) void
setLootTable
(ResourceLocation p_59627_, long p_59628_) static void
setLootTable
(BlockGetter p_59621_, Random p_59622_, BlockPos p_59623_, ResourceLocation p_59624_) boolean
stillValid
(Player p_59619_) protected boolean
tryLoadLootTable
(CompoundTag p_59632_) protected boolean
trySaveLootTable
(CompoundTag p_59635_) void
unpackLootTable
(Player p_59641_) Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, createMenu, createUnSidedHandler, getCapability, getCustomName, getDefaultName, getDisplayName, getName, invalidateCaps, load, reviveCaps, saveAdditional, setCustomName
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getTileData, 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, 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
canPlaceItem, countItem, getContainerSize, getMaxStackSize, hasAnyOf, setChanged, startOpen, stopOpen
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
LOOT_TABLE_TAG
- See Also:
-
LOOT_TABLE_SEED_TAG
- See Also:
-
lootTable
-
lootTableSeed
protected long lootTableSeed
-
-
Constructor Details
-
RandomizableContainerBlockEntity
protected RandomizableContainerBlockEntity(BlockEntityType<?> p_155629_, BlockPos p_155630_, BlockState p_155631_)
-
-
Method Details
-
setLootTable
public static void setLootTable(BlockGetter p_59621_, Random p_59622_, BlockPos p_59623_, ResourceLocation p_59624_) -
tryLoadLootTable
-
trySaveLootTable
-
unpackLootTable
-
setLootTable
-
isEmpty
public boolean isEmpty() -
getItem
-
removeItem
-
removeItemNoUpdate
-
setItem
-
stillValid
-
clearContent
public void clearContent() -
getItems
-
setItems
-
canOpen
- Overrides:
canOpen
in classBaseContainerBlockEntity
-
createMenu
@Nullable public AbstractContainerMenu createMenu(int p_59637_, Inventory p_59638_, Player p_59639_) - Specified by:
createMenu
in interfaceMenuConstructor
- Overrides:
createMenu
in classBaseContainerBlockEntity
-