Class LoomBlock

All Implemented Interfaces:
ItemConvertible, ToggleableFeature

public class LoomBlock extends HorizontalFacingBlock
Mappings:
Namespace Name
official dbh
intermediary net/minecraft/class_2406
named net/minecraft/block/LoomBlock
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<LoomBlock> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Ldbh;a:Lcom/mojang/serialization/MapCodec;
      intermediary field_46392 Lnet/minecraft/class_2406;field_46392:Lcom/mojang/serialization/MapCodec;
      named CODEC Lnet/minecraft/block/LoomBlock;CODEC:Lcom/mojang/serialization/MapCodec;
    • TITLE

      private static final Text TITLE
      Mappings:
      Namespace Name Mixin selector
      official b Ldbh;b:Lvf;
      intermediary field_17373 Lnet/minecraft/class_2406;field_17373:Lnet/minecraft/class_2561;
      named TITLE Lnet/minecraft/block/LoomBlock;TITLE:Lnet/minecraft/text/Text;
  • Constructor Details

    • LoomBlock

      protected LoomBlock(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldjg;<init>(Ldjg$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

    • getCodec

      public com.mojang.serialization.MapCodec<LoomBlock> getCodec()
      Specified by:
      getCodec in class HorizontalFacingBlock
      Mappings:
      Namespace Name Mixin selector
      official a Ldjg;a()Lcom/mojang/serialization/MapCodec;
      intermediary method_53969 Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;
      named getCodec Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
    • 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 class AbstractBlock
      Returns:
      an action result that specifies if using the block was successful.
      Mappings:
      Namespace Name Mixin selector
      official a Ldjg;a(Ldjh;Lctp;Lhx;Lcfi;Lbka;Lelp;)Lbkb;
      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

      public 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 AnvilBlock.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
      official b Ldjg;b(Ldjh;Lctp;Lhx;)Lbke;
      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;
    • getPlacementState

      public BlockState getPlacementState(ItemPlacementContext ctx)
      Overrides:
      getPlacementState in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lcwq;a(Lcph;)Ldjh;
      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;
    • 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
      official a Lcwq;a(Ldji$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