Class AnvilBlock
- All Implemented Interfaces:
LandingBlock
,ItemConvertible
,ToggleableFeature
- Mappings:
Namespace Name official col
intermediary net/minecraft/class_2199
named net/minecraft/block/AnvilBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final VoxelShape
static final DirectionProperty
private static final float
private static final int
private static final Text
private static final VoxelShape
private static final VoxelShape
private static final VoxelShape
private static final VoxelShape
private static final VoxelShape
private static final VoxelShape
private static final VoxelShape
private static final VoxelShape
Fields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendProperties
(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.boolean
canPathfindThrough
(BlockState state, BlockView world, BlockPos pos, NavigationType type) Returns if an entity using navigation typetype
can navigate through this block.protected void
createScreenHandlerFactory
(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornull
if screen handler cannot be created.int
getColor
(BlockState state, BlockView world, BlockPos pos) getDamageSource
(Entity attacker) static @Nullable BlockState
getLandingState
(BlockState fallingState) getOutlineShape
(BlockState state, BlockView world, BlockPos pos, ShapeContext context) void
onDestroyedOnLanding
(World world, BlockPos pos, FallingBlockEntity fallingBlockEntity) void
onLanding
(World world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity) onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.rotate
(BlockState state, BlockRotation rotation) Returnsstate
rotated byrotation
.Methods inherited from class net.minecraft.block.FallingBlock
canFallThrough, getFallDelay, getStateForNeighborUpdate, onBlockAdded, randomDisplayTick, scheduledTick
Methods inherited from class net.minecraft.block.Block
afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.block.LandingBlock
getEntityPredicate
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
FACING
- Mappings:
Namespace Name Mixin selector official a
Lcol;a:Ldcs;
intermediary field_9883
Lnet/minecraft/class_2199;field_9883:Lnet/minecraft/class_2753;
named FACING
Lnet/minecraft/block/AnvilBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
-
BASE_SHAPE
- Mappings:
Namespace Name Mixin selector official b
Lcol;b:Leet;
intermediary field_9882
Lnet/minecraft/class_2199;field_9882:Lnet/minecraft/class_265;
named BASE_SHAPE
Lnet/minecraft/block/AnvilBlock;BASE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
X_STEP_SHAPE
- Mappings:
Namespace Name Mixin selector official c
Lcol;c:Leet;
intermediary field_9885
Lnet/minecraft/class_2199;field_9885:Lnet/minecraft/class_265;
named X_STEP_SHAPE
Lnet/minecraft/block/AnvilBlock;X_STEP_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
X_STEM_SHAPE
- Mappings:
Namespace Name Mixin selector official d
Lcol;d:Leet;
intermediary field_9888
Lnet/minecraft/class_2199;field_9888:Lnet/minecraft/class_265;
named X_STEM_SHAPE
Lnet/minecraft/block/AnvilBlock;X_STEM_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
X_FACE_SHAPE
- Mappings:
Namespace Name Mixin selector official e
Lcol;e:Leet;
intermediary field_9884
Lnet/minecraft/class_2199;field_9884:Lnet/minecraft/class_265;
named X_FACE_SHAPE
Lnet/minecraft/block/AnvilBlock;X_FACE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
Z_STEP_SHAPE
- Mappings:
Namespace Name Mixin selector official f
Lcol;f:Leet;
intermediary field_9891
Lnet/minecraft/class_2199;field_9891:Lnet/minecraft/class_265;
named Z_STEP_SHAPE
Lnet/minecraft/block/AnvilBlock;Z_STEP_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
Z_STEM_SHAPE
- Mappings:
Namespace Name Mixin selector official g
Lcol;g:Leet;
intermediary field_9889
Lnet/minecraft/class_2199;field_9889:Lnet/minecraft/class_265;
named Z_STEM_SHAPE
Lnet/minecraft/block/AnvilBlock;Z_STEM_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
Z_FACE_SHAPE
- Mappings:
Namespace Name Mixin selector official h
Lcol;h:Leet;
intermediary field_9886
Lnet/minecraft/class_2199;field_9886:Lnet/minecraft/class_265;
named Z_FACE_SHAPE
Lnet/minecraft/block/AnvilBlock;Z_FACE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
X_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official i
Lcol;i:Leet;
intermediary field_9887
Lnet/minecraft/class_2199;field_9887:Lnet/minecraft/class_265;
named X_AXIS_SHAPE
Lnet/minecraft/block/AnvilBlock;X_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
Z_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official j
Lcol;j:Leet;
intermediary field_9892
Lnet/minecraft/class_2199;field_9892:Lnet/minecraft/class_265;
named Z_AXIS_SHAPE
Lnet/minecraft/block/AnvilBlock;Z_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
TITLE
- Mappings:
Namespace Name Mixin selector official k
Lcol;k:Lsw;
intermediary field_17349
Lnet/minecraft/class_2199;field_17349:Lnet/minecraft/class_2561;
named TITLE
Lnet/minecraft/block/AnvilBlock;TITLE:Lnet/minecraft/text/Text;
-
FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER
private static final float FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER- See Also:
- Mappings:
Namespace Name Mixin selector official l
Lcol;l:F
intermediary field_30993
Lnet/minecraft/class_2199;field_30993:F
named FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER
Lnet/minecraft/block/AnvilBlock;FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER:F
-
FALLING_BLOCK_ENTITY_MAX_DAMAGE
private static final int FALLING_BLOCK_ENTITY_MAX_DAMAGE- See Also:
- Mappings:
Namespace Name Mixin selector official m
Lcol;m:I
intermediary field_30994
Lnet/minecraft/class_2199;field_30994:I
named FALLING_BLOCK_ENTITY_MAX_DAMAGE
Lnet/minecraft/block/AnvilBlock;FALLING_BLOCK_ENTITY_MAX_DAMAGE:I
-
-
Constructor Details
-
AnvilBlock
- Mappings:
Namespace Name Mixin selector official <init>
Ldbx;<init>(Ldbx$d;)V
intermediary <init>
Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
named <init>
Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lcpl;a(Lcif;)Ldby;
intermediary method_9605
Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
named getPlacementState
Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
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:
onUse
in classAbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official a
Ldbx;a(Ldby;Lcmk;Lgu;Lbym;Lbdv;Ledw;)Lbdw;
intermediary method_9534
Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;
named onUse
Lnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
createScreenHandlerFactory
@Nullable public @Nullable NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornull
if screen handler cannot be created.This method should be overridden for blocks with screen handlers, such as anvils. The created screen handler is usually passed to
PlayerEntity.openHandledScreen(net.minecraft.screen.NamedScreenHandlerFactory)
. SeecreateScreenHandlerFactory(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)
for basic usage.BlockWithEntity
delegates this logic to the block entity implementingNamedScreenHandlerFactory
. For example, anyBlockWithEntity
whose block entity extendsLockableContainerBlockEntity
needs to overrideLockableContainerBlockEntity.createScreenHandler(int, net.minecraft.entity.player.PlayerInventory)
instead of this method.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
.- Overrides:
createScreenHandlerFactory
in classAbstractBlock
- Returns:
- the screen handler factory or
null
if screen handler cannot be created - See Also:
- Mappings:
Namespace Name Mixin selector official b
Ldbx;b(Ldby;Lcmk;Lgu;)Lbdz;
intermediary method_17454
Lnet/minecraft/class_4970;method_17454(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3908;
named createScreenHandlerFactory
Lnet/minecraft/block/AbstractBlock;createScreenHandlerFactory(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/screen/NamedScreenHandlerFactory;
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShape
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Ldbx;a(Ldby;Lclq;Lgu;Leef;)Leet;
intermediary method_9530
Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;
named getOutlineShape
Lnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
configureFallingBlockEntity
- Overrides:
configureFallingBlockEntity
in classFallingBlock
- Mappings:
Namespace Name Mixin selector official a
Lcsc;a(Lbve;)V
intermediary method_10132
Lnet/minecraft/class_2346;method_10132(Lnet/minecraft/class_1540;)V
named configureFallingBlockEntity
Lnet/minecraft/block/FallingBlock;configureFallingBlockEntity(Lnet/minecraft/entity/FallingBlockEntity;)V
-
onLanding
public void onLanding(World world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity) - Mappings:
Namespace Name Mixin selector official a
Lcsb;a(Lcmk;Lgu;Ldby;Ldby;Lbve;)V
intermediary method_10127
Lnet/minecraft/class_5688;method_10127(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_1540;)V
named onLanding
Lnet/minecraft/block/LandingBlock;onLanding(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/FallingBlockEntity;)V
-
onDestroyedOnLanding
- Mappings:
Namespace Name Mixin selector official a
Lcsb;a(Lcmk;Lgu;Lbve;)V
intermediary method_10129
Lnet/minecraft/class_5688;method_10129(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1540;)V
named onDestroyedOnLanding
Lnet/minecraft/block/LandingBlock;onDestroyedOnLanding(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/FallingBlockEntity;)V
-
getDamageSource
- Mappings:
Namespace Name Mixin selector official a
Lcsb;a(Lbfh;)Lbem;
intermediary method_32898
Lnet/minecraft/class_5688;method_32898(Lnet/minecraft/class_1297;)Lnet/minecraft/class_1282;
named getDamageSource
Lnet/minecraft/block/LandingBlock;getDamageSource(Lnet/minecraft/entity/Entity;)Lnet/minecraft/entity/damage/DamageSource;
-
getLandingState
- Mappings:
Namespace Name Mixin selector official e
Lcol;e(Ldby;)Ldby;
intermediary method_9346
Lnet/minecraft/class_2199;method_9346(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;
named getLandingState
Lnet/minecraft/block/AnvilBlock;getLandingState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
rotate
Returnsstate
rotated byrotation
.By default, this returns the provided block state.
- Overrides:
rotate
in classAbstractBlock
- Returns:
state
rotated byrotation
- Mappings:
Namespace Name Mixin selector official a
Ldbx;a(Ldby;Lcvw;)Ldby;
intermediary method_9598
Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
named rotate
Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])
inside the method. SeeProperties
for the list of pre-defined properties.- Overrides:
appendProperties
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lcpl;a(Ldbz$a;)V
intermediary method_9515
Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
named appendProperties
Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
getColor
- Overrides:
getColor
in classFallingBlock
- Mappings:
Namespace Name Mixin selector official d
Lcsc;d(Ldby;Lclq;Lgu;)I
intermediary method_10130
Lnet/minecraft/class_2346;method_10130(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)I
named getColor
Lnet/minecraft/block/FallingBlock;getColor(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
-