Package net.minecraft.block
Class AbstractBlock
java.lang.Object
net.minecraft.block.AbstractBlock
- Direct Known Subclasses:
Block
public abstract class AbstractBlock extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractBlock.AbstractBlockState
static interface
AbstractBlock.ContextPredicate
static class
AbstractBlock.OffsetType
static class
AbstractBlock.Settings
static interface
AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description protected boolean
collidable
protected boolean
dynamicBounds
protected static Direction[]
FACINGS
protected float
jumpVelocityMultiplier
protected Identifier
lootTableId
protected Material
material
protected boolean
randomTicks
protected float
resistance
protected AbstractBlock.Settings
settings
protected float
slipperiness
protected BlockSoundGroup
soundGroup
protected float
velocityMultiplier
-
Constructor Summary
Constructors Constructor Description AbstractBlock(AbstractBlock.Settings settings)
-
Method Summary
-
Field Details
-
FACINGS
-
material
-
collidable
protected final boolean collidable -
resistance
protected final float resistance -
randomTicks
protected final boolean randomTicks -
soundGroup
-
slipperiness
protected final float slipperiness -
velocityMultiplier
protected final float velocityMultiplier -
jumpVelocityMultiplier
protected final float jumpVelocityMultiplier -
dynamicBounds
protected final boolean dynamicBounds -
settings
-
lootTableId
-
-
Constructor Details
-
AbstractBlock
-
-
Method Details
-
prepare
@Deprecated public void prepare(BlockState state, WorldAccess world, BlockPos pos, int flags, int maxUpdateDepth)Deprecated. -
getStateForNeighborUpdate
@Deprecated public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)Deprecated. -
isSideInvisible
@Environment(CLIENT) @Deprecated public boolean isSideInvisible(BlockState state, BlockState stateFrom, Direction direction)Deprecated. -
neighborUpdate
@Deprecated public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)Deprecated. -
onBlockAdded
@Deprecated public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)Deprecated. -
onStateReplaced
@Deprecated public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Deprecated.Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)
ifnewState
is different fromstate
. Vanilla blocks perform removal cleanups here. -
onUse
@Deprecated public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Deprecated.Called when this block is used by a player. This, by default, is bound to using the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient()
.If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Returns:
- an action result that specifies if using the block was successful.
-
onSyncedBlockEvent
@Deprecated public boolean onSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data)Deprecated. -
getRenderType
Deprecated. -
hasSidedTransparency
Deprecated. -
emitsRedstonePower
Deprecated. -
getPistonBehavior
Deprecated. -
getFluidState
Deprecated. -
hasComparatorOutput
Deprecated. -
getOffsetType
-
rotate
Deprecated.Applies a block rotation to a block state.By default, this returns the provided block state.
- Returns:
- the rotated block state
-
mirror
Deprecated. -
canReplace
Deprecated. -
canBucketPlace
Deprecated. -
getDroppedStacks
Deprecated. -
getRenderingSeed
Deprecated. -
getCullingShape
Deprecated. -
getSidesShape
Deprecated. -
getRaycastShape
Deprecated. -
getOpacity
Deprecated. -
createScreenHandlerFactory
@Nullable @Deprecated public NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos)Deprecated. -
canPlaceAt
Deprecated. -
getAmbientOcclusionLightLevel
@Environment(CLIENT) @Deprecated public float getAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos)Deprecated. -
getComparatorOutput
Deprecated. -
getOutlineShape
@Deprecated public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)Deprecated. -
getCollisionShape
@Deprecated public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)Deprecated. -
getVisualShape
@Deprecated public VoxelShape getVisualShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)Deprecated. -
randomTick
@Deprecated public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)Deprecated. -
scheduledTick
@Deprecated public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)Deprecated. -
calcBlockBreakingDelta
@Deprecated public float calcBlockBreakingDelta(BlockState state, PlayerEntity player, BlockView world, BlockPos pos)Deprecated. -
onStacksDropped
@Deprecated public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack)Deprecated. -
onBlockBreakStart
@Deprecated public void onBlockBreakStart(BlockState state, World world, BlockPos pos, PlayerEntity player)Deprecated. -
getWeakRedstonePower
@Deprecated public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)Deprecated. -
onEntityCollision
@Deprecated public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity)Deprecated. -
getStrongRedstonePower
@Deprecated public int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)Deprecated. -
hasBlockEntity
public final boolean hasBlockEntity() -
getLootTableId
-
onProjectileHit
@Deprecated public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)Deprecated. -
asItem
-
asBlock
-
getDefaultMaterialColor
-