net.minecraft.block

public class Block

extends AbstractBlock implements ItemConvertible

All mapped superinterfaces:

ToggleableFeature, ItemConvertible

net.minecraft.world.level.block.Block
net.minecraft.class_2248
net.minecraft.block.Block

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
field_10638
LOGGER
private final RegistryEntry$Reference<Block>
builtInRegistryHolder
field_36404
registryEntry
public static final IdList<BlockState>
BLOCK_STATE_REGISTRY
field_10651
STATE_IDS
private static final com.google.common.cache.LoadingCache<VoxelShape, Boolean>
SHAPE_FULL_BLOCK_CACHE
field_19312
FULL_CUBE_SHAPE_CACHE
public static final int
UPDATE_NEIGHBORS
field_31027
NOTIFY_NEIGHBORS
public static final int
UPDATE_CLIENTS
field_31028
NOTIFY_LISTENERS
public static final int
UPDATE_INVISIBLE
field_31029
NO_REDRAW
public static final int
UPDATE_IMMEDIATE
field_31030
REDRAW_ON_MAIN_THREAD
public static final int
UPDATE_KNOWN_SHAPE
field_31031
FORCE_STATE
public static final int
UPDATE_SUPPRESS_DROPS
field_31032
SKIP_DROPS
public static final int
UPDATE_MOVE_BY_PISTON
field_31033
MOVED
public static final int
UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE
field_53822
SKIP_REDSTONE_WIRE_STATE_REPLACEMENT
public static final int
UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS
field_55739
SKIP_BLOCK_ENTITY_REPLACED_CALLBACK
public static final int
UPDATE_SKIP_ON_PLACE
field_56561
SKIP_BLOCK_ADDED_CALLBACK
public static final int
UPDATE_NONE
field_31035
SKIP_REDRAW_AND_BLOCK_ENTITY_REPLACED_CALLBACK
public static final int
UPDATE_ALL
field_31036
NOTIFY_ALL
public static final int
UPDATE_ALL_IMMEDIATE
field_31022
NOTIFY_ALL_AND_REDRAW
public static final int
UPDATE_SKIP_ALL_SIDEEFFECTS
field_55740
FORCE_STATE_AND_SKIP_CALLBACKS_AND_DROPS
public static final float
INDESTRUCTIBLE
field_31023
field_31023
public static final float
INSTANT
field_31024
field_31024
public static final int
UPDATE_LIMIT
field_31025
field_31025
protected final StateManager<Block, BlockState>
stateDefinition
field_10647
stateManager
private BlockState
defaultBlockState
field_10646
defaultState
private Item
item
field_17562
cachedItem
private static final int
CACHE_SIZE
field_31026
FACE_CULL_MAP_SIZE
private static final ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block$VoxelShapePair>>
OCCLUSION_CACHE
field_10649
FACE_CULL_MAP

Constructor summary

ModifierConstructor
public (AbstractBlock$Settings properties)

Method summary

