Class HayBlock

All Implemented Interfaces:
ItemConvertible

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

    • HayBlock

      public HayBlock(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcvn;<init>(Lcvn$c;)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

    • 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
      official a Lcjt;a(Lcgx;Lcvo;Lgt;Lbbn;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
      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