Class MobSpawnerBlock

All Implemented Interfaces:
BlockEntityProvider

public class MobSpawnerBlock
extends BlockWithEntity
Mappings:
Namespace Name
official ahy
intermediary net/minecraft/class_247
named net/minecraft/block/MobSpawnerBlock
  • Constructor Details

    • MobSpawnerBlock

      protected MobSpawnerBlock()
  • Method Details

    • createBlockEntity

      public BlockEntity createBlockEntity​(World world, int id)
      Mappings:
      Namespace Name Mixin selector
      official a Lagq;a(Ladm;I)Lakw;
      intermediary method_841 Lnet/minecraft/class_205;method_841(Lnet/minecraft/class_99;I)Lnet/minecraft/class_348;
      named createBlockEntity Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/world/World;I)Lnet/minecraft/block/entity/BlockEntity;
    • getDropItem

      public Item getDropItem​(BlockState blockState, Random random, int state)
      Returns the item that must be dropped when the block is broken
      Overrides:
      getDropItem in class Block
      Parameters:
      blockState - The block's BlockState
      random - Random object
      state - State
      Returns:
      The Item that drops after the block breaks
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lalz;Ljava/util/Random;I)Lzw;
      intermediary method_674 Lnet/minecraft/class_160;method_674(Lnet/minecraft/class_376;Ljava/util/Random;I)Lnet/minecraft/class_2054;
      named getDropItem Lnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
    • getDropCount

      public int getDropCount​(Random rand)
      Returns the amount of items the block should drop on breaking without bonus rolls.
      Overrides:
      getDropCount in class Block
      Parameters:
      rand - Random object
      Returns:
      Amount of items to be dropped
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ljava/util/Random;)I
      intermediary method_677 Lnet/minecraft/class_160;method_677(Ljava/util/Random;)I
      named getDropCount Lnet/minecraft/block/Block;getDropCount(Ljava/util/Random;)I
    • randomDropAsItem

      public void randomDropAsItem​(World world, BlockPos pos, BlockState state, float chance, int id)
      Called when the block must be dropped as an item by dropAsItem, but luck is taken into consideration here.
      Overrides:
      randomDropAsItem in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      chance - The chance (luck factor)
      id - Id
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;FI)V
      intermediary method_646 Lnet/minecraft/class_160;method_646(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;FI)V
      named randomDropAsItem Lnet/minecraft/block/Block;randomDropAsItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;FI)V
    • hasTransperancy

      public boolean hasTransperancy()
      Overrides:
      hasTransperancy in class Block
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c()Z
      intermediary method_699 Lnet/minecraft/class_160;method_699()Z
      named hasTransperancy Lnet/minecraft/block/Block;hasTransperancy()Z
    • getBlockType

      public int getBlockType()
      Overrides:
      getBlockType in class BlockWithEntity
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b()I
      intermediary method_684 Lnet/minecraft/class_160;method_684()I
      named getBlockType Lnet/minecraft/block/Block;getBlockType()I
    • getRenderLayerType

      @Environment(CLIENT) public RenderLayer getRenderLayerType()
      Returns the appropriate RenderLayer for a block. Only called on the client.
      Overrides:
      getRenderLayerType in class Block
      Returns:
      The block's RenderLayer
      Mappings:
      Namespace Name Mixin selector
      official m Lafh;m()Ladf;
      intermediary method_731 Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;
      named getRenderLayerType Lnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
    • getPickItem

      @Environment(CLIENT) public Item getPickItem​(World world, BlockPos pos)
      Called when a player presses the pick block key while facing the block. It returns the item that must be placed into the player's inventory.
      Overrides:
      getPickItem in class Block
      Returns:
      The Item that must be placed into the player's inventory
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladm;Lcj;)Lzw;
      intermediary method_702 Lnet/minecraft/class_160;method_702(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Lnet/minecraft/class_2054;
      named getPickItem Lnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;