Class AnvilBlock
- All Implemented Interfaces:
Falling,ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/block/AnvilBlockintermediary net/minecraft/class_2199official dxi
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.SetBlockStateFlagNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<AnvilBlock> static final EnumProperty<Direction> private static final floatprivate static final intprivate static final Map<Direction.Axis, VoxelShape> private static final TextFields inherited from class net.minecraft.block.Block
field_31023, field_31024, field_31025, FORCE_STATE, FORCE_STATE_AND_SKIP_CALLBACKS_AND_DROPS, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_BLOCK_ADDED_CALLBACK, SKIP_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_DROPS, SKIP_REDRAW_AND_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_REDSTONE_WIRE_STATE_REPLACEMENT, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, translationKey, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.protected booleancanPathfindThrough(BlockState state, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.protected voidprotected @Nullable NamedScreenHandlerFactorycreateScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornullif screen handler cannot be created.com.mojang.serialization.MapCodec<AnvilBlock> getCodec()intgetColor(BlockState state, BlockView world, BlockPos pos) getDamageSource(Entity attacker) static @Nullable BlockStategetLandingState(BlockState fallingState) protected VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) voidonDestroyedOnLanding(World world, BlockPos pos, FallingBlockEntity fallingBlockEntity) voidonLanding(World world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity) protected ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) protected BlockStaterotate(BlockState state, BlockRotation rotation) Returnsstaterotated byrotation.Methods inherited from class net.minecraft.block.FallingBlock
canFallThrough, getFallDelay, getStateForNeighborUpdate, onBlockAdded, randomDisplayTick, scheduledTickMethods inherited from class net.minecraft.block.Block
afterBreak, asBlock, asItem, canMobSpawnInside, cannotConnect, createColumnShape, createColumnShape, createCubeShape, createCuboidShape, createCuboidShape, createCuboidZShape, createCuboidZShape, createCuboidZShape, createShapeArray, createShapeFunction, createShapeFunction, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, generateBlockInteractLoot, generateLoot, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getRegistryEntry, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createCodec, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isShapeFullCube, isSideInvisible, isTransparent, keepBlockEntityWhenReplacedWith, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUseWithItem, prepare, randomTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/block/AnvilBlock;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_46258Lnet/minecraft/class_2199;field_46258:Lcom/mojang/serialization/MapCodec;official aLdxi;a:Lcom/mojang/serialization/MapCodec;
-
FACING
- Mappings:
Namespace Name Mixin selector named FACINGLnet/minecraft/block/AnvilBlock;FACING:Lnet/minecraft/state/property/EnumProperty;intermediary field_9883Lnet/minecraft/class_2199;field_9883:Lnet/minecraft/class_2754;official bLdxi;b:Lenx;
-
SHAPES_BY_AXIS
- Mappings:
Namespace Name Mixin selector named SHAPES_BY_AXISLnet/minecraft/block/AnvilBlock;SHAPES_BY_AXIS:Ljava/util/Map;intermediary field_55730Lnet/minecraft/class_2199;field_55730:Ljava/util/Map;official cLdxi;c:Ljava/util/Map;
-
TITLE
- Mappings:
Namespace Name Mixin selector named TITLELnet/minecraft/block/AnvilBlock;TITLE:Lnet/minecraft/text/Text;intermediary field_17349Lnet/minecraft/class_2199;field_17349:Lnet/minecraft/class_2561;official dLdxi;d:Lyh;
-
FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER
private static final float FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER- See Also:
- Mappings:
Namespace Name Mixin selector named FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIERLnet/minecraft/block/AnvilBlock;FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER:Fintermediary field_30993Lnet/minecraft/class_2199;field_30993:Fofficial eLdxi;e:F
-
FALLING_BLOCK_ENTITY_MAX_DAMAGE
private static final int FALLING_BLOCK_ENTITY_MAX_DAMAGE- See Also:
- Mappings:
Namespace Name Mixin selector named FALLING_BLOCK_ENTITY_MAX_DAMAGELnet/minecraft/block/AnvilBlock;FALLING_BLOCK_ENTITY_MAX_DAMAGE:Iintermediary field_30994Lnet/minecraft/class_2199;field_30994:Iofficial fLdxi;f:I
-
-
Constructor Details
-
AnvilBlock
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vofficial <init>Lemy;<init>(Lemy$d;)V
-
-
Method Details
-
getCodec
- Specified by:
getCodecin classFallingBlock- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;official aLemy;a()Lcom/mojang/serialization/MapCodec;
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;official aLdyi;a(Ldom;)Lemz;
-
onUse
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) - Overrides:
onUsein classAbstractBlock- Mappings:
Namespace Name Mixin selector named onUseLnet/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/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;intermediary method_55766Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;official aLemy;a(Lemz;Ldvg;Lis;Ldcm;Lfsa;)Lcda;
-
createScreenHandlerFactory
protected @Nullable NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornullif 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.BlockWithEntitydelegates this logic to the block entity implementingNamedScreenHandlerFactory. For example, anyBlockWithEntitywhose block entity extendsLockableContainerBlockEntityneeds 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:
createScreenHandlerFactoryin classAbstractBlock- Returns:
- the screen handler factory or
nullif screen handler cannot be created - See Also:
- Mappings:
Namespace Name Mixin selector named createScreenHandlerFactoryLnet/minecraft/block/AbstractBlock;createScreenHandlerFactory(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/screen/NamedScreenHandlerFactory;intermediary method_17454Lnet/minecraft/class_4970;method_17454(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3908;official aLemy;a(Lemz;Ldvg;Lis;)Lcdd;
-
getOutlineShape
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named getOutlineShapeLnet/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;intermediary method_9530Lnet/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;official aLemy;a(Lemz;Ldul;Lis;Lfsj;)Lfsy;
-
configureFallingBlockEntity
- Overrides:
configureFallingBlockEntityin classFallingBlock- Mappings:
Namespace Name Mixin selector named configureFallingBlockEntityLnet/minecraft/block/FallingBlock;configureFallingBlockEntity(Lnet/minecraft/entity/FallingBlockEntity;)Vintermediary method_10132Lnet/minecraft/class_2346;method_10132(Lnet/minecraft/class_1540;)Vofficial aLebj;a(Lcyq;)V
-
onLanding
public void onLanding(World world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity) - Mappings:
Namespace Name Mixin selector named onLandingLnet/minecraft/block/Falling;onLanding(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/FallingBlockEntity;)Vintermediary method_10127Lnet/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;)Vofficial aLebi;a(Ldvg;Lis;Lemz;Lemz;Lcyq;)V
-
onDestroyedOnLanding
- Mappings:
Namespace Name Mixin selector named onDestroyedOnLandingLnet/minecraft/block/Falling;onDestroyedOnLanding(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/FallingBlockEntity;)Vintermediary method_10129Lnet/minecraft/class_5688;method_10129(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1540;)Vofficial aLebi;a(Ldvg;Lis;Lcyq;)V
-
getDamageSource
- Mappings:
Namespace Name Mixin selector named getDamageSourceLnet/minecraft/block/Falling;getDamageSource(Lnet/minecraft/entity/Entity;)Lnet/minecraft/entity/damage/DamageSource;intermediary method_32898Lnet/minecraft/class_5688;method_32898(Lnet/minecraft/class_1297;)Lnet/minecraft/class_1282;official aLebi;a(Lcgi;)Lcev;
-
getLandingState
- Mappings:
Namespace Name Mixin selector named getLandingStateLnet/minecraft/block/AnvilBlock;getLandingState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;intermediary method_9346Lnet/minecraft/class_2199;method_9346(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;official eLdxi;e(Lemz;)Lemz;
-
rotate
Returnsstaterotated byrotation.By default, this returns the provided block state.
- Overrides:
rotatein classAbstractBlock- Returns:
staterotated byrotation- See Also:
- Mappings:
Namespace Name Mixin selector named rotateLnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;intermediary method_9598Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;official aLemy;a(Lemz;Lefe;)Lemz;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector named appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vofficial aLdyi;a(Lena$a;)V
-
getColor
- Specified by:
getColorin classFallingBlock- Mappings:
Namespace Name Mixin selector named getColorLnet/minecraft/block/FallingBlock;getColor(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Iintermediary method_10130Lnet/minecraft/class_2346;method_10130(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Iofficial bLebj;b(Lemz;Ldul;Lis;)I
-