net.minecraft.block

public abstract class AbstractBlock

implements ToggleableFeature

net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.class_4970
net.minecraft.block.AbstractBlock

Field summary

Modifier and TypeField
protected static final Direction[]
UPDATE_SHAPE_ORDER
UPDATE_SHAPE_ORDER
field_23157
DIRECTIONS
protected final boolean
hasCollision
hasCollision
field_23159
collidable
protected final float
explosionResistance
explosionResistance
field_23160
resistance
protected final boolean
isRandomlyTicking
isRandomlyTicking
field_23161
randomTicks
protected final BlockSoundGroup
soundType
soundType
field_23162
soundGroup
protected final float
friction
friction
field_23163
slipperiness
protected final float
speedFactor
speedFactor
field_23164
velocityMultiplier
protected final float
jumpFactor
jumpFactor
field_23165
jumpVelocityMultiplier
protected final boolean
dynamicShape
dynamicShape
field_23154
dynamicBounds
protected final FeatureSet
requiredFeatures
requiredFeatures
field_40337
requiredFeatures
protected final AbstractBlock$Settings
properties
properties
field_23155
settings
protected final Optional<RegistryKey<LootTable>>
drops
drops
field_23156
lootTableKey
protected final String
descriptionId
descriptionId
field_54005
translationKey

Constructor summary

ModifierConstructor
public (AbstractBlock$Settings settings)

Method summary

