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,RandomizableContainer,ICapabilityProvider,ICapabilityProviderImpl<BlockEntity>,ICapabilitySerializable<CompoundTag>,IForgeBlockEntity,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
BarrelBlockEntity,ChestBlockEntity,CrafterBlockEntity,DispenserBlockEntity,HopperBlockEntity,ShulkerBoxBlockEntity
public abstract class RandomizableContainerBlockEntity
extends BaseContainerBlockEntity
implements RandomizableContainer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>> -
Field Summary
FieldsFields 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_AABBFields inherited from interface net.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRandomizableContainerBlockEntity(BlockEntityType<?> p_155629_, BlockPos p_155630_, BlockState p_155631_) -
Method Summary
Modifier 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_311658_) booleanstillValid(Player p_59619_) Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, createMenu, createUnSidedHandler, getCapability, getCustomName, getDefaultName, getDisplayName, getName, invalidateCaps, load, reviveCaps, saveAdditional, setCustomNameMethods 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, 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
canPlaceItem, canTakeItem, countItem, getContainerSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.minecraft.world.Nameable
hasCustomNameMethods inherited from interface net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable
-
Field Details
-
lootTable
-
lootTableSeed
protected long lootTableSeed
-
-
Constructor Details
-
RandomizableContainerBlockEntity
protected RandomizableContainerBlockEntity(BlockEntityType<?> p_155629_, BlockPos p_155630_, BlockState p_155631_)
-
-
Method Details
-
getLootTable
- Specified by:
getLootTablein interfaceRandomizableContainer
-
setLootTable
- Specified by:
setLootTablein interfaceRandomizableContainer
-
getLootTableSeed
public long getLootTableSeed()- Specified by:
getLootTableSeedin interfaceRandomizableContainer
-
setLootTableSeed
public void setLootTableSeed(long p_311658_) - Specified by:
setLootTableSeedin interfaceRandomizableContainer
-
isEmpty
public boolean isEmpty() -
getItem
-
removeItem
- Specified by:
removeItemin interfaceContainer
-
removeItemNoUpdate
- Specified by:
removeItemNoUpdatein interfaceContainer
-
setItem
-
stillValid
- Specified by:
stillValidin interfaceContainer
-
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
getItems
-
setItems
-
canOpen
- Overrides:
canOpenin classBaseContainerBlockEntity
-
createMenu
@Nullable public AbstractContainerMenu createMenu(int p_59637_, Inventory p_59638_, Player p_59639_) - Specified by:
createMenuin interfaceMenuConstructor- Overrides:
createMenuin classBaseContainerBlockEntity
-