net.minecraft.block

public class DispenserBlock

extends BlockWithEntity

All mapped superinterfaces:

ToggleableFeature, ItemConvertible, BlockEntityProvider

net.minecraft.world.level.block.DispenserBlock
net.minecraft.world.level.block.DispenserBlock
net.minecraft.class_2315
net.minecraft.block.DispenserBlock

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
LOGGER
field_46212
LOGGER
public static final com.mojang.serialization.MapCodec<DispenserBlock>
CODEC
CODEC
field_46336
CODEC
public static final EnumProperty<Direction>
FACING
FACING
field_10918
FACING
public static final BooleanProperty
TRIGGERED
TRIGGERED
field_10920
TRIGGERED
private static final ItemDispenserBehavior
DEFAULT_BEHAVIOR
DEFAULT_BEHAVIOR
field_51412
DEFAULT_BEHAVIOR
public static final Map<Item, DispenserBehavior>
DISPENSER_REGISTRY
DISPENSER_REGISTRY
field_10919
BEHAVIORS
private static final int
TRIGGER_DURATION
TRIGGER_DURATION
field_31082
SCHEDULED_TICK_DELAY

Constructor summary

ModifierConstructor
protected (AbstractBlock$Settings properties)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<? extends DispenserBlock>
codec()
codec()
method_53969()
getCodec()
public static void
registerBehavior(ItemLike item, DispenseItemBehavior behavior)
registerBehavior(ItemLike item, DispenseItemBehavior behavior)
method_10009(class_1935 arg0, class_2357 arg1)
registerBehavior(ItemConvertible provider, DispenserBehavior behavior)
public static void
registerProjectileBehavior(ItemLike item)
registerProjectileBehavior(ItemLike item)
method_58681(class_1935 arg0)
registerProjectileBehavior(ItemConvertible projectile)
protected ActionResult
useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
method_55766(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3, class_3965 arg4)
onUse(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3, BlockHitResult arg4)
protected void
dispenseFrom(ServerLevel level, BlockState state, BlockPos pos)
dispenseFrom(ServerLevel level, BlockState state, BlockPos pos)
method_10012(class_3218 arg0, class_2680 arg1, class_2338 arg2)
dispense(ServerWorld world, BlockState state, BlockPos pos)
protected DispenserBehavior
getDispenseMethod(Level level, ItemStack itemStack)
getDispenseMethod(Level level, ItemStack itemStack)
method_10011(class_1937 arg0, class_1799 arg1)
getBehaviorForItem(World world, ItemStack stack)
private static DispenserBehavior
getDefaultDispenseMethod(ItemStack itemStack)
getDefaultDispenseMethod(ItemStack itemStack)
method_64021(class_1799 arg0)
getBehaviorForItem(ItemStack stack)
protected void
neighborChanged(BlockState state, Level level, BlockPos pos, Block block, Orientation orientation, boolean movedByPiston)
neighborChanged(BlockState state, Level level, BlockPos pos, Block block, Orientation orientation, boolean movedByPiston)
method_9612(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2248 arg3, class_9904 arg4, boolean arg5)
neighborUpdate(BlockState arg0, World arg1, BlockPos arg2, Block arg3, WireOrientation arg4, boolean arg5)
protected void
tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random)
tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random)
method_9588(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_5819 arg3)
scheduledTick(BlockState arg0, ServerWorld arg1, BlockPos arg2, Random arg3)
public BlockEntity
newBlockEntity(BlockPos worldPosition, BlockState blockState)
newBlockEntity(BlockPos worldPosition, BlockState blockState)
method_10123(class_2338 arg0, class_2680 arg1)
createBlockEntity(BlockPos arg0, BlockState arg1)
public BlockState
getStateForPlacement(BlockPlaceContext context)
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
protected void
affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston)
affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston)
method_66388(class_2680 arg0, class_3218 arg1, class_2338 arg2, boolean arg3)
onStateReplaced(BlockState arg0, ServerWorld arg1, BlockPos arg2, boolean arg3)
public static Position
getDispensePosition(BlockSource source)
getDispensePosition(BlockSource source)
method_58682(class_2342 arg0)
getOutputLocation(BlockPointer pointer)
public static Position
getDispensePosition(BlockSource source, double scale, Vec3 offset)
getDispensePosition(BlockSource source, double scale, Vec3 offset)
method_10010(class_2342 arg0, double arg1, class_243 arg2)
getOutputLocation(BlockPointer pointer, double facingOffset, Vec3d constantOffset)
protected boolean
hasAnalogOutputSignal(BlockState state)
hasAnalogOutputSignal(BlockState state)
method_9498(class_2680 arg0)
hasComparatorOutput(BlockState arg0)
protected int
getAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction)
getAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction)
method_9572(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2350 arg3)
getComparatorOutput(BlockState arg0, World arg1, BlockPos arg2, Direction arg3)
protected BlockState
rotate(BlockState state, Rotation rotation)
rotate(BlockState state, Rotation rotation)
method_9598(class_2680 arg0, class_2470 arg1)
rotate(BlockState arg0, BlockRotation arg1)
protected BlockState
mirror(BlockState state, Mirror mirror)
mirror(BlockState state, Mirror mirror)
method_9569(class_2680 arg0, class_2415 arg1)
mirror(BlockState arg0, BlockMirror arg1)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)