public class AnvilBlock extends FallingBlock
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and Description |
---|---|
private static VoxelShape |
BASE_SHAPE |
static DirectionProperty |
FACING |
private static Text |
TITLE |
private static VoxelShape |
X_AXIS_SHAPE |
private static VoxelShape |
X_FACE_SHAPE |
private static VoxelShape |
X_STEM_SHAPE |
private static VoxelShape |
X_STEP_SHAPE |
private static VoxelShape |
Z_AXIS_SHAPE |
private static VoxelShape |
Z_FACE_SHAPE |
private static VoxelShape |
Z_STEM_SHAPE |
private static VoxelShape |
Z_STEP_SHAPE |
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Constructor and Description |
---|
AnvilBlock(AbstractBlock.Settings settings) |
canFallThrough, getFallDelay, getStateForNeighborUpdate, onBlockAdded, randomDisplayTick, scheduledTick
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick
public static final DirectionProperty FACING
private static final VoxelShape BASE_SHAPE
private static final VoxelShape X_STEP_SHAPE
private static final VoxelShape X_STEM_SHAPE
private static final VoxelShape X_FACE_SHAPE
private static final VoxelShape Z_STEP_SHAPE
private static final VoxelShape Z_STEM_SHAPE
private static final VoxelShape Z_FACE_SHAPE
private static final VoxelShape X_AXIS_SHAPE
private static final VoxelShape Z_AXIS_SHAPE
private static final Text TITLE
public AnvilBlock(AbstractBlock.Settings settings)
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
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.
onUse
in class AbstractBlock
@Nullable public NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos)
createScreenHandlerFactory
in class AbstractBlock
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
protected void configureFallingBlockEntity(FallingBlockEntity entity)
configureFallingBlockEntity
in class FallingBlock
public void onLanding(World world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity)
onLanding
in class FallingBlock
public void onDestroyedOnLanding(World world, BlockPos pos, FallingBlockEntity fallingBlockEntity)
onDestroyedOnLanding
in class FallingBlock
@Nullable public static BlockState getLandingState(BlockState fallingState)
public BlockState rotate(BlockState state, BlockRotation rotation)
By default, this returns the provided block state.
rotate
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough
in class AbstractBlock
@Environment(value=CLIENT) public int getColor(BlockState state, BlockView world, BlockPos pos)
getColor
in class FallingBlock