Package net.minecraft.block
Class DetectorRailBlock
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Block>
-
- net.minecraft.block.AbstractBlock
-
- net.minecraft.block.Block
-
- net.minecraft.block.AbstractRailBlock
-
- net.minecraft.block.DetectorRailBlock
-
- All Implemented Interfaces:
IItemProvider
,IAbstractRailBlock
,IForgeBlock
,IForgeRegistryEntry<Block>
public class DetectorRailBlock extends AbstractRailBlock
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
-
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description static BooleanProperty
POWERED
static EnumProperty<RailShape>
SHAPE
-
Fields inherited from class net.minecraft.block.AbstractRailBlock
FLAT_AABB, HALF_BLOCK_AABB
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
-
Fields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Constructor Description DetectorRailBlock(AbstractBlock.Properties p_i48417_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkPressed(World p_176570_1_, BlockPos p_176570_2_, BlockState p_176570_3_)
protected void
createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
void
entityInside(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_)
int
getAnalogOutputSignal(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_)
int
getDirectSignal(BlockState p_176211_1_, IBlockReader p_176211_2_, BlockPos p_176211_3_, Direction p_176211_4_)
protected <T extends AbstractMinecartEntity>
java.util.List<T>getInteractingMinecartOfType(World p_200878_1_, BlockPos p_200878_2_, java.lang.Class<T> p_200878_3_, java.util.function.Predicate<Entity> p_200878_4_)
private AxisAlignedBB
getSearchBB(BlockPos p_176572_1_)
Property<RailShape>
getShapeProperty()
int
getSignal(BlockState p_180656_1_, IBlockReader p_180656_2_, BlockPos p_180656_3_, Direction p_180656_4_)
boolean
hasAnalogOutputSignal(BlockState p_149740_1_)
boolean
isSignalSource(BlockState p_149744_1_)
BlockState
mirror(BlockState p_185471_1_, Mirror p_185471_2_)
void
onPlace(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_)
BlockState
rotate(BlockState p_185499_1_, Rotation p_185499_2_)
void
tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, java.util.Random p_225534_4_)
protected void
updatePowerToConnected(World p_185592_1_, BlockPos p_185592_2_, BlockState p_185592_3_, boolean p_185592_4_)
-
Methods inherited from class net.minecraft.block.AbstractRailBlock
canSurvive, getPistonPushReaction, getRailDirection, getShape, getStateForPlacement, isFlexibleRail, isRail, isRail, isStraight, neighborChanged, onRemove, updateDir, updateState, updateState
-
Methods inherited from class net.minecraft.block.Block
animateTick, appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded
-
Methods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, defaultMaterialColor, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getRenderShape, getSeed, getShadeBrightness, getVisualShape, isAir, isEntityBlock, isPathfindable, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, updateShape, use, useShapeForLightOcclusion
-
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.extensions.IAbstractRailBlock
canMakeSlopes, getAbstractBlock, getRailMaxSpeed, onMinecartPass
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
-
-
-
Field Detail
-
SHAPE
public static final EnumProperty<RailShape> SHAPE
-
POWERED
public static final BooleanProperty POWERED
-
-
Constructor Detail
-
DetectorRailBlock
public DetectorRailBlock(AbstractBlock.Properties p_i48417_1_)
-
-
Method Detail
-
isSignalSource
public boolean isSignalSource(BlockState p_149744_1_)
- Overrides:
isSignalSource
in classAbstractBlock
-
entityInside
public void entityInside(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_)
- Overrides:
entityInside
in classAbstractBlock
-
tick
public void tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, java.util.Random p_225534_4_)
- Overrides:
tick
in classAbstractBlock
-
getSignal
public int getSignal(BlockState p_180656_1_, IBlockReader p_180656_2_, BlockPos p_180656_3_, Direction p_180656_4_)
- Overrides:
getSignal
in classAbstractBlock
-
getDirectSignal
public int getDirectSignal(BlockState p_176211_1_, IBlockReader p_176211_2_, BlockPos p_176211_3_, Direction p_176211_4_)
- Overrides:
getDirectSignal
in classAbstractBlock
-
checkPressed
private void checkPressed(World p_176570_1_, BlockPos p_176570_2_, BlockState p_176570_3_)
-
updatePowerToConnected
protected void updatePowerToConnected(World p_185592_1_, BlockPos p_185592_2_, BlockState p_185592_3_, boolean p_185592_4_)
-
onPlace
public void onPlace(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_)
- Overrides:
onPlace
in classAbstractRailBlock
-
getShapeProperty
public Property<RailShape> getShapeProperty()
- Specified by:
getShapeProperty
in classAbstractRailBlock
-
hasAnalogOutputSignal
public boolean hasAnalogOutputSignal(BlockState p_149740_1_)
- Overrides:
hasAnalogOutputSignal
in classAbstractBlock
-
getAnalogOutputSignal
public int getAnalogOutputSignal(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_)
- Overrides:
getAnalogOutputSignal
in classAbstractBlock
-
getInteractingMinecartOfType
protected <T extends AbstractMinecartEntity> java.util.List<T> getInteractingMinecartOfType(World p_200878_1_, BlockPos p_200878_2_, java.lang.Class<T> p_200878_3_, @Nullable java.util.function.Predicate<Entity> p_200878_4_)
-
getSearchBB
private AxisAlignedBB getSearchBB(BlockPos p_176572_1_)
-
rotate
public BlockState rotate(BlockState p_185499_1_, Rotation p_185499_2_)
- Overrides:
rotate
in classAbstractBlock
-
mirror
public BlockState mirror(BlockState p_185471_1_, Mirror p_185471_2_)
- Overrides:
mirror
in classAbstractBlock
-
createBlockStateDefinition
protected void createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
- Overrides:
createBlockStateDefinition
in classBlock
-
-