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
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
DropperBlockEntity
-
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
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
void
load(CompoundTag p_155496_)
save(CompoundTag p_59245_)
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
clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, 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, 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
-
RANDOM
-
CONTAINER_SIZE
public static final int CONTAINER_SIZE- See Also:
- Constant Field Values
-
items
-
-
Constructor Details
-
DispenserBlockEntity
protected DispenserBlockEntity(BlockEntityType<?> p_155489_, BlockPos p_155490_, BlockState p_155491_) -
DispenserBlockEntity
-
-
Method Details
-
getContainerSize
public int getContainerSize() -
getRandomSlot
public int getRandomSlot() -
addItem
-
getDefaultName
- Specified by:
getDefaultName
in classBaseContainerBlockEntity
-
load
- Overrides:
load
in classBaseContainerBlockEntity
-
save
- Overrides:
save
in classBaseContainerBlockEntity
-
getItems
- Specified by:
getItems
in classRandomizableContainerBlockEntity
-
setItems
- Specified by:
setItems
in classRandomizableContainerBlockEntity
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-