Package net.minecraft.block
Class ComparatorBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.AbstractRedstoneGateBlock
net.minecraft.block.ComparatorBlock
- All Implemented Interfaces:
BlockEntityProvider,ItemConvertible
- Mappings:
Namespace Name official ckbintermediary net/minecraft/class_2286named net/minecraft/block/ComparatorBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsFields inherited from class net.minecraft.block.AbstractRedstoneGateBlock
POWERED, SHAPEFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) private intcalculateOutputSignal(World world, BlockPos pos, BlockState state) createBlockEntity(BlockPos pos, BlockState state) private @Nullable ItemFrameEntitygetAttachedItemFrame(World world, Direction facing, BlockPos pos) protected intgetOutputLevel(BlockView world, BlockPos pos, BlockState state) protected intgetPower(World world, BlockPos pos, BlockState state) protected intgetUpdateDelayInternal(BlockState state) protected booleanhasPower(World world, BlockPos pos, BlockState state) booleanonSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data) onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) private voidupdate(World world, BlockPos pos, BlockState state) protected voidupdatePowered(World world, BlockPos pos, BlockState state) Methods inherited from class net.minecraft.block.AbstractRedstoneGateBlock
canPlaceAt, emitsRedstonePower, getInputLevel, getMaxInputLevelSides, getOutlineShape, getPlacementState, getStrongRedstonePower, getWeakRedstonePower, isLocked, isRedstoneGate, isTargetNotAligned, isValidInput, neighborUpdate, onBlockAdded, onPlaced, onStateReplaced, updateTargetMethods inherited from class net.minecraft.block.HorizontalFacingBlock
mirror, rotateMethods inherited from class net.minecraft.block.Block
afterBreak, appendStacks, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getVerticalModelOffsetMultiplier, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListener, getTicker
-
Field Details
-
MODE
- Mappings:
Namespace Name Mixin selector official aLckb;a:Lcvr;intermediary field_10789Lnet/minecraft/class_2286;field_10789:Lnet/minecraft/class_2754;named MODELnet/minecraft/block/ComparatorBlock;MODE:Lnet/minecraft/state/property/EnumProperty;
-
-
Constructor Details
-
ComparatorBlock
- Mappings:
Namespace Name Mixin selector official <init>Lcus;<init>(Lcus$c;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getUpdateDelayInternal
- Specified by:
getUpdateDelayInternalin classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official gLckq;g(Lcut;)Iintermediary method_9992Lnet/minecraft/class_2312;method_9992(Lnet/minecraft/class_2680;)Inamed getUpdateDelayInternalLnet/minecraft/block/AbstractRedstoneGateBlock;getUpdateDelayInternal(Lnet/minecraft/block/BlockState;)I
-
getOutputLevel
- Overrides:
getOutputLevelin classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official bLckq;b(Lcfi;Lgt;Lcut;)Iintermediary method_9993Lnet/minecraft/class_2312;method_9993(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Inamed getOutputLevelLnet/minecraft/block/AbstractRedstoneGateBlock;getOutputLevel(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
-
calculateOutputSignal
- Mappings:
Namespace Name Mixin selector official eLckb;e(Lcgc;Lgt;Lcut;)Iintermediary method_9773Lnet/minecraft/class_2286;method_9773(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Inamed calculateOutputSignalLnet/minecraft/block/ComparatorBlock;calculateOutputSignal(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
-
hasPower
- Overrides:
hasPowerin classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official aLckq;a(Lcgc;Lgt;Lcut;)Zintermediary method_9990Lnet/minecraft/class_2312;method_9990(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Znamed hasPowerLnet/minecraft/block/AbstractRedstoneGateBlock;hasPower(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
getPower
- Overrides:
getPowerin classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official bLckq;b(Lcgc;Lgt;Lcut;)Iintermediary method_9991Lnet/minecraft/class_2312;method_9991(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Inamed getPowerLnet/minecraft/block/AbstractRedstoneGateBlock;getPower(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)I
-
getAttachedItemFrame
@Nullable private @Nullable ItemFrameEntity getAttachedItemFrame(World world, Direction facing, BlockPos pos) - Mappings:
Namespace Name Mixin selector official aLckb;a(Lcgc;Lgy;Lgt;)Lbpt;intermediary method_9774Lnet/minecraft/class_2286;method_9774(Lnet/minecraft/class_1937;Lnet/minecraft/class_2350;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1533;named getAttachedItemFrameLnet/minecraft/block/ComparatorBlock;getAttachedItemFrame(Lnet/minecraft/world/World;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/decoration/ItemFrameEntity;
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player. This, by default, is bound to using the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient().If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official aLcus;a(Lcut;Lcgc;Lgt;Lbth;Lazn;Ldvr;)Lazo;intermediary method_9534Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;named onUseLnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
updatePowered
- Overrides:
updatePoweredin classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official cLckq;c(Lcgc;Lgt;Lcut;)Vintermediary method_9998Lnet/minecraft/class_2312;method_9998(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed updatePoweredLnet/minecraft/block/AbstractRedstoneGateBlock;updatePowered(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
update
- Mappings:
Namespace Name Mixin selector official fLckb;f(Lcgc;Lgt;Lcut;)Vintermediary method_9775Lnet/minecraft/class_2286;method_9775(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed updateLnet/minecraft/block/ComparatorBlock;update(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
scheduledTick
- Overrides:
scheduledTickin classAbstractRedstoneGateBlock- Mappings:
Namespace Name Mixin selector official aLcus;a(Lcut;Lafo;Lgt;Lalu;)Vintermediary method_9588Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vnamed scheduledTickLnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
-
onSyncedBlockEvent
- Overrides:
onSyncedBlockEventin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcus;a(Lcut;Lcgc;Lgt;II)Zintermediary method_9592Lnet/minecraft/class_4970;method_9592(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;II)Znamed onSyncedBlockEventLnet/minecraft/block/AbstractBlock;onSyncedBlockEvent(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 aLclg;a(Lgt;Lcut;)Lcsn;intermediary method_10123Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;named createBlockEntityLnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
-
appendProperties
- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector official aLciy;a(Lcuu$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-