Package net.minecraft.block
Class PoweredRailBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.AbstractRailBlock
net.minecraft.block.PoweredRailBlock
- All Implemented Interfaces:
ItemConvertible
public class PoweredRailBlock extends AbstractRailBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description static BooleanProperty
POWERED
static EnumProperty<RailShape>
SHAPE
Fields inherited from class net.minecraft.block.AbstractRailBlock
ASCENDING_SHAPE, STRAIGHT_SHAPE
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Modifier Constructor Description protected
PoweredRailBlock(AbstractBlock.Settings settings)
-
Method Summary
Modifier and Type Method Description protected void
appendProperties(StateManager.Builder<Block,BlockState> builder)
Property<RailShape>
getShapeProperty()
protected boolean
isPoweredByOtherRails(World world, BlockPos pos, boolean bool, int distance, RailShape shape)
protected boolean
isPoweredByOtherRails(World world, BlockPos pos, BlockState state, boolean boolean4, int distance)
BlockState
mirror(BlockState state, BlockMirror mirror)
BlockState
rotate(BlockState state, BlockRotation rotation)
Applies a block rotation to a block state.protected void
updateBlockState(BlockState state, World world, BlockPos pos, Block neighbor)
Methods inherited from class net.minecraft.block.AbstractRailBlock
canMakeCurves, canPlaceAt, getOutlineShape, getPistonBehavior, getPlacementState, isRail, isRail, neighborUpdate, onBlockAdded, onStateReplaced, updateBlockState, updateCurves
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTick, scheduledTick
-
Field Details
-
SHAPE
-
POWERED
-
-
Constructor Details
-
PoweredRailBlock
-
-
Method Details
-
isPoweredByOtherRails
protected boolean isPoweredByOtherRails(World world, BlockPos pos, BlockState state, boolean boolean4, int distance) -
isPoweredByOtherRails
-
updateBlockState
- Overrides:
updateBlockState
in classAbstractRailBlock
-
getShapeProperty
- Specified by:
getShapeProperty
in classAbstractRailBlock
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotate
in classAbstractBlock
- Returns:
- the rotated block state
-
mirror
- Overrides:
mirror
in classAbstractBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-