Class ComparatorBlock

All Implemented Interfaces:
BlockEntityProvider

public class ComparatorBlock extends AbstractRedstoneGateBlock implements BlockEntityProvider
Mappings:
Namespace Name
official app
intermediary net/minecraft/class_1447
named net/minecraft/block/ComparatorBlock
  • Field Details

    • POWERED

      public static final BooleanProperty POWERED
      Mappings:
      Namespace Name Mixin selector
      official a Lapp;a:Laxf;
      intermediary field_9339 Lnet/minecraft/class_1447;field_9339:Lnet/minecraft/class_2243;
      named POWERED Lnet/minecraft/block/ComparatorBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
    • MODE

      public static final EnumProperty<ComparatorBlock.ComparatorType> MODE
      Mappings:
      Namespace Name Mixin selector
      official b Lapp;b:Laxh;
      intermediary field_9340 Lnet/minecraft/class_1447;field_9340:Lnet/minecraft/class_2245;
      named MODE Lnet/minecraft/block/ComparatorBlock;MODE:Lnet/minecraft/state/property/EnumProperty;
  • Constructor Details

    • ComparatorBlock

      public ComparatorBlock(boolean locked)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lapw;<init>(Z)V
      intermediary <init> Lnet/minecraft/class_1449;<init>(Z)V
      named <init> Lnet/minecraft/block/AbstractRedstoneGateBlock;<init>(Z)V
  • Method Details

    • getTranslatedName

      public String getTranslatedName()
      Translates and returns the translation key
      Overrides:
      getTranslatedName in class Block
      Returns:
      Translated name
      Mappings:
      Namespace Name Mixin selector
      official c Laow;c()Ljava/lang/String;
      intermediary method_480 Lnet/minecraft/class_197;method_480()Ljava/lang/String;
      named getTranslatedName Lnet/minecraft/block/Block;getTranslatedName()Ljava/lang/String;
    • 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 Laow;a(Lawt;Ljava/util/Random;I)Lain;
      intermediary method_398 Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;
      named getDropItem Lnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
    • method_8640

      public ItemStack method_8640(World world, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_8640 in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Laow;a(Lamu;Let;Lawt;)Laip;
      intermediary method_8640 Lnet/minecraft/class_197;method_8640(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Lnet/minecraft/class_1071;
      named method_8640 Lnet/minecraft/block/Block;method_8640(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
    • method_8725

      protected int method_8725(BlockState blockState)
      Specified by:
      method_8725 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official x Lapw;x(Lawt;)I
      intermediary method_8725 Lnet/minecraft/class_1449;method_8725(Lnet/minecraft/class_2232;)I
      named method_8725 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8725(Lnet/minecraft/block/BlockState;)I
    • method_8728

      protected BlockState method_8728(BlockState blockState)
      Specified by:
      method_8728 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official y Lapw;y(Lawt;)Lawt;
      intermediary method_8728 Lnet/minecraft/class_1449;method_8728(Lnet/minecraft/class_2232;)Lnet/minecraft/class_2232;
      named method_8728 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8728(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
    • method_8733

      protected BlockState method_8733(BlockState blockState)
      Specified by:
      method_8733 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official z Lapw;z(Lawt;)Lawt;
      intermediary method_8733 Lnet/minecraft/class_1449;method_8733(Lnet/minecraft/class_2232;)Lnet/minecraft/class_2232;
      named method_8733 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8733(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
    • method_8734

      protected boolean method_8734(BlockState blockState)
      Overrides:
      method_8734 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official A Lapw;A(Lawt;)Z
      intermediary method_8734 Lnet/minecraft/class_1449;method_8734(Lnet/minecraft/class_2232;)Z
      named method_8734 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8734(Lnet/minecraft/block/BlockState;)Z
    • method_8721

      protected int method_8721(BlockView blockView, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_8721 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official a Lapw;a(Lamy;Let;Lawt;)I
      intermediary method_8721 Lnet/minecraft/class_1449;method_8721(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)I
      named method_8721 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8721(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
    • calculateOutputSignal

      private int calculateOutputSignal(World world, BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official j Lapp;j(Lamu;Let;Lawt;)I
      intermediary method_8711 Lnet/minecraft/class_1447;method_8711(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)I
      named calculateOutputSignal Lnet/minecraft/block/ComparatorBlock;calculateOutputSignal(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
    • method_8727

      protected boolean method_8727(World world, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_8727 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official e Lapw;e(Lamu;Let;Lawt;)Z
      intermediary method_8727 Lnet/minecraft/class_1449;method_8727(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Z
      named method_8727 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8727(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
    • method_8729

      protected int method_8729(World world, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_8729 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official f Lapw;f(Lamu;Let;Lawt;)I
      intermediary method_8729 Lnet/minecraft/class_1449;method_8729(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)I
      named method_8729 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8729(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
    • method_8710

      @Nullable private ItemFrameEntity method_8710(World world, Direction direction, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      official a Lapp;a(Lamu;Lfa;Let;)Lacb;
      intermediary method_8710 Lnet/minecraft/class_1447;method_8710(Lnet/minecraft/class_1150;Lnet/minecraft/class_1354;Lnet/minecraft/class_2552;)Lnet/minecraft/class_1397;
      named method_8710 Lnet/minecraft/block/ComparatorBlock;method_8710(Lnet/minecraft/world/World;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/decoration/ItemFrameEntity;
    • use

      public boolean use(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction direction, float float2, float float3, float float4)
      Overrides:
      use in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Laow;a(Lamu;Let;Lawt;Laed;Lub;Lfa;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_2961;Lnet/minecraft/class_1354;FFF)Z
      named use Lnet/minecraft/block/Block;use(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/math/Direction;FFF)Z
    • method_8730

      protected void method_8730(World world, BlockPos blockPos, BlockState blockState)
      Overrides:
      method_8730 in class AbstractRedstoneGateBlock
      Mappings:
      Namespace Name Mixin selector
      official g Lapw;g(Lamu;Let;Lawt;)V
      intermediary method_8730 Lnet/minecraft/class_1449;method_8730(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)V
      named method_8730 Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8730(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • update

      private void update(World world, BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official k Lapp;k(Lamu;Let;Lawt;)V
      intermediary method_8712 Lnet/minecraft/class_1447;method_8712(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)V
      named update Lnet/minecraft/block/ComparatorBlock;update(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • scheduledTick

      public void scheduledTick(World world, BlockPos pos, BlockState state, Random rand)
      Runs when the block is updated as per a schedule
      Overrides:
      scheduledTick in class AbstractRedstoneGateBlock
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      rand - Random object
      Mappings:
      Namespace Name Mixin selector
      official b Laow;b(Lamu;Let;Lawt;Ljava/util/Random;)V
      intermediary method_8661 Lnet/minecraft/class_197;method_8661(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Ljava/util/Random;)V
      named scheduledTick Lnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
    • onCreation

      public void onCreation(World world, BlockPos pos, BlockState state)
      Runs when the block is placed (by a player or enderman).
      Overrides:
      onCreation in class AbstractRedstoneGateBlock
      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 c Laow;c(Lamu;Let;Lawt;)V
      intermediary method_8668 Lnet/minecraft/class_197;method_8668(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)V
      named onCreation Lnet/minecraft/block/Block;onCreation(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 Block
      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 Laow;b(Lamu;Let;Lawt;)V
      intermediary method_8659 Lnet/minecraft/class_197;method_8659(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)V
      named onBreaking Lnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • method_435

      public boolean method_435(BlockState blockState, World world, BlockPos blockPos, int int2, int int3)
      Overrides:
      method_435 in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Laow;a(Lawt;Lamu;Let;II)Z
      intermediary method_435 Lnet/minecraft/class_197;method_435(Lnet/minecraft/class_2232;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;II)Z
      named method_435 Lnet/minecraft/block/Block;method_435(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;II)Z
    • createBlockEntity

      public BlockEntity createBlockEntity(World world, int id)
      Specified by:
      createBlockEntity in interface BlockEntityProvider
      Mappings:
      Namespace Name Mixin selector
      official a Laql;a(Lamu;I)Lavj;
      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;
    • 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 Laow;a(I)Lawt;
      intermediary method_8635 Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;
      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 e Laow;e(Lawt;)I
      intermediary method_8671 Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)I
      named getData Lnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
    • withRotation

      public BlockState withRotation(BlockState state, BlockRotation rotation)
      Overrides:
      withRotation in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Laow;a(Lawt;Latm;)Lawt;
      intermediary method_11556 Lnet/minecraft/class_197;method_11556(Lnet/minecraft/class_2232;Lnet/minecraft/class_2734;)Lnet/minecraft/class_2232;
      named withRotation Lnet/minecraft/block/Block;withRotation(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
    • withMirror

      public BlockState withMirror(BlockState state, BlockMirror mirror)
      Overrides:
      withMirror in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Laow;a(Lawt;Lary;)Lawt;
      intermediary method_11555 Lnet/minecraft/class_197;method_11555(Lnet/minecraft/class_2232;Lnet/minecraft/class_2727;)Lnet/minecraft/class_2232;
      named withMirror Lnet/minecraft/block/Block;withMirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
    • 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 b Laow;b()Lawu;
      intermediary method_8676 Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
    • getStateFromData

      public BlockState getStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity)
      Returns a BlockState from an id
      Overrides:
      getStateFromData in class AbstractRedstoneGateBlock
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      dir - The block's direction
      Mappings:
      Namespace Name Mixin selector
      official a Laow;a(Lamu;Let;Lfa;FFFILvp;)Lawt;
      intermediary method_8645 Lnet/minecraft/class_197;method_8645(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;FFFILnet/minecraft/class_1699;)Lnet/minecraft/class_2232;
      named getStateFromData Lnet/minecraft/block/Block;getStateFromData(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FFFILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/block/BlockState;