类 BaseRailBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseRailBlock
- 所有已实现的接口:
FeatureElement
,BucketPickup
,LiquidBlockContainer
,SimpleWaterloggedBlock
,ItemLike
,IBaseRailBlockExtension
,IBlockExtension
,IBucketPickupExtension
public abstract class BaseRailBlock
extends Block
implements SimpleWaterloggedBlock, IBaseRailBlockExtension
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.level.block.Block
Block.ShapePairKey
从类继承的嵌套类/接口 net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
字段概要
字段修饰符和类型字段说明private final boolean
private static final VoxelShape
private static final VoxelShape
static final BooleanProperty
从类继承的字段 net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, CODEC, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS
从类继承的字段 net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected void
affectNeighborsAfterRemoval
(BlockState p_393821_, ServerLevel p_394170_, BlockPos p_394092_, boolean p_393869_) protected boolean
canSurvive
(BlockState p_49395_, LevelReader p_49396_, BlockPos p_49397_) protected abstract com.mojang.serialization.MapCodec
<? extends BaseRailBlock> codec()
protected FluidState
getFluidState
(BlockState p_152158_) getRailDirection
(BlockState state, BlockGetter world, BlockPos pos, AbstractMinecart cart) Return the rail's direction.protected VoxelShape
getShape
(BlockState p_49403_, BlockGetter p_49404_, BlockPos p_49405_, CollisionContext p_49406_) 已过时。getStateForPlacement
(BlockPlaceContext p_49363_) boolean
isFlexibleRail
(BlockState state, BlockGetter world, BlockPos pos) Return true if the rail can make corners.static boolean
isRail
(BlockState p_49417_) static boolean
boolean
protected RailShape
protected void
neighborChanged
(BlockState p_49377_, Level p_49378_, BlockPos p_49379_, Block p_49380_, Orientation p_361387_, boolean p_49382_) protected void
onPlace
(BlockState p_49408_, Level p_49409_, BlockPos p_49410_, BlockState p_49411_, boolean p_49412_) protected RailShape
private static boolean
shouldBeRemoved
(BlockPos p_49399_, Level p_49400_, RailShape p_49401_) protected BlockState
updateDir
(Level p_49368_, BlockPos p_49369_, BlockState p_49370_, boolean p_49371_) protected BlockState
updateShape
(BlockState p_152151_, LevelReader p_374498_, ScheduledTickAccess p_374379_, BlockPos p_152155_, Direction p_152152_, BlockPos p_152156_, BlockState p_152153_, RandomSource p_374573_) protected BlockState
updateState
(BlockState p_49390_, Level p_49391_, BlockPos p_49392_, boolean p_49393_) protected void
updateState
(BlockState p_49372_, Level p_49373_, BlockPos p_49374_, Block p_49375_) 从类继承的方法 net.minecraft.world.level.block.Block
animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, createBlockStateDefinition, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
从类继承的方法 net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItem
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.neoforged.neoforge.common.extensions.IBaseRailBlockExtension
canMakeSlopes, getRailMaxSpeed, isValidRailShape, onMinecartPass
从接口继承的方法 net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
从接口继承的方法 net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSound
从接口继承的方法 net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
字段详细资料
-
WATERLOGGED
-
SHAPE_FLAT
-
SHAPE_SLOPE
-
isStraight
private final boolean isStraight
-
-
构造器详细资料
-
BaseRailBlock
-
-
方法详细资料
-
isRail
-
isRail
-
codec
-
isStraight
public boolean isStraight() -
getShape
protected VoxelShape getShape(BlockState p_49403_, BlockGetter p_49404_, BlockPos p_49405_, CollisionContext p_49406_) - 覆盖:
getShape
在类中BlockBehaviour
-
canSurvive
- 覆盖:
canSurvive
在类中BlockBehaviour
-
onPlace
protected void onPlace(BlockState p_49408_, Level p_49409_, BlockPos p_49410_, BlockState p_49411_, boolean p_49412_) - 覆盖:
onPlace
在类中BlockBehaviour
-
updateState
protected BlockState updateState(BlockState p_49390_, Level p_49391_, BlockPos p_49392_, boolean p_49393_) -
neighborChanged
protected void neighborChanged(BlockState p_49377_, Level p_49378_, BlockPos p_49379_, Block p_49380_, @Nullable Orientation p_361387_, boolean p_49382_) - 覆盖:
neighborChanged
在类中BlockBehaviour
-
shouldBeRemoved
-
updateState
-
updateDir
protected BlockState updateDir(Level p_49368_, BlockPos p_49369_, BlockState p_49370_, boolean p_49371_) -
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState p_393821_, ServerLevel p_394170_, BlockPos p_394092_, boolean p_393869_) -
getStateForPlacement
- 覆盖:
getStateForPlacement
在类中Block
-
getShapeProperty
已过时。Forge: UsegetRailDirection(BlockState, BlockGetter, BlockPos, net.minecraft.world.entity.vehicle.AbstractMinecart)
for enhanced ability If you do change this property be aware that other functions in this/subclasses may break as they can make assumptions about this property -
rotate
-
mirror
-
updateShape
protected BlockState updateShape(BlockState p_152151_, LevelReader p_374498_, ScheduledTickAccess p_374379_, BlockPos p_152155_, Direction p_152152_, BlockPos p_152156_, BlockState p_152153_, RandomSource p_374573_) - 覆盖:
updateShape
在类中BlockBehaviour
-
getFluidState
- 覆盖:
getFluidState
在类中BlockBehaviour
-
isFlexibleRail
从接口复制的说明:IBaseRailBlockExtension
Return true if the rail can make corners. Used by placement logic.- 指定者:
isFlexibleRail
在接口中IBaseRailBlockExtension
- 参数:
world
- The level.pos
- Block's position in level- 返回:
- True if the rail can make corners.
-
getRailDirection
public RailShape getRailDirection(BlockState state, BlockGetter world, BlockPos pos, @Nullable AbstractMinecart cart) 从接口复制的说明:IBaseRailBlockExtension
Return 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.- 指定者:
getRailDirection
在接口中IBaseRailBlockExtension
- 参数:
state
- The BlockStateworld
- The level.pos
- Block's position in levelcart
- The cart asking for the metadata, null if it is not called by EntityMinecart.- 返回:
- The direction.
-
getRailDirection(BlockState, BlockGetter, BlockPos, net.minecraft.world.entity.vehicle.AbstractMinecart)
for enhanced ability If you do change this property be aware that other functions in this/subclasses may break as they can make assumptions about this property