Modifier and TypeMethod
public AbstractBlock$Settings
properties()
properties()
method_54095()
getSettings()
protected abstract com.mojang.serialization.MapCodec<? extends Block>
codec()
codec()
method_53969()
getCodec()
protected static <B extends Block> com.mojang.serialization.codecs.RecordCodecBuilder<B, AbstractBlock$Settings>
propertiesCodec()
propertiesCodec()
method_54096()
createSettingsCodec()
public static <B extends Block> com.mojang.serialization.MapCodec<B>
simpleCodec(Function<BlockBehaviour$Properties, B> constructor)
simpleCodec(Function<BlockBehaviour$Properties, B> constructor)
method_54094(Function<class_4970$class_2251, B> arg0)
createCodec(Function<AbstractBlock$Settings, B> blockFromSettings)
protected void
updateIndirectNeighbourShapes(BlockState state, LevelAccessor level, BlockPos pos, int updateFlags, int updateLimit)
updateIndirectNeighbourShapes(BlockState state, LevelAccessor level, BlockPos pos, int updateFlags, int updateLimit)
method_9517(class_2680 arg0, class_1936 arg1, class_2338 arg2, int arg3, int arg4)
prepare(BlockState state, WorldAccess world, BlockPos pos, int flags, int maxUpdateDepth)
protected boolean
isPathfindable(BlockState state, PathComputationType type)
isPathfindable(BlockState state, PathComputationType type)
method_9516(class_2680 arg0, class_10 arg1)
canPathfindThrough(BlockState state, NavigationType type)
protected BlockState
updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random)
updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random)
method_9559(class_2680 arg0, class_4538 arg1, class_10225 arg2, class_2338 arg3, class_2350 arg4, class_2338 arg5, class_2680 arg6, class_5819 arg7)
getStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random)
protected boolean
skipRendering(BlockState state, BlockState neighborState, Direction direction)
skipRendering(BlockState state, BlockState neighborState, Direction direction)
method_9522(class_2680 arg0, class_2680 arg1, class_2350 arg2)
isSideInvisible(BlockState state, BlockState stateFrom, Direction direction)
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 state, World world, BlockPos pos, Block sourceBlock, WireOrientation wireOrientation, boolean notify)
protected void
onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston)
onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston)
method_9615(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2680 arg3, boolean arg4)
onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
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 state, ServerWorld world, BlockPos pos, boolean moved)
protected void
onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> onHit)
onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> onHit)
method_55124(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_1927 arg3, BiConsumer<class_1799, class_2338> arg4)
onExploded(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger)
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 state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit)
protected ActionResult
useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult)
useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult)
method_55765(class_1799 arg0, class_2680 arg1, class_1937 arg2, class_2338 arg3, class_1657 arg4, class_1268 arg5, class_3965 arg6)
onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
protected boolean
triggerEvent(BlockState state, Level level, BlockPos pos, int b0, int b1)
triggerEvent(BlockState state, Level level, BlockPos pos, int b0, int b1)
method_9592(class_2680 arg0, class_1937 arg1, class_2338 arg2, int arg3, int arg4)
onSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data)
protected BlockRenderType
getRenderShape(BlockState state)
getRenderShape(BlockState state)
method_9604(class_2680 arg0)
getRenderType(BlockState state)
protected boolean
useShapeForLightOcclusion(BlockState state)
useShapeForLightOcclusion(BlockState state)
method_9526(class_2680 arg0)
hasSidedTransparency(BlockState state)
protected boolean
isSignalSource(BlockState state)
isSignalSource(BlockState state)
method_9506(class_2680 arg0)
emitsRedstonePower(BlockState state)
protected FluidState
getFluidState(BlockState state)
getFluidState(BlockState state)
method_9545(class_2680 arg0)
getFluidState(BlockState state)
protected boolean
hasAnalogOutputSignal(BlockState state)
hasAnalogOutputSignal(BlockState state)
method_9498(class_2680 arg0)
hasComparatorOutput(BlockState state)
protected float
getMaxHorizontalOffset()
getMaxHorizontalOffset()
method_32913()
getMaxHorizontalModelOffset()
protected float
getMaxVerticalOffset()
getMaxVerticalOffset()
method_37247()
getVerticalModelOffsetMultiplier()
public FeatureSet
requiredFeatures()
requiredFeatures()
method_45322()
getRequiredFeatures()
protected boolean
shouldChangedStateKeepBlockEntity(BlockState oldState)
shouldChangedStateKeepBlockEntity(BlockState oldState)
method_72600(class_2680 arg0)
keepBlockEntityWhenReplacedWith(BlockState state)
protected BlockState
rotate(BlockState state, Rotation rotation)
rotate(BlockState state, Rotation rotation)
method_9598(class_2680 arg0, class_2470 arg1)
rotate(BlockState state, BlockRotation rotation)
protected BlockState
mirror(BlockState state, Mirror mirror)
mirror(BlockState state, Mirror mirror)
method_9569(class_2680 arg0, class_2415 arg1)
mirror(BlockState state, BlockMirror mirror)
protected boolean
canBeReplaced(BlockState state, BlockPlaceContext context)
canBeReplaced(BlockState state, BlockPlaceContext context)
method_9616(class_2680 arg0, class_1750 arg1)
canReplace(BlockState state, ItemPlacementContext context)
protected boolean
canBeReplaced(BlockState state, Fluid fluid)
canBeReplaced(BlockState state, Fluid fluid)
method_22358(class_2680 arg0, class_3611 arg1)
canBucketPlace(BlockState state, Fluid fluid)
protected List<ItemStack>
getDrops(BlockState state, LootParams$Builder params)
getDrops(BlockState state, LootParams$Builder params)
method_9560(class_2680 arg0, class_8567$class_8568 arg1)
getDroppedStacks(BlockState state, LootWorldContext$Builder builder)
protected long
getSeed(BlockState state, BlockPos pos)
getSeed(BlockState state, BlockPos pos)
method_9535(class_2680 arg0, class_2338 arg1)
getRenderingSeed(BlockState state, BlockPos pos)
protected VoxelShape
getOcclusionShape(BlockState state)
getOcclusionShape(BlockState state)
method_9571(class_2680 arg0)
getCullingShape(BlockState state)
protected VoxelShape
getBlockSupportShape(BlockState state, BlockGetter level, BlockPos pos)
getBlockSupportShape(BlockState state, BlockGetter level, BlockPos pos)
method_25959(class_2680 arg0, class_1922 arg1, class_2338 arg2)
getSidesShape(BlockState state, BlockView world, BlockPos pos)
protected VoxelShape
getInteractionShape(BlockState state, BlockGetter level, BlockPos pos)
getInteractionShape(BlockState state, BlockGetter level, BlockPos pos)
method_9584(class_2680 arg0, class_1922 arg1, class_2338 arg2)
getRaycastShape(BlockState state, BlockView world, BlockPos pos)
protected int
getLightDampening(BlockState state)
getLightDampening(BlockState state)
method_9505(class_2680 arg0)
getOpacity(BlockState state)
protected NamedScreenHandlerFactory
getMenuProvider(BlockState state, Level level, BlockPos pos)
getMenuProvider(BlockState state, Level level, BlockPos pos)
method_17454(class_2680 arg0, class_1937 arg1, class_2338 arg2)
createScreenHandlerFactory(BlockState state, World world, BlockPos pos)
protected boolean
canSurvive(BlockState state, LevelReader level, BlockPos pos)
canSurvive(BlockState state, LevelReader level, BlockPos pos)
method_9558(class_2680 arg0, class_4538 arg1, class_2338 arg2)
canPlaceAt(BlockState state, WorldView world, BlockPos pos)
protected float
getShadeBrightness(BlockState state, BlockGetter level, BlockPos pos)
getShadeBrightness(BlockState state, BlockGetter level, BlockPos pos)
method_9575(class_2680 arg0, class_1922 arg1, class_2338 arg2)
getAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos)
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 state, World world, BlockPos pos, Direction direction)
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
protected VoxelShape
getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9549(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
protected VoxelShape
getEntityInsideCollisionShape(BlockState state, BlockGetter level, BlockPos pos, Entity entity)
getEntityInsideCollisionShape(BlockState state, BlockGetter level, BlockPos pos, Entity entity)
method_64022(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_1297 arg3)
getInsideCollisionShape(BlockState state, BlockView world, BlockPos pos, Entity entity)
protected boolean
isCollisionShapeFullBlock(BlockState state, BlockGetter level, BlockPos pos)
isCollisionShapeFullBlock(BlockState state, BlockGetter level, BlockPos pos)
method_37403(class_2680 arg0, class_1922 arg1, class_2338 arg2)
isShapeFullCube(BlockState state, BlockView world, BlockPos pos)
protected VoxelShape
getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
getVisualShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_26159(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getCameraCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
protected void
randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random)
randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random)
method_9514(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_5819 arg3)
randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
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 state, ServerWorld world, BlockPos pos, Random random)
protected float
getDestroyProgress(BlockState state, Player player, BlockGetter level, BlockPos pos)
getDestroyProgress(BlockState state, Player player, BlockGetter level, BlockPos pos)
method_9594(class_2680 arg0, class_1657 arg1, class_1922 arg2, class_2338 arg3)
calcBlockBreakingDelta(BlockState state, PlayerEntity player, BlockView world, BlockPos pos)
protected void
spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack tool, boolean dropExperience)
spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack tool, boolean dropExperience)
method_9565(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_1799 arg3, boolean arg4)
onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience)
protected void
attack(BlockState state, Level level, BlockPos pos, Player player)
attack(BlockState state, Level level, BlockPos pos, Player player)
method_9606(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3)
onBlockBreakStart(BlockState state, World world, BlockPos pos, PlayerEntity player)
protected int
getSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
getSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
method_9524(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
protected void
entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean isPrecise)
entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean isPrecise)
method_9548(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1297 arg3, class_10774 arg4, boolean arg5)
onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity, EntityCollisionHandler handler, boolean substantial)
protected int
getDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
getDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
method_9603(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
public final Optional<RegistryKey<LootTable>>
getLootTable()
getLootTable()
method_26162()
getLootTableKey()
public final String
getDescriptionId()
getDescriptionId()
method_63499()
getTranslationKey()
protected void
onProjectileHit(Level level, BlockState state, BlockHitResult blockHit, Projectile projectile)
onProjectileHit(Level level, BlockState state, BlockHitResult blockHit, Projectile projectile)
method_19286(class_1937 arg0, class_2680 arg1, class_3965 arg2, class_1676 arg3)
onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)
protected boolean
propagatesSkylightDown(BlockState state)
propagatesSkylightDown(BlockState state)
method_9579(class_2680 arg0)
isTransparent(BlockState state)
protected boolean
isRandomlyTicking(BlockState state)
isRandomlyTicking(BlockState state)
method_9542(class_2680 arg0)
hasRandomTicks(BlockState state)
protected BlockSoundGroup
getSoundType(BlockState state)
getSoundType(BlockState state)
method_9573(class_2680 arg0)
getSoundGroup(BlockState state)
protected ItemStack
getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData)
getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData)
method_9574(class_4538 arg0, class_2338 arg1, class_2680 arg2, boolean arg3)
getPickStack(WorldView world, BlockPos pos, BlockState state, boolean includeData)
public abstract Item
asItem()
asItem()
method_8389()
asItem()
protected abstract Block
asBlock()
asBlock()
method_26160()
asBlock()
public MapColor
defaultMapColor()
defaultMapColor()
method_26403()
getDefaultMapColor()
public float
defaultDestroyTime()
defaultDestroyTime()
method_36555()
getHardness()