Class NoteBlock

All Implemented Interfaces:
BlockEntityProvider

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

    • TUNES

      private static final List<String> TUNES
      Mappings:
      Namespace Name Mixin selector
      official a Laii;a:Ljava/util/List;
      intermediary field_1067 Lnet/minecraft/class_260;field_1067: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 Lafh;a(Ladm;Lcj;Lalz;Lafh;)V
      intermediary method_648 Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)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 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
    • onBlockBreakStart

      public void onBlockBreakStart​(World world, BlockPos pos, PlayerEntity player)
      Overrides:
      onBlockBreakStart in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lwn;)V
      intermediary method_661 Lnet/minecraft/class_160;method_661(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1963;)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 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;
    • method_928

      private String method_928​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official b Laii;b(I)Ljava/lang/String;
      intermediary method_928 Lnet/minecraft/class_260;method_928(I)Ljava/lang/String;
      named method_928 Lnet/minecraft/block/NoteBlock;method_928(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 Lafh;a(Ladm;Lcj;Lalz;II)Z
      intermediary method_647 Lnet/minecraft/class_160;method_647(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;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 Lafh;b()I
      intermediary method_684 Lnet/minecraft/class_160;method_684()I
      named getBlockType Lnet/minecraft/block/Block;getBlockType()I