net.minecraft.block.entity

public class DispenserBlockEntity

extends LootableContainerBlockEntity

All mapped superinterfaces:

DebugTrackable, EntryConvertible, Inventory, Clearable, StackReferenceGetter, NamedScreenHandlerFactory, ScreenHandlerFactory, Nameable, LootableInventory

net.minecraft.world.level.block.entity.DispenserBlockEntity
net.minecraft.class_2601
net.minecraft.block.entity.DispenserBlockEntity

Field summary

Modifier and TypeField
public static final int
CONTAINER_SIZE
field_31340
INVENTORY_SIZE
private static final Text
DEFAULT_NAME
field_63041
CONTAINER_NAME_TEXT
private DefaultedList<ItemStack>
items
field_11945
inventory

Constructor summary

ModifierConstructor
protected (BlockEntityType<?> type, BlockPos worldPosition, BlockState blockState)
public (BlockPos pos, BlockState state)

Method summary

Modifier and TypeMethod
public int
getContainerSize()
method_5439()
size()
public int
getRandomSlot(RandomSource random)
method_11076(class_5819 arg0)
chooseNonEmptySlot(Random random)
public ItemStack
insertItem(ItemStack itemStack)
method_11075(class_1799 arg0)
addToFirstFreeSlot(ItemStack stack)
protected Text
getDefaultName()
method_17823()
getContainerName()
protected void
loadAdditional(ValueInput input)
method_11014(class_11368 arg0)
readData(ReadView arg0)
protected void
saveAdditional(ValueOutput output)
method_11007(class_11372 arg0)
writeData(WriteView arg0)
protected DefaultedList<ItemStack>
getItems()
method_11282()
getHeldStacks()
protected void
setItems(NonNullList<ItemStack> items)
method_11281(class_2371<class_1799> arg0)
setHeldStacks(DefaultedList<ItemStack> arg0)
protected ScreenHandler
createMenu(int containerId, Inventory inventory)
method_5465(int arg0, class_1661 arg1)
createScreenHandler(int arg0, PlayerInventory arg1)