Class RandomizableContainerBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
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,- RandomizableContainer,- IAttachmentHolder,- IMenuProviderExtension,- IBlockEntityExtension,- INBTSerializable<CompoundTag>
- Direct Known Subclasses:
- BarrelBlockEntity,- ChestBlockEntity,- CrafterBlockEntity,- DispenserBlockEntity,- HopperBlockEntity,- ShulkerBoxBlockEntity
public abstract class RandomizableContainerBlockEntity
extends BaseContainerBlockEntity
implements RandomizableContainer
- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolderAttachmentHolder.AsField
- 
Field SummaryFieldsFields inherited from class net.minecraft.world.level.block.entity.BlockEntitylevel, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolderATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.ContainerDEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZEFields inherited from interface net.minecraft.world.RandomizableContainerLOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedRandomizableContainerBlockEntity(BlockEntityType<?> p_155629_, BlockPos p_155630_, BlockState p_155631_) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanvoidcreateMenu(int p_59637_, Inventory p_59638_, Player p_59639_) getItem(int p_59611_) protected abstract NonNullList<ItemStack>getItems()longbooleanisEmpty()removeItem(int p_59613_, int p_59614_) removeItemNoUpdate(int p_59630_) voidprotected abstract voidsetItems(NonNullList<ItemStack> p_59625_) voidsetLootTable(ResourceLocation p_59627_) voidsetLootTableSeed(long p_309615_) booleanstillValid(Player p_59619_) Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntitycanUnlock, createMenu, getCustomName, getDefaultName, getDisplayName, getName, load, saveAdditional, setCustomNameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntityaddEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, removeData, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolderareAttachmentsCompatible, deserializeAttachments, getData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.ContainercanPlaceItem, canTakeItem, countItem, getContainerSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHoldergetData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtensiondeserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtensionshouldTriggerClientSideContainerClosingOnOpenMethods inherited from interface net.minecraft.world.NameablehasCustomNameMethods inherited from interface net.minecraft.world.RandomizableContainergetBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable
- 
Field Details- 
lootTable
- 
lootTableSeedprotected long lootTableSeed
 
- 
- 
Constructor Details- 
RandomizableContainerBlockEntityprotected RandomizableContainerBlockEntity(BlockEntityType<?> p_155629_, BlockPos p_155630_, BlockState p_155631_) 
 
- 
- 
Method Details- 
getLootTable- Specified by:
- getLootTablein interface- RandomizableContainer
 
- 
setLootTable- Specified by:
- setLootTablein interface- RandomizableContainer
 
- 
getLootTableSeedpublic long getLootTableSeed()- Specified by:
- getLootTableSeedin interface- RandomizableContainer
 
- 
setLootTableSeedpublic void setLootTableSeed(long p_309615_) - Specified by:
- setLootTableSeedin interface- RandomizableContainer
 
- 
isEmptypublic boolean isEmpty()
- 
getItem
- 
removeItem- Specified by:
- removeItemin interface- Container
 
- 
removeItemNoUpdate- Specified by:
- removeItemNoUpdatein interface- Container
 
- 
setItem
- 
stillValid- Specified by:
- stillValidin interface- Container
 
- 
clearContentpublic void clearContent()- Specified by:
- clearContentin interface- Clearable
 
- 
getItems
- 
setItems
- 
canOpen- Overrides:
- canOpenin class- BaseContainerBlockEntity
 
- 
createMenu@Nullable public AbstractContainerMenu createMenu(int p_59637_, Inventory p_59638_, Player p_59639_) - Specified by:
- createMenuin interface- MenuConstructor
- Overrides:
- createMenuin class- BaseContainerBlockEntity
 
 
-