Package net.minecraft.block
Class DetectorRailBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.AbstractRailBlock
net.minecraft.block.DetectorRailBlock
- Mappings:
Namespace Name official auyintermediary net/minecraft/class_124named net/minecraft/block/DetectorRailBlock
-
Field Summary
FieldsFields inherited from class net.minecraft.block.AbstractRailBlock
allowCurvesFields inherited from class net.minecraft.block.Block
blastResistance, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, field_483, field_484, field_486, field_487, field_7261, field_7262, field_7263, field_7264, field_7265, field_7266, field_7267, field_7268, field_9285, fullBlock, hardness, lightLevel, material, opacity, particleGravity, randomTicks, REGISTRY, slipperiness, soundGroup, stateManager, stats, transluscent, useNeighbourLight -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StateManagerReturns a new state manager with a property array.booleanReturns whether the current block emits a redstone signal.private BoxintgetComparatorOutput(World world, BlockPos pos) Returns the block's comparator output value.intgetData(BlockState state) Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workintgetStrongRedstonePower(BlockView view, BlockPos pos, BlockState state, Direction facing) Returns the block's strong redstone power.intgetTickRate(World world) Returns the block's tick rate.intgetWeakRedstonePower(BlockView view, BlockPos pos, BlockState state, Direction facing) Returns the block's weak redstone power.booleanReturns whether the block provides comparator output.protected Listmethod_8717(World world, BlockPos blockPos, Class class2, Predicate[] predicate) voidonCreation(World world, BlockPos pos, BlockState state) Runs when the block is placed (by a player or enderman).voidonEntityCollision(World world, BlockPos pos, BlockState state, Entity entity) Runs every time an entity collides with the blockvoidonUpdateTick(World world, BlockPos pos, BlockState state, Random rand) Runs when the block is updatedvoidscheduledTick(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 voidupdatePoweredStatus(World world, BlockPos pos, BlockState state) Methods inherited from class net.minecraft.block.AbstractRailBlock
canBePlacedAtPos, getCollisionBox, getPistonInteractionType, getRenderLayerType, hasTransperancy, isRail, isRail, method_414, neighborUpdate, onBreaking, renderAsNormalBlock, setBoundingBox, updateBlockState, updateBlockStateMethods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBeReplaced, canCollide, createStackFromBlock, disableStats, dropAsItem, dropExperience, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getColor, getColor, getDefaultState, getDropCount, getDropItem, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOpacity, getPickItem, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getTranslatedName, getTranslationKey, harvest, hasBlockEntity, hasCollision, hasCollision, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isSideInvisible, isTransluscent, method_8634, method_8666, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onDestroyedByExplosion, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUse, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, setBlockItemBounds, setBlockSoundGroup, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, usesNeighbourLight
-
Field Details
-
SHAPE
- Mappings:
Namespace Name Mixin selector official bLauy;b:Lbev;intermediary field_9353Lnet/minecraft/class_124;field_9353:Lnet/minecraft/class_2245;named SHAPELnet/minecraft/block/DetectorRailBlock;SHAPE:Lnet/minecraft/state/property/EnumProperty;
-
POWERED
- Mappings:
Namespace Name Mixin selector official MLauy;M:Lbet;intermediary field_9352Lnet/minecraft/class_124;field_9352:Lnet/minecraft/class_2243;named POWEREDLnet/minecraft/block/DetectorRailBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
-
Constructor Details
-
DetectorRailBlock
public DetectorRailBlock()
-
-
Method Details
-
getTickRate
Returns the block's tick rate. Default is 10.- Overrides:
getTickRatein classBlock- Parameters:
world- The world that the block is placed in- Returns:
- Tick rate
- Mappings:
Namespace Name Mixin selector official aLatr;a(Laqu;)Iintermediary method_4789Lnet/minecraft/class_197;method_4789(Lnet/minecraft/class_1150;)Inamed getTickRateLnet/minecraft/block/Block;getTickRate(Lnet/minecraft/world/World;)I
-
emitsRedstonePower
public boolean emitsRedstonePower()Returns whether the current block emits a redstone signal. Used by comparators, Redstone Blocks, etc.- Overrides:
emitsRedstonePowerin classBlock- Returns:
- Whether the current block emits a redstone signal
- Mappings:
Namespace Name Mixin selector official gLatr;g()Zintermediary method_466Lnet/minecraft/class_197;method_466()Znamed emitsRedstonePowerLnet/minecraft/block/Block;emitsRedstonePower()Z
-
onEntityCollision
Runs every time an entity collides with the block- Overrides:
onEntityCollisionin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateentity- The entity that collided with the block- Mappings:
Namespace Name Mixin selector official aLatr;a(Laqu;Ldt;Lbec;Lwv;)Vintermediary method_416Lnet/minecraft/class_197;method_416(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_864;)Vnamed onEntityCollisionLnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
-
onUpdateTick
Runs when the block is updated- Overrides:
onUpdateTickin classBlock- 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 aLatr;a(Laqu;Ldt;Lbec;Ljava/util/Random;)Vintermediary method_8643Lnet/minecraft/class_197;method_8643(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Ljava/util/Random;)Vnamed onUpdateTickLnet/minecraft/block/Block;onUpdateTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
scheduledTick
Runs when the block is updated as per a schedule- Overrides:
scheduledTickin classBlock- 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 bLatr;b(Laqu;Ldt;Lbec;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
-
getWeakRedstonePower
Returns the block's weak redstone power.- Overrides:
getWeakRedstonePowerin classBlock- Parameters:
view- BlockView instancepos- The block's positionstate- The block's BlockStatefacing- The block's direction- Returns:
- Block's weak redstone power
- Mappings:
Namespace Name Mixin selector official aLatr;a(Lard;Ldt;Lbec;Lej;)Iintermediary method_8653Lnet/minecraft/class_197;method_8653(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1354;)Inamed getWeakRedstonePowerLnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
getStrongRedstonePower
Returns the block's strong redstone power.- Overrides:
getStrongRedstonePowerin classBlock- Parameters:
view- BlockView instancepos- The block's positionstate- The block's BlockStatefacing- The block's direction- Returns:
- The Block's strong redstone power
- Mappings:
Namespace Name Mixin selector official bLatr;b(Lard;Ldt;Lbec;Lej;)Iintermediary method_8664Lnet/minecraft/class_197;method_8664(Lnet/minecraft/class_1158;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1354;)Inamed getStrongRedstonePowerLnet/minecraft/block/Block;getStrongRedstonePower(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
updatePoweredStatus
- Mappings:
Namespace Name Mixin selector official eLauy;e(Laqu;Ldt;Lbec;)Vintermediary method_8719Lnet/minecraft/class_124;method_8719(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed updatePoweredStatusLnet/minecraft/block/DetectorRailBlock;updatePoweredStatus(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
onCreation
Runs when the block is placed (by a player or enderman).- Overrides:
onCreationin classAbstractRailBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official cLatr;c(Laqu;Ldt;Lbec;)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
-
getShapeProperty
- Specified by:
getShapePropertyin classAbstractRailBlock- Mappings:
Namespace Name Mixin selector official lLati;l()Lbex;intermediary method_8616Lnet/minecraft/class_1446;method_8616()Lnet/minecraft/class_2247;named getShapePropertyLnet/minecraft/block/AbstractRailBlock;getShapeProperty()Lnet/minecraft/state/property/Property;
-
hasComparatorOutput
public boolean hasComparatorOutput()Returns whether the block provides comparator output. Used in blocks with entities like Chests and Droppers.- Overrides:
hasComparatorOutputin classBlock- Returns:
- Whether the block provides comparator output
- Mappings:
Namespace Name Mixin selector official NLatr;N()Zintermediary method_4797Lnet/minecraft/class_197;method_4797()Znamed hasComparatorOutputLnet/minecraft/block/Block;hasComparatorOutput()Z
-
getComparatorOutput
Returns the block's comparator output value. Used in blocks with entities like Chests and Droppers.- Overrides:
getComparatorOutputin classBlock- Returns:
- The block's comparator output value
- Mappings:
Namespace Name Mixin selector official lLatr;l(Laqu;Ldt;)Iintermediary method_8686Lnet/minecraft/class_197;method_8686(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Inamed getComparatorOutputLnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
method_8717
- Mappings:
Namespace Name Mixin selector official aLauy;a(Laqu;Ldt;Ljava/lang/Class;[Lcom/google/common/base/Predicate;)Ljava/util/List;intermediary method_8717Lnet/minecraft/class_124;method_8717(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Ljava/lang/Class;[Lcom/google/common/base/Predicate;)Ljava/util/List;named method_8717Lnet/minecraft/block/DetectorRailBlock;method_8717(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Ljava/lang/Class;[Lcom/google/common/base/Predicate;)Ljava/util/List;
-
getCartDetectionBox
- Mappings:
Namespace Name Mixin selector official aLauy;a(Ldt;)Lbrt;intermediary method_8718Lnet/minecraft/class_124;method_8718(Lnet/minecraft/class_2552;)Lnet/minecraft/class_231;named getCartDetectionBoxLnet/minecraft/block/DetectorRailBlock;getCartDetectionBox(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
-
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 aLatr;a(I)Lbec;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 cLatr;c(Lbec;)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 eLatr;e()Lbed;intermediary method_8676Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-