Class SlimeBlock

All Implemented Interfaces:
ItemConvertible, ToggleableFeature

public class SlimeBlock extends TransparentBlock
Mappings:
Namespace Name
official ctr
intermediary net/minecraft/class_2490
named net/minecraft/block/SlimeBlock
  • Constructor Details

    • SlimeBlock

      public SlimeBlock(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcys;<init>(Lcys$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 Lcmt;a(Lcjw;Lcyt;Lgp;Lbdr;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
    • onEntityLand

      public void onEntityLand(BlockView world, Entity entity)
      Called after the entity lands on the block.

      Default implementation resets the entity's vertical velocity. Blocks that cause entities to jump (such as SlimeBlock) should override this.

      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:
      onEntityLand in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lcmt;a(Lcjc;Lbdr;)V
      intermediary method_9502 Lnet/minecraft/class_2248;method_9502(Lnet/minecraft/class_1922;Lnet/minecraft/class_1297;)V
      named onEntityLand Lnet/minecraft/block/Block;onEntityLand(Lnet/minecraft/world/BlockView;Lnet/minecraft/entity/Entity;)V
    • bounce

      private void bounce(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lctr;a(Lbdr;)V
      intermediary method_21847 Lnet/minecraft/class_2490;method_21847(Lnet/minecraft/class_1297;)V
      named bounce Lnet/minecraft/block/SlimeBlock;bounce(Lnet/minecraft/entity/Entity;)V
    • onSteppedOn

      public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity)
      Called when an entity steps on this block.

      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:
      onSteppedOn in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lcmt;a(Lcjw;Lgp;Lcyt;Lbdr;)V
      intermediary method_9591 Lnet/minecraft/class_2248;method_9591(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1297;)V
      named onSteppedOn Lnet/minecraft/block/Block;onSteppedOn(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V