Class NoteBlock

All Implemented Interfaces:
BlockEntityProvider

public class NoteBlock extends BlockWithEntity
Mappings:
Namespace Name
official ayn
intermediary net/minecraft/class_161
named net/minecraft/block/NoteBlock
  • Field Details

    • TUNES

      private static final List TUNES
      Mappings:
      Namespace Name Mixin selector
      official a Layn;a:Ljava/util/List;
      intermediary field_9559 Lnet/minecraft/class_161;field_9559:Ljava/util/List;
      named TUNES Lnet/minecraft/block/NoteBlock;TUNES:Ljava/util/List;
  • Constructor Details

    • NoteBlock

      public NoteBlock()
  • Method Details

    • neighborUpdate

      public void neighborUpdate(World world, BlockPos pos, BlockState state, Block block)
      Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.
      Overrides:
      neighborUpdate in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      block - The adjacent Block that updated the current block
      Mappings:
      Namespace Name Mixin selector
      official a Latr;a(Laqu;Ldt;Lbec;Latr;)V
      intermediary method_8641 Lnet/minecraft/class_197;method_8641(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_197;)V
      named neighborUpdate Lnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
    • 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 Latr;a(Laqu;Ldt;Lbec;Lahd;Lej;FFF)Z
      intermediary method_421 Lnet/minecraft/class_197;method_421(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_988;Lnet/minecraft/class_1354;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
    • onBlockBreakStart

      public void onBlockBreakStart(World world, BlockPos pos, PlayerEntity player)
      Overrides:
      onBlockBreakStart in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Latr;a(Laqu;Ldt;Lahd;)V
      intermediary method_420 Lnet/minecraft/class_197;method_420(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_988;)V
      named onBlockBreakStart Lnet/minecraft/block/Block;onBlockBreakStart(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)V
    • createBlockEntity

      public BlockEntity createBlockEntity(World world, int id)
      Mappings:
      Namespace Name Mixin selector
      official a Lavs;a(Laqu;I)Lbcm;
      intermediary method_309 Lnet/minecraft/class_1451;method_309(Lnet/minecraft/class_1150;I)Lnet/minecraft/class_226;
      named createBlockEntity Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/world/World;I)Lnet/minecraft/block/entity/BlockEntity;
    • method_8839

      private String method_8839(int int2)
      Mappings:
      Namespace Name Mixin selector
      official b Layn;b(I)Ljava/lang/String;
      intermediary method_8839 Lnet/minecraft/class_161;method_8839(I)Ljava/lang/String;
      named method_8839 Lnet/minecraft/block/NoteBlock;method_8839(I)Ljava/lang/String;
    • onEvent

      public boolean onEvent(World world, BlockPos pos, BlockState state, int id, int meta)
      Runs when an event takes place
      Overrides:
      onEvent in class BlockWithEntity
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      id - Id
      meta - Metadata
      Returns:
      Whether the event is successful
      Mappings:
      Namespace Name Mixin selector
      official a Latr;a(Laqu;Ldt;Lbec;II)Z
      intermediary method_435 Lnet/minecraft/class_197;method_435(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;II)Z
      named onEvent Lnet/minecraft/block/Block;onEvent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
    • getBlockType

      public int getBlockType()
      Overrides:
      getBlockType in class BlockWithEntity
      Mappings:
      Namespace Name Mixin selector
      official b Latr;b()I
      intermediary method_429 Lnet/minecraft/class_197;method_429()I
      named getBlockType Lnet/minecraft/block/Block;getBlockType()I