Class HayBlock

All Implemented Interfaces:
ItemConvertible, ToggleableFeature

public class HayBlock extends PillarBlock
Mappings:
Namespace Name
named net/minecraft/block/HayBlock
intermediary net/minecraft/class_2380
official dof
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<HayBlock> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/block/HayBlock;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_46368 Lnet/minecraft/class_2380;field_46368:Lcom/mojang/serialization/MapCodec;
      official a Ldof;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • HayBlock

      public HayBlock(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> Ldxt;<init>(Ldxt$d;)V
  • Method Details

    • getCodec

      public com.mojang.serialization.MapCodec<HayBlock> getCodec()
      Overrides:
      getCodec in class PillarBlock
      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 Ldxt;a()Lcom/mojang/serialization/MapCodec;
    • onLandedUpon

      public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance)
      Called when the entity lands on the block.

      Default implementation deals fall damage to the entity. Blocks that increase or reduce fall damage (like HayBlock) should override this. FarmlandBlock overrides this method to convert the block to dirt.

      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:
      onLandedUpon in class Block
      Mappings:
      Namespace Name Mixin selector
      named onLandedUpon Lnet/minecraft/block/Block;onLandedUpon(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;F)V
      intermediary method_9554 Lnet/minecraft/class_2248;method_9554(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;F)V
      official a Ldkl;a(Ldhh;Ldxu;Ljh;Lbvj;F)V