Package net.minecraft.block
Class AbstractRailBlock
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Block>
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.AbstractRailBlock
- All Implemented Interfaces:
IItemProvider,IAbstractRailBlock,IForgeBlock,IForgeRegistryEntry<Block>
- Direct Known Subclasses:
DetectorRailBlock,PoweredRailBlock,RailBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKeyNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.PropertiesNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final VoxelShapeprotected static final VoxelShapeprivate final booleanFields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinitionFields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRailBlock(boolean p_i48444_1_, AbstractBlock.Properties p_i48444_2_) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSurvive(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) getPistonPushReaction(BlockState p_149656_1_) getRailDirection(BlockState state, IBlockReader world, BlockPos pos, AbstractMinecartEntity cart) Return the rail's direction.getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) Deprecated.getStateForPlacement(BlockItemUseContext p_196258_1_) booleanisFlexibleRail(BlockState state, IBlockReader world, BlockPos pos) Return true if the rail can make corners.static booleanisRail(BlockState p_208487_0_) static booleanbooleanvoidneighborChanged(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) voidonPlace(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_) voidonRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) private static booleanshouldBeRemoved(BlockPos p_235328_0_, World p_235328_1_, RailShape p_235328_2_) protected BlockStateupdateDir(World p_208489_1_, BlockPos p_208489_2_, BlockState p_208489_3_, boolean p_208489_4_) protected BlockStateupdateState(BlockState p_235327_1_, World p_235327_2_, BlockPos p_235327_3_, boolean p_235327_4_) protected voidupdateState(BlockState p_189541_1_, World p_189541_2_, BlockPos p_189541_3_, Block p_189541_4_) Methods inherited from class net.minecraft.block.Block
animateTick, appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, createBlockStateDefinition, 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, wasExplodedMethods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, isPathfindable, isSignalSource, mirror, onProjectileHit, randomTick, rotate, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, use, useShapeForLightOcclusionMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IAbstractRailBlock
canMakeSlopes, getAbstractBlock, getRailMaxSpeed, onMinecartPassMethods 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 Details
-
FLAT_AABB
-
HALF_BLOCK_AABB
-
isStraight
private final boolean isStraight
-
-
Constructor Details
-
AbstractRailBlock
-
-
Method Details
-
isRail
-
isRail
-
isStraight
public boolean isStraight() -
getShape
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) - Overrides:
getShapein classAbstractBlock
-
canSurvive
- Overrides:
canSurvivein classAbstractBlock
-
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:
onPlacein classAbstractBlock
-
updateState
protected BlockState updateState(BlockState p_235327_1_, World p_235327_2_, BlockPos p_235327_3_, boolean p_235327_4_) -
neighborChanged
public void neighborChanged(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) - Overrides:
neighborChangedin classAbstractBlock
-
shouldBeRemoved
-
updateState
protected void updateState(BlockState p_189541_1_, World p_189541_2_, BlockPos p_189541_3_, Block p_189541_4_) -
updateDir
protected BlockState updateDir(World p_208489_1_, BlockPos p_208489_2_, BlockState p_208489_3_, boolean p_208489_4_) -
getPistonPushReaction
- Overrides:
getPistonPushReactionin classAbstractBlock
-
onRemove
public void onRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) - Overrides:
onRemovein classAbstractBlock
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getShapeProperty
Deprecated. -
isFlexibleRail
Description copied from interface:IAbstractRailBlockReturn true if the rail can make corners. Used by placement logic.- Specified by:
isFlexibleRailin interfaceIAbstractRailBlockworld- The world.pos- Block's position in world- Returns:
- True if the rail can make corners.
-
getRailDirection
public RailShape getRailDirection(BlockState state, IBlockReader world, BlockPos pos, @Nullable AbstractMinecartEntity cart) Description copied from interface:IAbstractRailBlockReturn the rail's direction. Can be used to make the cart think the rail is a different shape, for example when making diamond junctions or switches. The cart parameter will often be null unless it it called from EntityMinecart.- Specified by:
getRailDirectionin interfaceIAbstractRailBlock- Parameters:
state- The BlockStateworld- The world.pos- Block's position in worldcart- The cart asking for the metadata, null if it is not called by EntityMinecart.- Returns:
- The direction.
-