Package net.minecraft.block
Class ComparatorBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.HorizotalFacingBlock
net.minecraft.block.AbstractRedstoneGateBlock
net.minecraft.block.ComparatorBlock
- All Implemented Interfaces:
BlockEntityProvider
- Mappings:
Namespace Name official aklintermediary net/minecraft/class_1447named net/minecraft/block/ComparatorBlock
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EnumProperty<ComparatorBlock.ComparatorType>static final BooleanPropertyFields inherited from class net.minecraft.block.AbstractRedstoneGateBlock
field_12644, lockedFields inherited from class net.minecraft.block.HorizotalFacingBlock
DIRECTIONFields inherited from class net.minecraft.block.Block
blastResistance, BLOCK_STATES, blockEntity, blockSoundGroup, collisionBox, EMPTY_BOX, fullBlock, hardness, lightLevel, material, materialColor, opacity, particleGravity, randomTicks, REGISTRY, slipperiness, stateManager, stats, transluscent, useNeighbourLight -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StateManagerReturns a new state manager with a property array.private intcalculateOutputSignal(World world, BlockPos pos, BlockState state) createBlockEntity(World world, int id) intgetData(BlockState state) Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workgetDropItem(BlockState blockState, Random random, int state) Returns the item that must be dropped when the block is brokengetStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity) Returns a BlockState from an idTranslates and returns the translation keybooleanmethod_421(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity, Hand hand, ItemStack itemStack, Direction direction, float float2, float float3, float float4) booleanmethod_435(BlockState blockState, World world, BlockPos blockPos, int int2, int int3) method_8640(World world, BlockPos blockPos, BlockState blockState) private ItemFrameEntitymethod_8710(World world, Direction direction, BlockPos blockPos) protected intmethod_8721(BlockView blockView, BlockPos blockPos, BlockState blockState) protected intmethod_8725(BlockState blockState) protected booleanmethod_8727(World world, BlockPos blockPos, BlockState blockState) protected BlockStatemethod_8728(BlockState blockState) protected intmethod_8729(World world, BlockPos blockPos, BlockState blockState) protected voidmethod_8730(World world, BlockPos blockPos, BlockState blockState) protected BlockStatemethod_8733(BlockState blockState) protected booleanmethod_8734(BlockState blockState) voidonBreaking(World world, BlockPos pos, BlockState state) Runs when the block is removed (by an entity or explosion).voidonCreation(World world, BlockPos pos, BlockState state) Runs when the block is placed (by a player or enderman).voidscheduledTick(World world, BlockPos pos, BlockState state, Random rand) Runs when the block is updated as per a schedulestateFromData(int data) Returns a blockstate of the current block from it's idprivate voidupdate(World world, BlockPos pos, BlockState state) withMirror(BlockState state, BlockMirror mirror) withRotation(BlockState state, BlockRotation rotation) Methods inherited from class net.minecraft.block.AbstractRedstoneGateBlock
canBePlacedAtPos, getCollisionBox, getRenderLayerType, isEqualTo, isFullBoundsCubeForCulling, method_11562, method_11566, method_11601, method_11602, method_11603, method_8641, method_8653, method_8654, method_8664, method_8722, method_8723, method_8724, method_8726, method_8731, method_8732, method_8735, onBreakByPlayer, onPlaced, onUpdateTickMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendCollisionBoxes, appendItemStacks, areBlocksEqual, blocksMovement, canBePlacedAdjacent, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, get, getBlastResistance, getBlockFromItem, getBlockRenderType, getBlockState, getBonusDrops, getByBlockState, getById, getCollisionBox, getComparatorOutput, getDefaultState, getDropCount, getHardness, getIdByBlock, getItemGroup, getLuminance, getMaterial, getMaterialColor, getMeta, getOffsetType, getOpacity, getPistonBehavior, getSoundGroup, getStateFromRawId, getStateManager, getTickRate, getTranslationKey, hasBlockEntity, hasCollision, hasCollision, hasStats, isFire, isFullBlock, isLeafBlock, isTransluscent, method_11557, method_11559, method_11563, method_11564, method_11565, method_11568, method_11575, method_11576, method_11577, method_414, method_8638, method_8651, method_8669, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onLandedUpon, onSteppedOn, rainTick, randomDropAsItem, requiresSilkTouch, setBlockSoundGroup, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, useNeighbourLight
-
Field Details
-
POWERED
- Mappings:
Namespace Name Mixin selector official aLakl;a:Laro;intermediary field_9339Lnet/minecraft/class_1447;field_9339:Lnet/minecraft/class_2243;named POWEREDLnet/minecraft/block/ComparatorBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
MODE
- Mappings:
Namespace Name Mixin selector official bLakl;b:Larq;intermediary field_9340Lnet/minecraft/class_1447;field_9340:Lnet/minecraft/class_2245;named MODELnet/minecraft/block/ComparatorBlock;MODE:Lnet/minecraft/state/property/EnumProperty;
-
-
Constructor Details
-
ComparatorBlock
public ComparatorBlock(boolean locked) - Mappings:
Namespace Name Mixin selector official <init>Lakr;<init>(Z)Vintermediary <init>Lnet/minecraft/class_1449;<init>(Z)Vnamed <init>Lnet/minecraft/block/AbstractRedstoneGateBlock;<init>(Z)V
-
-
Method Details
-
getTranslatedName
Translates and returns the translation key- Overrides:
getTranslatedNamein classBlock- Returns:
- Translated name
- Mappings:
Namespace Name Mixin selector official cLajt;c()Ljava/lang/String;intermediary method_480Lnet/minecraft/class_197;method_480()Ljava/lang/String;named getTranslatedNameLnet/minecraft/block/Block;getTranslatedName()Ljava/lang/String;
-
getDropItem
Returns the item that must be dropped when the block is broken- Overrides:
getDropItemin classBlock- Parameters:
blockState- The block's BlockStaterandom- Random objectstate- State- Returns:
- The Item that drops after the block breaks
- Mappings:
Namespace Name Mixin selector official aLajt;a(Lard;Ljava/util/Random;I)Lado;intermediary method_398Lnet/minecraft/class_197;method_398(Lnet/minecraft/class_2232;Ljava/util/Random;I)Lnet/minecraft/class_1069;named getDropItemLnet/minecraft/block/Block;getDropItem(Lnet/minecraft/block/BlockState;Ljava/util/Random;I)Lnet/minecraft/item/Item;
-
method_8640
- Overrides:
method_8640in classBlock- Mappings:
Namespace Name Mixin selector official aLajt;a(Laht;Lcl;Lard;)Ladq;intermediary method_8640Lnet/minecraft/class_197;method_8640(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Lnet/minecraft/class_1071;named method_8640Lnet/minecraft/block/Block;method_8640(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
-
method_8725
- Specified by:
method_8725in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official iLakr;i(Lard;)Iintermediary method_8725Lnet/minecraft/class_1449;method_8725(Lnet/minecraft/class_2232;)Inamed method_8725Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8725(Lnet/minecraft/block/BlockState;)I
-
method_8728
- Specified by:
method_8728in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official xLakr;x(Lard;)Lard;intermediary method_8728Lnet/minecraft/class_1449;method_8728(Lnet/minecraft/class_2232;)Lnet/minecraft/class_2232;named method_8728Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8728(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
method_8733
- Specified by:
method_8733in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official yLakr;y(Lard;)Lard;intermediary method_8733Lnet/minecraft/class_1449;method_8733(Lnet/minecraft/class_2232;)Lnet/minecraft/class_2232;named method_8733Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8733(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
method_8734
- Overrides:
method_8734in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official zLakr;z(Lard;)Zintermediary method_8734Lnet/minecraft/class_1449;method_8734(Lnet/minecraft/class_2232;)Znamed method_8734Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8734(Lnet/minecraft/block/BlockState;)Z
-
method_8721
- Overrides:
method_8721in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official aLakr;a(Lahx;Lcl;Lard;)Iintermediary method_8721Lnet/minecraft/class_1449;method_8721(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Inamed method_8721Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8721(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
-
calculateOutputSignal
- Mappings:
Namespace Name Mixin selector official jLakl;j(Laht;Lcl;Lard;)Iintermediary method_8711Lnet/minecraft/class_1447;method_8711(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Inamed calculateOutputSignalLnet/minecraft/block/ComparatorBlock;calculateOutputSignal(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
-
method_8727
- Overrides:
method_8727in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official eLakr;e(Laht;Lcl;Lard;)Zintermediary method_8727Lnet/minecraft/class_1449;method_8727(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Znamed method_8727Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8727(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
method_8729
- Overrides:
method_8729in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official fLakr;f(Laht;Lcl;Lard;)Iintermediary method_8729Lnet/minecraft/class_1449;method_8729(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Inamed method_8729Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8729(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
-
method_8710
- Mappings:
Namespace Name Mixin selector official aLakl;a(Laht;Lcs;Lcl;)Lxs;intermediary method_8710Lnet/minecraft/class_1447;method_8710(Lnet/minecraft/class_1150;Lnet/minecraft/class_1354;Lnet/minecraft/class_2552;)Lnet/minecraft/class_1397;named method_8710Lnet/minecraft/block/ComparatorBlock;method_8710(Lnet/minecraft/world/World;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/decoration/ItemFrameEntity;
-
method_421
public boolean method_421(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity, Hand hand, @Nullable ItemStack itemStack, Direction direction, float float2, float float3, float float4) - Overrides:
method_421in classBlock- Mappings:
Namespace Name Mixin selector official aLajt;a(Laht;Lcl;Lard;Lzj;Lqm;Ladq;Lcs;FFF)Zintermediary method_421Lnet/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_1071;Lnet/minecraft/class_1354;FFF)Znamed method_421Lnet/minecraft/block/Block;method_421(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;FFF)Z
-
method_8730
- Overrides:
method_8730in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official gLakr;g(Laht;Lcl;Lard;)Vintermediary method_8730Lnet/minecraft/class_1449;method_8730(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed method_8730Lnet/minecraft/block/AbstractRedstoneGateBlock;method_8730(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
update
- Mappings:
Namespace Name Mixin selector official kLakl;k(Laht;Lcl;Lard;)Vintermediary method_8712Lnet/minecraft/class_1447;method_8712(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed updateLnet/minecraft/block/ComparatorBlock;update(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
scheduledTick
Runs when the block is updated as per a schedule- Overrides:
scheduledTickin classAbstractRedstoneGateBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official bLajt;b(Laht;Lcl;Lard;Ljava/util/Random;)Vintermediary method_8661Lnet/minecraft/class_197;method_8661(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Ljava/util/Random;)Vnamed scheduledTickLnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
onCreation
Runs when the block is placed (by a player or enderman).- Overrides:
onCreationin classAbstractRedstoneGateBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official cLajt;c(Laht;Lcl;Lard;)Vintermediary method_8668Lnet/minecraft/class_197;method_8668(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
onBreaking
Runs when the block is removed (by an entity or explosion).- Overrides:
onBreakingin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official bLajt;b(Laht;Lcl;Lard;)Vintermediary method_8659Lnet/minecraft/class_197;method_8659(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed onBreakingLnet/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_435in classBlock- Mappings:
Namespace Name Mixin selector official aLajt;a(Lard;Laht;Lcl;II)Zintermediary method_435Lnet/minecraft/class_197;method_435(Lnet/minecraft/class_2232;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;II)Znamed method_435Lnet/minecraft/block/Block;method_435(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;II)Z
-
createBlockEntity
- Specified by:
createBlockEntityin interfaceBlockEntityProvider- Mappings:
Namespace Name Mixin selector official aLalg;a(Laht;I)Lapv;intermediary method_309Lnet/minecraft/class_1451;method_309(Lnet/minecraft/class_1150;I)Lnet/minecraft/class_226;named createBlockEntityLnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/world/World;I)Lnet/minecraft/block/entity/BlockEntity;
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLajt;a(I)Lard;intermediary method_8635Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official eLajt;e(Lard;)Iintermediary method_8671Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
withRotation
- Overrides:
withRotationin classBlock- Mappings:
Namespace Name Mixin selector official aLajt;a(Lard;Laoe;)Lard;intermediary method_11556Lnet/minecraft/class_197;method_11556(Lnet/minecraft/class_2232;Lnet/minecraft/class_2734;)Lnet/minecraft/class_2232;named withRotationLnet/minecraft/block/Block;withRotation(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
withMirror
- Overrides:
withMirrorin classBlock- Mappings:
Namespace Name Mixin selector official aLajt;a(Lard;Lamr;)Lard;intermediary method_11555Lnet/minecraft/class_197;method_11555(Lnet/minecraft/class_2232;Lnet/minecraft/class_2727;)Lnet/minecraft/class_2232;named withMirrorLnet/minecraft/block/Block;withMirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official bLajt;b()Lare;intermediary method_8676Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;named appendPropertiesLnet/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:
getStateFromDatain classAbstractRedstoneGateBlock- Parameters:
world- The world that the block is placed inpos- The block's positiondir- The block's direction- Mappings:
Namespace Name Mixin selector official aLajt;a(Laht;Lcl;Lcs;FFFILsa;)Lard;intermediary method_8645Lnet/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 getStateFromDataLnet/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;
-