Modifier and TypeMethod
public static int
getId(BlockState blockState)
method_9507(class_2680 arg0)
getRawIdFromState(BlockState state)
public static BlockState
stateById(int idWithData)
method_9531(int arg0)
getStateFromRawId(int stateId)
public static Block
byItem(Item item)
method_9503(class_1792 arg0)
getBlockFromItem(Item item)
public static BlockState
pushEntitiesUp(BlockState state, BlockState newState, LevelAccessor level, BlockPos pos)
method_9582(class_2680 arg0, class_2680 arg1, class_1936 arg2, class_2338 arg3)
pushEntitiesUpBeforeBlockChange(BlockState from, BlockState to, WorldAccess world, BlockPos pos)
public static VoxelShape
box(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
method_9541(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
createCuboidShape(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
public static VoxelShape[]
boxes(int endInclusive, IntFunction<VoxelShape> voxelShapeFactory)
method_66397(int arg0, IntFunction<class_265> arg1)
createShapeArray(int size, IntFunction<VoxelShape> indexToShape)
public static VoxelShape
cube(double size)
method_66393(double arg0)
createCubeShape(double size)
public static VoxelShape
cube(double sizeX, double sizeY, double sizeZ)
method_66394(double arg0, double arg1, double arg2)
createCuboidShape(double sizeX, double sizeY, double sizeZ)
public static VoxelShape
column(double sizeXZ, double minY, double maxY)
method_66404(double arg0, double arg1, double arg2)
createColumnShape(double sizeXz, double minY, double maxY)
public static VoxelShape
column(double sizeX, double sizeZ, double minY, double maxY)
method_66395(double arg0, double arg1, double arg2, double arg3)
createColumnShape(double sizeX, double sizeZ, double minY, double maxY)
public static VoxelShape
boxZ(double sizeXY, double minZ, double maxZ)
method_66408(double arg0, double arg1, double arg2)
createCuboidZShape(double sizeXy, double minZ, double maxZ)
public static VoxelShape
boxZ(double sizeX, double sizeY, double minZ, double maxZ)
method_66405(double arg0, double arg1, double arg2, double arg3)
createCuboidZShape(double sizeX, double sizeY, double minZ, double maxZ)
public static VoxelShape
boxZ(double sizeX, double minY, double maxY, double minZ, double maxZ)
method_66396(double arg0, double arg1, double arg2, double arg3, double arg4)
createCuboidZShape(double sizeX, double minY, double maxY, double minZ, double maxZ)
public static BlockState
updateFromNeighbourShapes(BlockState state, LevelAccessor level, BlockPos pos)
method_9510(class_2680 arg0, class_1936 arg1, class_2338 arg2)
postProcessState(BlockState state, WorldAccess world, BlockPos pos)
public static void
updateOrDestroy(BlockState blockState, BlockState newState, LevelAccessor level, BlockPos blockPos, int updateFlags)
method_30094(class_2680 arg0, class_2680 arg1, class_1936 arg2, class_2338 arg3, int arg4)
replace(BlockState state, BlockState newState, WorldAccess world, BlockPos pos, int flags)
public static void
updateOrDestroy(BlockState blockState, BlockState newState, LevelAccessor level, BlockPos blockPos, int updateFlags, int updateLimit)
method_9611(class_2680 arg0, class_2680 arg1, class_1936 arg2, class_2338 arg3, int arg4, int arg5)
replace(BlockState state, BlockState newState, WorldAccess world, BlockPos pos, int flags, int maxUpdateDepth)
public static boolean
isExceptionForConnection(BlockState state)
method_9581(class_2680 arg0)
cannotConnect(BlockState state)
public static boolean
dropFromBlockInteractLootTable(ServerLevel level, ResourceKey<LootTable> key, BlockState interactedBlockState, BlockEntity interactedBlockEntity, ItemInstance tool, Entity interactingEntity, BiConsumer<ServerLevel, ItemStack> consumer)
method_72546(class_3218 arg0, class_5321<class_52> arg1, class_2680 arg2, class_2586 arg3, class_1_96 arg4, class_1297 arg5, BiConsumer<class_3218, class_1799> arg6)
generateBlockInteractLoot(ServerWorld world, RegistryKey<LootTable> lootTable, BlockState state, BlockEntity blockEntity, ItemStackView tool, Entity interactingEntity, BiConsumer<ServerWorld, ItemStack> lootConsumer)
protected static boolean
dropFromLootTable(ServerLevel level, ResourceKey<LootTable> key, Function<LootParams$Builder, LootParams> paramsBuilder, BiConsumer<ServerLevel, ItemStack> consumer)
method_72547(class_3218 arg0, class_5321<class_52> arg1, Function<class_8567$class_8568, class_8567> arg2, BiConsumer<class_3218, class_1799> arg3)
generateLoot(ServerWorld world, RegistryKey<LootTable> lootTable, Function<LootWorldContext$Builder, LootWorldContext> contextFactory, BiConsumer<ServerWorld, ItemStack> lootConsumer)
public static boolean
shouldRenderFace(BlockState state, BlockState neighborState, Direction direction)
method_9607(class_2680 arg0, class_2680 arg1, class_2350 arg2)
shouldDrawSide(BlockState state, BlockState otherState, Direction side)
public static boolean
canSupportRigidBlock(BlockGetter level, BlockPos below)
method_16361(class_1922 arg0, class_2338 arg1)
hasTopRim(BlockView world, BlockPos pos)
public static boolean
canSupportCenter(LevelReader level, BlockPos belowPos, Direction direction)
method_20044(class_4538 arg0, class_2338 arg1, class_2350 arg2)
sideCoversSmallSquare(WorldView world, BlockPos pos, Direction side)
public static boolean
isFaceFull(VoxelShape shape, Direction direction)
method_9501(class_265 arg0, class_2350 arg1)
isFaceFullSquare(VoxelShape shape, Direction side)
public static boolean
isShapeFullBlock(VoxelShape shape)
method_9614(class_265 arg0)
isShapeFullCube(VoxelShape shape)
public void
animateTick(BlockState state, Level level, BlockPos pos, RandomSource random)
method_9496(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_5819 arg3)
randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
public void
destroy(LevelAccessor level, BlockPos pos, BlockState state)
method_9585(class_1936 arg0, class_2338 arg1, class_2680 arg2)
onBroken(WorldAccess world, BlockPos pos, BlockState state)
public static List<ItemStack>
getDrops(BlockState state, ServerLevel level, BlockPos pos, BlockEntity blockEntity)
method_9562(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_2586 arg3)
getDroppedStacks(BlockState state, ServerWorld world, BlockPos pos, BlockEntity blockEntity)
public static List<ItemStack>
getDrops(BlockState state, ServerLevel level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemInstance tool)
method_9609(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_2586 arg3, class_1297 arg4, class_1_96 arg5)
getDroppedStacks(BlockState state, ServerWorld world, BlockPos pos, BlockEntity blockEntity, Entity entity, ItemStackView tool)
public static void
dropResources(BlockState state, Level level, BlockPos pos)
method_9497(class_2680 arg0, class_1937 arg1, class_2338 arg2)
dropStacks(BlockState state, World world, BlockPos pos)
public static void
dropResources(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity)
method_9610(class_2680 arg0, class_1936 arg1, class_2338 arg2, class_2586 arg3)
dropStacks(BlockState state, WorldAccess world, BlockPos pos, BlockEntity blockEntity)
public static void
dropResources(BlockState state, Level level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool)
method_9511(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2586 arg3, class_1297 arg4, class_1799 arg5)
dropStacks(BlockState state, World world, BlockPos pos, BlockEntity blockEntity, Entity entity, ItemStack tool)
public static void
popResource(Level level, BlockPos pos, ItemStack itemStack)
method_9577(class_1937 arg0, class_2338 arg1, class_1799 arg2)
dropStack(World world, BlockPos pos, ItemStack stack)
public static void
popResourceFromFace(Level level, BlockPos pos, Direction face, ItemStack itemStack)
method_36992(class_1937 arg0, class_2338 arg1, class_2350 arg2, class_1799 arg3)
dropStack(World world, BlockPos pos, Direction direction, ItemStack stack)
private static void
popResource(Level level, Supplier<ItemEntity> entityFactory, ItemStack itemStack)
method_36993(class_1937 arg0, Supplier<class_1542> arg1, class_1799 arg2)
dropStack(World world, Supplier<ItemEntity> itemEntitySupplier, ItemStack stack)
protected void
popExperience(ServerLevel level, BlockPos pos, int amount)
method_9583(class_3218 arg0, class_2338 arg1, int arg2)
dropExperience(ServerWorld world, BlockPos pos, int size)
public float
getExplosionResistance()
method_9520()
getBlastResistance()
public void
wasExploded(ServerLevel level, BlockPos pos, Explosion explosion)
method_9586(class_3218 arg0, class_2338 arg1, class_1927 arg2)
onDestroyedByExplosion(ServerWorld world, BlockPos pos, Explosion explosion)
public void
stepOn(Level level, BlockPos pos, BlockState onState, Entity entity)
method_9591(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_1297 arg3)
onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity)
public BlockState
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext ctx)
public void
playerDestroy(Level level, Player player, BlockPos pos, BlockState state, BlockEntity blockEntity, ItemStack destroyedWith)
method_9556(class_1937 arg0, class_1657 arg1, class_2338 arg2, class_2680 arg3, class_2586 arg4, class_1799 arg5)
afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, BlockEntity blockEntity, ItemStack tool)
public void
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 world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
public boolean
isPossibleToRespawnInThis(BlockState state)
method_9538(class_2680 arg0)
canMobSpawnInside(BlockState state)
public MutableText
getName()
method_9518()
getName()
public void
fallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance)
method_9554(class_1937 arg0, class_2680 arg1, class_2338 arg2, class_1297 arg3, double arg4)
onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, double fallDistance)
public void
bounceOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance)
method_1_6482(class_1937 arg0, class_2680 arg1, class_2338 arg2, class_1297 arg3, double arg4)
onBounce(World world, BlockState state, BlockPos pos, Entity entity, double fallDistance)
public float
getBounceRestitution()
method_1_4045()
getBounciness()
public float
getFallDistanceReduction()
method_1_6483()
getFallDistanceReduction()
public float
getFriction()
method_9499()
getSlipperiness()
public float
getSpeedFactor()
method_23349()
getVelocityMultiplier()
public float
getJumpFactor()
method_23350()
getJumpVelocityMultiplier()
public void
spawnDestroyByEntityParticles(Level level, Entity entity, BlockPos pos, BlockState state)
method_33614(class_1937 arg0, class_1297 arg1, class_2338 arg2, class_2680 arg3)
spawnBreakParticles(World world, Entity entity, BlockPos pos, BlockState state)
public void
spawnDestroyParticles(Level level, BlockPos pos, BlockState state)
method_1_7631(class_1937 arg0, class_2338 arg1, class_2680 arg2)
spawnBreakParticles(World world, BlockPos pos, BlockState state)
public BlockState
playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player)
method_9576(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_1657 arg3)
onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player)
public void
handlePrecipitation(BlockState state, Level level, BlockPos pos, Biome$Precipitation precipitation)
method_9504(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1959$class_1963 arg3)
precipitationTick(BlockState state, World world, BlockPos pos, Biome$Precipitation precipitation)
public boolean
dropFromExplosion(Explosion explosion)
method_9533(class_1927 arg0)
shouldDropItemsOnExplosion(Explosion explosion)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> builder)
public StateManager<Block, BlockState>
getStateDefinition()
method_9595()
getStateManager()
protected final void
registerDefaultState(BlockState state)
method_9590(class_2680 arg0)
setDefaultState(BlockState state)
public final BlockState
defaultBlockState()
method_9564()
getDefaultState()
public final BlockState
withPropertiesOf(BlockState source)
method_34725(class_2680 arg0)
getStateWithProperties(BlockState state)
public Item
asItem()
method_8389()
asItem()
public boolean
hasDynamicShape()
method_9543()
hasDynamicBounds()
protected Block
asBlock()
method_26160()
asBlock()
protected Function<BlockState, VoxelShape>
getShapeForEachState(Function<BlockState, VoxelShape> shapeCalculator)
method_33615(Function<class_2680, class_265> arg0)
createShapeFunction(Function<BlockState, VoxelShape> stateToShape)
protected Function<BlockState, VoxelShape>
getShapeForEachState(Function<BlockState, VoxelShape> shapeCalculator, Property<?>... ignoredProperties)
method_66403(Function<class_2680, class_265> arg0, class_2769<?>... arg1)
createShapeFunction(Function<BlockState, VoxelShape> stateToShape, Property<?>... properties)
private static <S extends State<?, S>, T extends Comparable<T>> S
setValueHelper(S state, Property<T> property, Object value)
method_66399(S arg0, class_2769<T> arg1, Object arg2)
applyValueToState(S state, Property<T> property, Object value)
public RegistryEntry$Reference<Block>
builtInRegistryHolder()
method_40142()
getRegistryEntry()
protected void
tryDropExperience(ServerLevel level, BlockPos pos, ItemStack tool, IntProvider xpRange)
method_41420(class_3218 arg0, class_2338 arg1, class_1799 arg2, class_6017 arg3)
dropExperienceWhenMined(ServerWorld world, BlockPos pos, ItemStack tool, IntProvider experience)
private static VoxelShape
lambda$getShapeForEachState$4(Map arg0, com.google.common.collect.ImmutableMap arg1, BlockState arg2)
method_66401(Map arg0, com.google.common.collect.ImmutableMap arg1, class_2680 arg2)
method_66401(Map arg0, com.google.common.collect.ImmutableMap arg1, BlockState state)
private static boolean
lambda$getShapeForEachState$2(Map arg0, BlockState arg1)
method_66402(Map arg0, class_2680 arg1)
method_66402(Map arg0, BlockState state)
private static boolean
lambda$getShapeForEachState$3(BlockState arg0, Map$Entry arg1)
method_66398(class_2680 arg0, Map$Entry arg1)
method_66398(BlockState arg0, Map$Entry entry)
private static Object
lambda$getShapeForEachState$1(Property arg0)
method_66400(class_2769 arg0)
method_66400(Property property)
private static Property
lambda$getShapeForEachState$0(Property arg0)
method_66407(class_2769 arg0)
method_66407(Property property)
private static ItemEntity
lambda$popResourceFromFace$0(Level arg0, double arg1, double arg2, double arg3, ItemStack arg4, double arg5, double arg6, double arg7)
method_36991(class_1937 arg0, double arg1, double arg2, double arg3, class_1799 arg4, double arg5, double arg6, double arg7)
method_36991(World arg0, double arg1, double arg2, double arg3, ItemStack arg4, double arg5, double arg6, double arg7)
private static ItemEntity
lambda$popResource$0(Level arg0, double arg1, double arg2, double arg3, ItemStack arg4)
method_36990(class_1937 arg0, double arg1, double arg2, double arg3, class_1799 arg4)
method_36990(World arg0, double arg1, double arg2, double arg3, ItemStack arg4)
private static void
lambda$dropResources$2(Level arg0, BlockPos arg1, ItemStack arg2)
method_9544(class_1937 arg0, class_2338 arg1, class_1799 arg2)
method_9544(World arg0, BlockPos arg1, ItemStack stack)
private static void
lambda$dropResources$1(ServerLevel arg0, BlockPos arg1, ItemStack arg2)
method_9596(class_3218 arg0, class_2338 arg1, class_1799 arg2)
method_9596(ServerWorld arg0, BlockPos arg1, ItemStack stack)
private static void
lambda$dropResources$0(Level arg0, BlockPos arg1, ItemStack arg2)
method_9587(class_1937 arg0, class_2338 arg1, class_1799 arg2)
method_9587(World arg0, BlockPos arg1, ItemStack stack)
private static it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap
lambda$static$0()
method_9508()
method_9508()
private static void
lambda$dropFromLootTable$0(BiConsumer arg0, ServerLevel arg1, ItemStack arg2)
method_72549(BiConsumer arg0, class_3218 arg1, class_1799 arg2)
method_72549(BiConsumer arg0, ServerWorld arg1, ItemStack stack)
private static LootWorldContext
lambda$dropFromBlockInteractLootTable$0(BlockState arg0, BlockEntity arg1, Entity arg2, ItemInstance arg3, LootParams$Builder arg4)
method_72548(class_2680 arg0, class_2586 arg1, class_1297 arg2, class_1_96 arg3, class_8567$class_8568 arg4)
method_72548(BlockState arg0, BlockEntity arg1, Entity arg2, ItemStackView arg3, LootWorldContext$Builder context)
private static VoxelShape[]
lambda$boxes$0(int arg0)
method_66406(int arg0)
method_66406(int arg0)