Package net.minecraft.block
Class ComparatorBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.AbstractRedstoneGateBlock
net.minecraft.block.ComparatorBlock
- All Implemented Interfaces:
BlockEntityProvider
- Mappings:
Namespace Name official afxintermediary net/minecraft/class_1447named net/minecraft/block/ComparatorBlock
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EnumProperty<ComparatorBlock.ComparatorType>static final BooleanPropertyFields inherited from class net.minecraft.block.AbstractRedstoneGateBlock
lockedFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields inherited from class net.minecraft.block.Block
ANVIL, blastResistance, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, hardness, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, transluscent, useNeighbourLight, WOOD -
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 brokengetPickItem(World world, BlockPos pos) Called when a player presses the pick block key while facing the block.getStateFromData(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 keyprivate 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).booleanonEvent(World world, BlockPos pos, BlockState state, int id, int meta) Runs when an event takes placebooleanonUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4) Runs when the block is used, i.e.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) Methods inherited from class net.minecraft.block.AbstractRedstoneGateBlock
canBePlacedAtPos, emitsRedstonePower, emitsRedstonePower, getRenderLayerType, getStrongRedstonePower, getWeakRedstonePower, hasTransperancy, isComparator, isEqualTo, isRedstoneGate, isSideInvisible, method_8722, method_8723, method_8724, method_8726, method_8731, method_8732, method_8735, neighborUpdate, onBreakByPlayer, onPlaced, onUpdateTick, renderAsNormalBlockMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getCollisionBox, getColor, getColor, getComparatorOutput, getDefaultState, getDropCount, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPistonInteractionType, getSelectionBox, getStateFromRawId, getStateManager, getStrength, getTickRate, getTranslationKey, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isTransluscent, method_414, method_8666, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onLandedUpon, onSteppedOn, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, setBlockItemBounds, setBoundingBox, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
POWERED
- Mappings:
Namespace Name Mixin selector official aLafx;a:Lamk;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 bLafx;b:Lamm;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>Lagd;<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 fLafh;f()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 aLafh;a(Lalz;Ljava/util/Random;I)Lzw;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;
-
getPickItem
Called when a player presses the pick block key while facing the block. It returns the item that must be placed into the player's inventory.- Overrides:
getPickItemin classBlock- Returns:
- The Item that must be placed into the player's inventory
- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;)Lzw;intermediary method_8667Lnet/minecraft/class_197;method_8667(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Lnet/minecraft/class_1069;named getPickItemLnet/minecraft/block/Block;getPickItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/item/Item;
-
method_8725
- Specified by:
method_8725in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official dLagd;d(Lalz;)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 eLagd;e(Lalz;)Lalz;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 kLagd;k(Lalz;)Lalz;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 lLagd;l(Lalz;)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 aLagd;a(Ladq;Lcj;Lalz;)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 jLafx;j(Ladm;Lcj;Lalz;)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 eLagd;e(Ladm;Lcj;Lalz;)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 fLagd;f(Ladm;Lcj;Lalz;)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 aLafx;a(Ladm;Lcq;Lcj;)Luo;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;
-
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:
onUsein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who used the blockdirection- The direction that the block is facing- Returns:
- Whether the action is succesful
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;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_1354;FFF)Znamed onUseLnet/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_8730
- Overrides:
method_8730in classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official gLagd;g(Ladm;Lcj;Lalz;)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 kLafx;k(Ladm;Lcj;Lalz;)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 bLafh;b(Ladm;Lcj;Lalz;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 cLafh;c(Ladm;Lcj;Lalz;)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 bLafh;b(Ladm;Lcj;Lalz;)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
-
onEvent
Runs when an event takes place- Overrides:
onEventin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateid- Idmeta- Metadata- Returns:
- Whether the event is successful
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;II)Zintermediary method_435Lnet/minecraft/class_197;method_435(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;II)Znamed onEventLnet/minecraft/block/Block;onEvent(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
-
createBlockEntity
- Specified by:
createBlockEntityin interfaceBlockEntityProvider- Mappings:
Namespace Name Mixin selector official aLagq;a(Ladm;I)Lakw;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 aLafh;a(I)Lalz;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 cLafh;c(Lalz;)Iintermediary method_8671Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;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 aLafh;a(Ladm;Lcj;Lcq;FFFILpr;)Lalz;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;
-