Package net.minecraft.block
Class AnvilBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.FallingBlock
net.minecraft.block.AnvilBlock
- All Implemented Interfaces:
LandingBlock,ItemConvertible
public class AnvilBlock extends FallingBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
Fields Modifier and Type Field Description private static VoxelShapeBASE_SHAPEstatic DirectionPropertyFACINGprivate static TextTITLEprivate static VoxelShapeX_AXIS_SHAPEprivate static VoxelShapeX_FACE_SHAPEprivate static VoxelShapeX_STEM_SHAPEprivate static VoxelShapeX_STEP_SHAPEprivate static VoxelShapeZ_AXIS_SHAPEprivate static VoxelShapeZ_FACE_SHAPEprivate static VoxelShapeZ_STEM_SHAPEprivate static VoxelShapeZ_STEP_SHAPEFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Constructor Description AnvilBlock(AbstractBlock.Settings settings) -
Method Summary
Methods inherited from class net.minecraft.block.FallingBlock
canFallThrough, getFallDelay, getStateForNeighborUpdate, onBlockAdded, randomDisplayTick, scheduledTickMethods inherited from class net.minecraft.block.Block
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, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.LandingBlock
getEntityPredicate
-
Field Details
-
FACING
-
BASE_SHAPE
-
X_STEP_SHAPE
-
X_STEM_SHAPE
-
X_FACE_SHAPE
-
Z_STEP_SHAPE
-
Z_STEM_SHAPE
-
Z_FACE_SHAPE
-
X_AXIS_SHAPE
-
Z_AXIS_SHAPE
-
TITLE
-
-
Constructor Details
-
AnvilBlock
-
-
Method Details
-
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)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.
- Overrides:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
-
createScreenHandlerFactory
@Nullable public NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos)- Overrides:
createScreenHandlerFactoryin classAbstractBlock
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
configureFallingBlockEntity
- Overrides:
configureFallingBlockEntityin classFallingBlock
-
onLanding
public void onLanding(World world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity) -
onDestroyedOnLanding
-
getDamageSource
-
getLandingState
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotatein classAbstractBlock- Returns:
- the rotated block state
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
getColor
- Overrides:
getColorin classFallingBlock
-