Class JukeboxBlock

All Implemented Interfaces:
BlockEntityProvider

public class JukeboxBlock
extends BlockWithEntity
Mappings:
Namespace Name
official ahq
intermediary net/minecraft/class_237
named net/minecraft/block/JukeboxBlock
  • Field Details

    • HAS_RECORD

      public static final BooleanProperty HAS_RECORD
      Mappings:
      Namespace Name Mixin selector
      official a Lahq;a:Lamk;
      intermediary field_1004 Lnet/minecraft/class_237;field_1004:Lnet/minecraft/class_388;
      named HAS_RECORD Lnet/minecraft/block/JukeboxBlock;HAS_RECORD:Lnet/minecraft/state/property/BooleanProperty;
  • Constructor Details

    • JukeboxBlock

      protected JukeboxBlock()
  • Method Details

    • onUse

      public boolean onUse​(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)
      Runs when the block is used, i.e. right clicked in most cases. It is similar to the same method in Item, but this method is called only when the player uses it when the block is placed, not when the player is holding the BlockItem.
      Overrides:
      onUse in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      player - The player who used the block
      direction - The direction that the block is facing
      Returns:
      Whether the action is succesful
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Z
      intermediary method_654 Lnet/minecraft/class_160;method_654(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;Lnet/minecraft/class_1383;FFF)Z
      named onUse Lnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
    • method_885

      public void method_885​(World world, BlockPos blockPos, BlockState blockState, ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Lahq;a(Ladm;Lcj;Lalz;Lzx;)V
      intermediary method_885 Lnet/minecraft/class_237;method_885(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_2056;)V
      named method_885 Lnet/minecraft/block/JukeboxBlock;method_885(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/item/ItemStack;)V
    • method_886

      private void method_886​(World world, BlockPos blockPos, BlockState blockState)
      Mappings:
      Namespace Name Mixin selector
      official e Lahq;e(Ladm;Lcj;Lalz;)V
      intermediary method_886 Lnet/minecraft/class_237;method_886(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named method_886 Lnet/minecraft/block/JukeboxBlock;method_886(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • onBreaking

      public void onBreaking​(World world, BlockPos pos, BlockState state)
      Runs when the block is removed (by an entity or explosion).
      Overrides:
      onBreaking in class BlockWithEntity
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      Mappings:
      Namespace Name Mixin selector
      official b Lafh;b(Ladm;Lcj;Lalz;)V
      intermediary method_688 Lnet/minecraft/class_160;method_688(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named onBreaking Lnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • 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
    • 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;
    • hasComparatorOutput

      public boolean hasComparatorOutput()
      Returns whether the block provides comparator output. Used in blocks with entities like Chests and Droppers.
      Overrides:
      hasComparatorOutput in class Block
      Returns:
      Whether the block provides comparator output
      Mappings:
      Namespace Name Mixin selector
      official O Lafh;O()Z
      intermediary method_629 Lnet/minecraft/class_160;method_629()Z
      named hasComparatorOutput Lnet/minecraft/block/Block;hasComparatorOutput()Z
    • getComparatorOutput

      public int getComparatorOutput​(World world, BlockPos pos)
      Returns the block's comparator output value. Used in blocks with entities like Chests and Droppers.
      Overrides:
      getComparatorOutput in class Block
      Returns:
      The block's comparator output value
      Mappings:
      Namespace Name Mixin selector
      official l Lafh;l(Ladm;Lcj;)I
      intermediary method_730 Lnet/minecraft/class_160;method_730(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)I
      named getComparatorOutput Lnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
    • 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
    • stateFromData

      public BlockState stateFromData​(int data)
      Returns a blockstate of the current block from it's id
      Overrides:
      stateFromData in class Block
      Parameters:
      data - The Blockstate's associated data value
      Returns:
      The Default state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(I)Lalz;
      intermediary method_637 Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;
      named stateFromData Lnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
    • getData

      public int getData​(BlockState state)
      Returns the data value for a blockstate Throws an IllegalArmumentException as this method does not work
      Overrides:
      getData in class Block
      Parameters:
      state - The Blockstate
      Returns:
      Zero
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Lalz;)I
      intermediary method_706 Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)I
      named getData Lnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
    • appendProperties

      protected StateManager appendProperties()
      Returns a new state manager with a property array.
      Overrides:
      appendProperties in class Block
      Returns:
      New state manager
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e()Lama;
      intermediary method_714 Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;