Class DispenserBlockEntity
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
net.minecraft.world.level.block.entity.DispenserBlockEntity
- All Implemented Interfaces:
Clearable
,Container
,MenuConstructor
,MenuProvider
,Nameable
,RandomizableContainer
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
- Direct Known Subclasses:
DropperBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
lootTable, lootTableSeed
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
Fields inherited from interface net.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG
-
Constructor Summary
ModifierConstructorDescriptionDispenserBlockEntity
(BlockPos p_155493_, BlockState p_155494_) protected
DispenserBlockEntity
(BlockEntityType<?> p_155489_, BlockPos p_155490_, BlockState p_155491_) -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractContainerMenu
createMenu
(int p_59235_, Inventory p_59236_) int
protected Component
protected NonNullList
<ItemStack> getItems()
int
getRandomSlot
(RandomSource p_222762_) insertItem
(ItemStack p_345441_) protected void
loadAdditional
(CompoundTag p_332674_, HolderLookup.Provider p_335532_) protected void
saveAdditional
(CompoundTag p_187498_, HolderLookup.Provider p_328492_) protected void
setItems
(NonNullList<ItemStack> p_59243_) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTableSeed
Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, clearContent, createUnSidedHandler, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, reviveCaps, stillValid
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, onlyOpCanSetNbt, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
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.Clearable
clearContent
Methods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stillValid, stopOpen
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
Methods inherited from interface net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable
-
Field Details
-
CONTAINER_SIZE
public static final int CONTAINER_SIZE- See Also:
-
items
-
-
Constructor Details
-
DispenserBlockEntity
protected DispenserBlockEntity(BlockEntityType<?> p_155489_, BlockPos p_155490_, BlockState p_155491_) -
DispenserBlockEntity
-
-
Method Details
-
getContainerSize
public int getContainerSize() -
getRandomSlot
-
insertItem
-
getDefaultName
- Specified by:
getDefaultName
in classBaseContainerBlockEntity
-
loadAdditional
- Overrides:
loadAdditional
in classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBaseContainerBlockEntity
-
getItems
- Specified by:
getItems
in classBaseContainerBlockEntity
-
setItems
- Specified by:
setItems
in classBaseContainerBlockEntity
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-