Package net.minecraft.block
Class DetectorRailBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.AbstractRailBlock
net.minecraft.block.DetectorRailBlock
public class DetectorRailBlock extends AbstractRailBlock
- Mappings:
Namespace Name official agcintermediary net/minecraft/class_186named net/minecraft/block/DetectorRailBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.AbstractRailBlock
AbstractRailBlock.RailPlacementHelper, AbstractRailBlock.RailShapeTypeNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static BooleanPropertyPOWEREDstatic EnumProperty<AbstractRailBlock.RailShapeType>SHAPEFields inherited from class net.minecraft.block.AbstractRailBlock
allowCurvesFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors Constructor Description DetectorRailBlock() -
Method Summary
Modifier and Type Method Description protected StateManagerappendProperties()Returns a new state manager with a property array.booleanemitsRedstonePower()Returns whether the current block emits a redstone signal.private BoxgetCartDetectionBox(BlockPos pos)intgetComparatorOutput(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 workProperty<AbstractRailBlock.RailShapeType>getShapeProperty()intgetStrongRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's strong redstone power.intgetTickRate(World world)Returns the block's tick rate.intgetWeakRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's weak redstone power.booleanhasComparatorOutput()Returns whether the block provides comparator output.protected <T extends AbstractMinecartEntity>
List<T>method_784(World world, BlockPos blockPos, Class<T> class2, Predicate<Entity>[] 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 scheduleBlockStatestateFromData(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_655, neighborUpdate, onBreaking, renderAsNormalBlock, setBoundingBox, updateBlockState, updateBlockStateMethods 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, getColor, getColor, getDefaultState, getDropCount, getDropItem, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, 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_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onDestroyedByExplosion, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUse, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
SHAPE
- Mappings:
Namespace Name Mixin selector official bLagc;b:Lamm;intermediary field_850Lnet/minecraft/class_186;field_850:Lnet/minecraft/class_390;named SHAPELnet/minecraft/block/DetectorRailBlock;SHAPE:Lnet/minecraft/state/property/EnumProperty;
-
POWERED
- Mappings:
Namespace Name Mixin selector official NLagc;N:Lamk;intermediary field_849Lnet/minecraft/class_186;field_849:Lnet/minecraft/class_388;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 aLafh;a(Ladm;)Iintermediary method_642Lnet/minecraft/class_160;method_642(Lnet/minecraft/class_99;)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 iLafh;i()Zintermediary method_723Lnet/minecraft/class_160;method_723()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 aLafh;a(Ladm;Lcj;Lalz;Lpk;)Vintermediary method_651Lnet/minecraft/class_160;method_651(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1745;)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 aLafh;a(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_650Lnet/minecraft/class_160;method_650(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;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 bLafh;b(Ladm;Lcj;Lalz;Ljava/util/Random;)Vintermediary method_690Lnet/minecraft/class_160;method_690(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;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- WorldView 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 aLafh;a(Ladq;Lcj;Lalz;Lcq;)Iintermediary method_667Lnet/minecraft/class_160;method_667(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)Inamed getWeakRedstonePowerLnet/minecraft/block/Block;getWeakRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
getStrongRedstonePower
public int getStrongRedstonePower(WorldView view, BlockPos pos, BlockState state, Direction facing)Returns the block's strong redstone power.- Overrides:
getStrongRedstonePowerin classBlock- Parameters:
view- WorldView 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 bLafh;b(Ladq;Lcj;Lalz;Lcq;)Iintermediary method_693Lnet/minecraft/class_160;method_693(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1383;)Inamed getStrongRedstonePowerLnet/minecraft/block/Block;getStrongRedstonePower(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)I
-
updatePoweredStatus
- Mappings:
Namespace Name Mixin selector official eLagc;e(Ladm;Lcj;Lalz;)Vintermediary method_786Lnet/minecraft/class_186;method_786(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)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 cLafh;c(Ladm;Lcj;Lalz;)Vintermediary method_703Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)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 nLafe;n()Lamo;intermediary method_594Lnet/minecraft/class_154;method_594()Lnet/minecraft/class_392;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 OLafh;O()Zintermediary method_629Lnet/minecraft/class_160;method_629()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 lLafh;l(Ladm;Lcj;)Iintermediary method_730Lnet/minecraft/class_160;method_730(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Inamed getComparatorOutputLnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
method_784
protected <T extends AbstractMinecartEntity> List<T> method_784(World world, BlockPos blockPos, Class<T> class2, Predicate<Entity>[] predicate)- Mappings:
Namespace Name Mixin selector official aLagc;a(Ladm;Lcj;Ljava/lang/Class;[Lcom/google/common/base/Predicate;)Ljava/util/List;intermediary method_784Lnet/minecraft/class_186;method_784(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Ljava/lang/Class;[Lcom/google/common/base/Predicate;)Ljava/util/List;named method_784Lnet/minecraft/block/DetectorRailBlock;method_784(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 aLagc;a(Lcj;)Laug;intermediary method_785Lnet/minecraft/class_186;method_785(Lnet/minecraft/class_1372;)Lnet/minecraft/class_646;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 aLafh;a(I)Lalz;intermediary method_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;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_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)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_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-