Class AnvilBlock

All Implemented Interfaces:
LandingBlock, ItemConvertible, ToggleableFeature

public class AnvilBlock extends FallingBlock
Mappings:
Namespace Name
named net/minecraft/block/AnvilBlock
intermediary net/minecraft/class_2199
official deb
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<AnvilBlock> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/block/AnvilBlock;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_46258 Lnet/minecraft/class_2199;field_46258:Lcom/mojang/serialization/MapCodec;
      official a Ldeb;a:Lcom/mojang/serialization/MapCodec;
    • FACING

      public static final DirectionProperty FACING
      Mappings:
      Namespace Name Mixin selector
      named FACING Lnet/minecraft/block/AnvilBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
      intermediary field_9883 Lnet/minecraft/class_2199;field_9883:Lnet/minecraft/class_2753;
      official b Ldeb;b:Ldsy;
    • BASE_SHAPE

      private static final VoxelShape BASE_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named BASE_SHAPE Lnet/minecraft/block/AnvilBlock;BASE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9882 Lnet/minecraft/class_2199;field_9882:Lnet/minecraft/class_265;
      official c Ldeb;c:Lewm;
    • X_STEP_SHAPE

      private static final VoxelShape X_STEP_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named X_STEP_SHAPE Lnet/minecraft/block/AnvilBlock;X_STEP_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9885 Lnet/minecraft/class_2199;field_9885:Lnet/minecraft/class_265;
      official d Ldeb;d:Lewm;
    • X_STEM_SHAPE

      private static final VoxelShape X_STEM_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named X_STEM_SHAPE Lnet/minecraft/block/AnvilBlock;X_STEM_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9888 Lnet/minecraft/class_2199;field_9888:Lnet/minecraft/class_265;
      official e Ldeb;e:Lewm;
    • X_FACE_SHAPE

      private static final VoxelShape X_FACE_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named X_FACE_SHAPE Lnet/minecraft/block/AnvilBlock;X_FACE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9884 Lnet/minecraft/class_2199;field_9884:Lnet/minecraft/class_265;
      official f Ldeb;f:Lewm;
    • Z_STEP_SHAPE

      private static final VoxelShape Z_STEP_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named Z_STEP_SHAPE Lnet/minecraft/block/AnvilBlock;Z_STEP_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9891 Lnet/minecraft/class_2199;field_9891:Lnet/minecraft/class_265;
      official g Ldeb;g:Lewm;
    • Z_STEM_SHAPE

      private static final VoxelShape Z_STEM_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named Z_STEM_SHAPE Lnet/minecraft/block/AnvilBlock;Z_STEM_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9889 Lnet/minecraft/class_2199;field_9889:Lnet/minecraft/class_265;
      official h Ldeb;h:Lewm;
    • Z_FACE_SHAPE

      private static final VoxelShape Z_FACE_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named Z_FACE_SHAPE Lnet/minecraft/block/AnvilBlock;Z_FACE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9886 Lnet/minecraft/class_2199;field_9886:Lnet/minecraft/class_265;
      official i Ldeb;i:Lewm;
    • X_AXIS_SHAPE

      private static final VoxelShape X_AXIS_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named X_AXIS_SHAPE Lnet/minecraft/block/AnvilBlock;X_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9887 Lnet/minecraft/class_2199;field_9887:Lnet/minecraft/class_265;
      official j Ldeb;j:Lewm;
    • Z_AXIS_SHAPE

      private static final VoxelShape Z_AXIS_SHAPE
      Mappings:
      Namespace Name Mixin selector
      named Z_AXIS_SHAPE Lnet/minecraft/block/AnvilBlock;Z_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
      intermediary field_9892 Lnet/minecraft/class_2199;field_9892:Lnet/minecraft/class_265;
      official k Ldeb;k:Lewm;
    • TITLE

      private static final Text TITLE
      Mappings:
      Namespace Name Mixin selector
      named TITLE Lnet/minecraft/block/AnvilBlock;TITLE:Lnet/minecraft/text/Text;
      intermediary field_17349 Lnet/minecraft/class_2199;field_17349:Lnet/minecraft/class_2561;
      official l Ldeb;l:Lxp;
    • 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_MULTIPLIER Lnet/minecraft/block/AnvilBlock;FALLING_BLOCK_ENTITY_DAMAGE_MULTIPLIER:F
      intermediary field_30993 Lnet/minecraft/class_2199;field_30993:F
      official m Ldeb;m: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_DAMAGE Lnet/minecraft/block/AnvilBlock;FALLING_BLOCK_ENTITY_MAX_DAMAGE:I
      intermediary field_30994 Lnet/minecraft/class_2199;field_30994:I
      official n Ldeb;n:I
  • Constructor Details

    • AnvilBlock

      public AnvilBlock(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
      intermediary <init> Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
      official <init> Ldsd;<init>(Ldsd$d;)V
  • Method Details

    • getCodec

      public com.mojang.serialization.MapCodec<AnvilBlock> getCodec()
      Specified by:
      getCodec in class FallingBlock
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_53969 Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;
      official a Ldsd;a()Lcom/mojang/serialization/MapCodec;
    • getPlacementState

      public BlockState getPlacementState(ItemPlacementContext ctx)
      Overrides:
      getPlacementState in class Block
      Mappings:
      Namespace Name Mixin selector
      named getPlacementState Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
      intermediary method_9605 Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
      official a Ldfb;a(Lcyc;)Ldse;
    • onUse

      protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit)
      Overrides:
      onUse in class AbstractBlock
      Mappings:
      Namespace Name Mixin selector
      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/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
      intermediary method_55766 Lnet/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 a Ldsd;a(Ldse;Ldca;Liz;Lcmz;Levp;)Lbqw;
    • createScreenHandlerFactory

      @Nullable protected @Nullable NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos)
      Returns the screen handler factory or null 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). See createScreenHandlerFactory(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos) for basic usage. BlockWithEntity delegates this logic to the block entity implementing NamedScreenHandlerFactory. For example, any BlockWithEntity whose block entity extends LockableContainerBlockEntity needs to override LockableContainerBlockEntity.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 class AbstractBlock
      Returns:
      the screen handler factory or null if screen handler cannot be created
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named createScreenHandlerFactory Lnet/minecraft/block/AbstractBlock;createScreenHandlerFactory(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/screen/NamedScreenHandlerFactory;
      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;
      official b Ldsd;b(Ldse;Ldca;Liz;)Lbra;
    • getOutlineShape

      protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
      Overrides:
      getOutlineShape in class AbstractBlock
      See Also:
      Mappings:
      Namespace Name Mixin selector
      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;
      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;
      official a Ldsd;a(Ldse;Ldbg;Liz;Levy;)Lewm;
    • configureFallingBlockEntity

      protected void configureFallingBlockEntity(FallingBlockEntity entity)
      Overrides:
      configureFallingBlockEntity in class FallingBlock
      Mappings:
      Namespace Name Mixin selector
      named configureFallingBlockEntity Lnet/minecraft/block/FallingBlock;configureFallingBlockEntity(Lnet/minecraft/entity/FallingBlockEntity;)V
      intermediary method_10132 Lnet/minecraft/class_2346;method_10132(Lnet/minecraft/class_1540;)V
      official a Ldhx;a(Lcji;)V
    • onLanding

      public void onLanding(World world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity)
      Mappings:
      Namespace Name Mixin selector
      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
      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
      official a Ldhw;a(Ldca;Liz;Ldse;Ldse;Lcji;)V
    • onDestroyedOnLanding

      public void onDestroyedOnLanding(World world, BlockPos pos, FallingBlockEntity fallingBlockEntity)
      Mappings:
      Namespace Name Mixin selector
      named onDestroyedOnLanding Lnet/minecraft/block/LandingBlock;onDestroyedOnLanding(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/FallingBlockEntity;)V
      intermediary method_10129 Lnet/minecraft/class_5688;method_10129(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1540;)V
      official a Ldhw;a(Ldca;Liz;Lcji;)V
    • getDamageSource

      public DamageSource getDamageSource(Entity attacker)
      Mappings:
      Namespace Name Mixin selector
      named getDamageSource Lnet/minecraft/block/LandingBlock;getDamageSource(Lnet/minecraft/entity/Entity;)Lnet/minecraft/entity/damage/DamageSource;
      intermediary method_32898 Lnet/minecraft/class_5688;method_32898(Lnet/minecraft/class_1297;)Lnet/minecraft/class_1282;
      official a Ldhw;a(Lbsw;)Lbrp;
    • getLandingState

      @Nullable public static @Nullable BlockState getLandingState(BlockState fallingState)
      Mappings:
      Namespace Name Mixin selector
      named getLandingState Lnet/minecraft/block/AnvilBlock;getLandingState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
      intermediary method_9346 Lnet/minecraft/class_2199;method_9346(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;
      official e Ldeb;e(Ldse;)Ldse;
    • rotate

      protected BlockState rotate(BlockState state, BlockRotation rotation)
      Returns state rotated by rotation.

      By default, this returns the provided block state.

      Overrides:
      rotate in class AbstractBlock
      Returns:
      state rotated by rotation
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named rotate Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
      intermediary method_9598 Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
      official a Ldsd;a(Ldse;Ldlo;)Ldse;
    • appendProperties

      protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
      Appends block state properties to this block. To use this, override and call StateManager.Builder.add(net.minecraft.state.property.Property<?>[]) inside the method. See Properties for the list of pre-defined properties.
      Overrides:
      appendProperties in class Block
      Mappings:
      Namespace Name Mixin selector
      named appendProperties Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
      intermediary method_9515 Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
      official a Ldfb;a(Ldsf$a;)V
    • canPathfindThrough

      protected boolean canPathfindThrough(BlockState state, NavigationType type)
      Returns if an entity using navigation type type can navigate through this block.
      Overrides:
      canPathfindThrough in class AbstractBlock
      Returns:
      if an entity using navigation type type can navigate through this block
      See Also:
      API Note:
      Subclasses may override this to prevent or restrict pathfinding through the block. For example, DoorBlock restricts it to open doors only.
      Mappings:
      Namespace Name Mixin selector
      named canPathfindThrough Lnet/minecraft/block/AbstractBlock;canPathfindThrough(Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/ai/pathing/NavigationType;)Z
      intermediary method_9516 Lnet/minecraft/class_4970;method_9516(Lnet/minecraft/class_2680;Lnet/minecraft/class_10;)Z
      official a Ldsd;a(Ldse;Leom;)Z
    • getColor

      public int getColor(BlockState state, BlockView world, BlockPos pos)
      Overrides:
      getColor in class FallingBlock
      Mappings:
      Namespace Name Mixin selector
      named getColor Lnet/minecraft/block/FallingBlock;getColor(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I
      intermediary method_10130 Lnet/minecraft/class_2346;method_10130(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)I
      official b Ldhx;b(Ldse;Ldbg;Liz;)I