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
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
DropperBlockEntity
-
Nested Class Summary
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
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG, 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_LIMIT, LARGE_MAX_STACK_SIZE
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
ModifierConstructorDescriptionDispenserBlockEntity
(BlockPos p_155493_, BlockState p_155494_) protected
DispenserBlockEntity
(BlockEntityType<?> p_155489_, BlockPos p_155490_, BlockState p_155491_) -
Method Summary
Modifier and TypeMethodDescriptionint
protected AbstractContainerMenu
createMenu
(int p_59235_, Inventory p_59236_) int
protected Component
protected NonNullList<ItemStack>
getItems()
int
getRandomSlot
(RandomSource p_222762_) void
load
(CompoundTag p_155496_) protected void
saveAdditional
(CompoundTag p_187498_) protected void
setItems
(NonNullList<ItemStack> p_59243_) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
canOpen, clearContent, createMenu, getItem, isEmpty, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTable, stillValid, tryLoadLootTable, trySaveLootTable, unpackLootTable
Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, createUnSidedHandler, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, reviveCaps, setCustomName
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, 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, canTakeItem, countItem, getMaxStackSize, hasAnyMatching, 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, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
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
-
addItem
-
getDefaultName
- Specified by:
getDefaultName
in classBaseContainerBlockEntity
-
load
- Overrides:
load
in classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBaseContainerBlockEntity
-
getItems
- Specified by:
getItems
in classRandomizableContainerBlockEntity
-
setItems
- Specified by:
setItems
in classRandomizableContainerBlockEntity
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-