net.minecraft.block

public class CommandBlock

extends BlockWithEntity implements OperatorBlock

All mapped superinterfaces:

ToggleableFeature, ItemConvertible, BlockEntityProvider, OperatorBlock

net.minecraft.world.level.block.CommandBlock
net.minecraft.world.level.block.CommandBlock
net.minecraft.class_2288
net.minecraft.block.CommandBlock

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<CommandBlock>
CODEC
CODEC
field_46318
CODEC
private static final org.slf4j.Logger
LOGGER
LOGGER
field_10792
LOGGER
public static final EnumProperty<Direction>
FACING
FACING
field_10791
FACING
public static final BooleanProperty
CONDITIONAL
CONDITIONAL
field_10793
CONDITIONAL
private final boolean
automatic
automatic
field_27192
auto

Constructor summary

ModifierConstructor
public (boolean auto, AbstractBlock$Settings settings)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<CommandBlock>
codec()
codec()
method_53969()
getCodec()
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)
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)
private void
setPoweredAndUpdate(Level level, BlockPos pos, CommandBlockEntity commandBlock, boolean isPowered)
setPoweredAndUpdate(Level level, BlockPos pos, CommandBlockEntity commandBlock, boolean isPowered)
method_61744(class_1937 arg0, class_2338 arg1, class_2593 arg2, boolean arg3)
update(World world, BlockPos pos, CommandBlockBlockEntity blockEntity, boolean powered)
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)
private void
execute(BlockState state, ServerLevel level, BlockPos pos, BaseCommandBlock baseCommandBlock, boolean commandSet)
execute(BlockState state, ServerLevel level, BlockPos pos, BaseCommandBlock baseCommandBlock, boolean commandSet)
method_9780(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_1918 arg3, boolean arg4)
execute(BlockState state, ServerWorld world, BlockPos pos, CommandBlockExecutor executor, boolean hasCommand)
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 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)
public void
setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity by, ItemStack itemStack)
setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity by, ItemStack itemStack)
method_9567(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_1309 arg3, class_1799 arg4)
onPlaced(World arg0, BlockPos arg1, BlockState arg2, LivingEntity arg3, ItemStack arg4)
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)
public BlockState
getStateForPlacement(BlockPlaceContext context)
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
private static void
executeChain(ServerLevel level, BlockPos blockPos, Direction direction)
executeChain(ServerLevel level, BlockPos blockPos, Direction direction)
method_9779(class_3218 arg0, class_2338 arg1, class_2350 arg2)
executeCommandChain(ServerWorld world, BlockPos pos, Direction facing)