类 AbstractRailBlock
- java.lang.Object
-
- net.minecraft.block.AbstractBlock
-
- net.minecraft.block.Block
-
- net.minecraft.block.AbstractRailBlock
-
- 所有已实现的接口:
FluidDrainable,FluidFillable,Waterloggable,ItemConvertible
- 直接已知子类:
DetectorRailBlock,PoweredRailBlock,RailBlock
public abstract class AbstractRailBlock extends Block implements Waterloggable
- Mappings:
Namespace Name official bygintermediary net/minecraft/class_2241named net/minecraft/block/AbstractRailBlock
-
-
嵌套类概要
-
从类继承的嵌套类/接口 net.minecraft.block.Block
Block.NeighborGroup
-
从类继承的嵌套类/接口 net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
-
字段概要
字段 修饰符和类型 字段 说明 private booleanallowCurvesprotected static VoxelShapeASCENDING_SHAPEprotected static VoxelShapeSTRAIGHT_SHAPEstatic BooleanPropertyWATERLOGGED-
从类继承的字段 net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, LOGGER, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManager
-
从类继承的字段 net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
-
构造器概要
构造器 限定符 构造器 说明 protectedAbstractRailBlock(boolean allowCurves, AbstractBlock.Settings settings)
-
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 booleancanMakeCurves()booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos)FluidStategetFluidState(BlockState state)VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)PistonBehaviorgetPistonBehavior(BlockState state)BlockStategetPlacementState(ItemPlacementContext ctx)abstract Property<RailShape>getShapeProperty()BlockStategetStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos)Gets the possibly updated block state of this block when a neighboring block is updated.static booleanisRail(BlockState state)static booleanisRail(World world, BlockPos pos)voidneighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)voidonBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)voidonStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate.private static booleanshouldDropRail(BlockPos pos, World world, RailShape shape)Checks if this rail should be dropped.protected voidupdateBlockState(BlockState state, World world, BlockPos pos, Block neighbor)protected BlockStateupdateBlockState(World world, BlockPos pos, BlockState state, boolean forceUpdate)protected BlockStateupdateCurves(BlockState state, World world, BlockPos pos, boolean notify)-
从类继承的方法 net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendProperties, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toString
-
从类继承的方法 net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTick, rotate, scheduledTick
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 net.minecraft.block.Waterloggable
canFillWithFluid, getBucketFillSound, tryDrainFluid, tryFillWithFluid
-
-
-
-
字段详细资料
-
STRAIGHT_SHAPE
protected static final VoxelShape STRAIGHT_SHAPE
- Mappings:
Namespace Name Mixin selector official aLbyg;a:Ldmt;intermediary field_9958Lnet/minecraft/class_2241;field_9958:Lnet/minecraft/class_265;named STRAIGHT_SHAPELnet/minecraft/block/AbstractRailBlock;STRAIGHT_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
ASCENDING_SHAPE
protected static final VoxelShape ASCENDING_SHAPE
- Mappings:
Namespace Name Mixin selector official bLbyg;b:Ldmt;intermediary field_9960Lnet/minecraft/class_2241;field_9960:Lnet/minecraft/class_265;named ASCENDING_SHAPELnet/minecraft/block/AbstractRailBlock;ASCENDING_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WATERLOGGED
public static final BooleanProperty WATERLOGGED
- Mappings:
Namespace Name Mixin selector official cLbyg;c:Lcki;intermediary field_27096Lnet/minecraft/class_2241;field_27096:Lnet/minecraft/class_2746;named WATERLOGGEDLnet/minecraft/block/AbstractRailBlock;WATERLOGGED:Lnet/minecraft/state/property/BooleanProperty;
-
allowCurves
private final boolean allowCurves
- Mappings:
Namespace Name Mixin selector official dLbyg;d:Zintermediary field_9959Lnet/minecraft/class_2241;field_9959:Znamed allowCurvesLnet/minecraft/block/AbstractRailBlock;allowCurves:Z
-
-
构造器详细资料
-
AbstractRailBlock
protected AbstractRailBlock(boolean allowCurves, AbstractBlock.Settings settings)- Mappings:
Namespace Name Mixin selector official <init>Lbyg;<init>(ZLcjq$c;)Vintermediary <init>Lnet/minecraft/class_2241;<init>(ZLnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractRailBlock;<init>(ZLnet/minecraft/block/AbstractBlock$Settings;)V
-
-
方法详细资料
-
isRail
public static boolean isRail(World world, BlockPos pos)
- Mappings:
Namespace Name Mixin selector official aLbyg;a(Lbvr;Lgb;)Zintermediary method_9479Lnet/minecraft/class_2241;method_9479(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Znamed isRailLnet/minecraft/block/AbstractRailBlock;isRail(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
isRail
public static boolean isRail(BlockState state)
- Mappings:
Namespace Name Mixin selector official gLbyg;g(Lcjr;)Zintermediary method_9476Lnet/minecraft/class_2241;method_9476(Lnet/minecraft/class_2680;)Znamed isRailLnet/minecraft/block/AbstractRailBlock;isRail(Lnet/minecraft/block/BlockState;)Z
-
canMakeCurves
public boolean canMakeCurves()
- Mappings:
Namespace Name Mixin selector official am_Lbyg;am_()Zintermediary method_9478Lnet/minecraft/class_2241;method_9478()Znamed canMakeCurvesLnet/minecraft/block/AbstractRailBlock;canMakeCurves()Z
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
- 覆盖:
getOutlineShape在类中AbstractBlock- Mappings:
Namespace Name Mixin selector official aLcjq;a(Lcjr;Lbuv;Lgb;Ldmf;)Ldmt;intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
canPlaceAt
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos)
- 覆盖:
canPlaceAt在类中AbstractBlock- Mappings:
Namespace Name Mixin selector official aLcjq;a(Lcjr;Lbvu;Lgb;)Zintermediary method_9558Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Znamed canPlaceAtLnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
- 覆盖:
onBlockAdded在类中AbstractBlock- Mappings:
Namespace Name Mixin selector official bLcjq;b(Lcjr;Lbvr;Lgb;Lcjr;Z)Vintermediary method_9615Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Vnamed onBlockAddedLnet/minecraft/block/AbstractBlock;onBlockAdded(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
-
updateCurves
protected BlockState updateCurves(BlockState state, World world, BlockPos pos, boolean notify)
- Mappings:
Namespace Name Mixin selector official aLbyg;a(Lcjr;Lbvr;Lgb;Z)Lcjr;intermediary method_24417Lnet/minecraft/class_2241;method_24417(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Z)Lnet/minecraft/class_2680;named updateCurvesLnet/minecraft/block/AbstractRailBlock;updateCurves(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Z)Lnet/minecraft/block/BlockState;
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
- 覆盖:
neighborUpdate在类中AbstractBlock- Mappings:
Namespace Name Mixin selector official aLcjq;a(Lcjr;Lbvr;Lgb;Lbyq;Lgb;Z)Vintermediary method_9612Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;Z)Vnamed neighborUpdateLnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos;Z)V
-
shouldDropRail
private static boolean shouldDropRail(BlockPos pos, World world, RailShape shape)
Checks if this rail should be dropped.This method will return true if:
- The rail block is ascending.
- The block in the direction of ascent does not have a top rim.
- Mappings:
Namespace Name Mixin selector official aLbyg;a(Lgb;Lbvr;Lckv;)Zintermediary method_27935Lnet/minecraft/class_2241;method_27935(Lnet/minecraft/class_2338;Lnet/minecraft/class_1937;Lnet/minecraft/class_2768;)Znamed shouldDropRailLnet/minecraft/block/AbstractRailBlock;shouldDropRail(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/World;Lnet/minecraft/block/enums/RailShape;)Z
-
updateBlockState
protected void updateBlockState(BlockState state, World world, BlockPos pos, Block neighbor)
- Mappings:
Namespace Name Mixin selector official aLbyg;a(Lcjr;Lbvr;Lgb;Lbyq;)Vintermediary method_9477Lnet/minecraft/class_2241;method_9477(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;)Vnamed updateBlockStateLnet/minecraft/block/AbstractRailBlock;updateBlockState(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;)V
-
updateBlockState
protected BlockState updateBlockState(World world, BlockPos pos, BlockState state, boolean forceUpdate)
- Mappings:
Namespace Name Mixin selector official aLbyg;a(Lbvr;Lgb;Lcjr;Z)Lcjr;intermediary method_9475Lnet/minecraft/class_2241;method_9475(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Lnet/minecraft/class_2680;named updateBlockStateLnet/minecraft/block/AbstractRailBlock;updateBlockState(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Lnet/minecraft/block/BlockState;
-
getPistonBehavior
public PistonBehavior getPistonBehavior(BlockState state)
- 覆盖:
getPistonBehavior在类中AbstractBlock- Mappings:
Namespace Name Mixin selector official dLcjq;d(Lcjr;)Lddy;intermediary method_9527Lnet/minecraft/class_4970;method_9527(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3619;named getPistonBehaviorLnet/minecraft/block/AbstractBlock;getPistonBehavior(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/piston/PistonBehavior;
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)
Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate. Vanilla blocks perform removal cleanups here.- 覆盖:
onStateReplaced在类中AbstractBlock- Mappings:
Namespace Name Mixin selector official aLcjq;a(Lcjr;Lbvr;Lgb;Lcjr;Z)Vintermediary method_9536Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Vnamed onStateReplacedLnet/minecraft/block/AbstractBlock;onStateReplaced(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
-
getPlacementState
public BlockState getPlacementState(ItemPlacementContext ctx)
- 覆盖:
getPlacementState在类中Block- Mappings:
Namespace Name Mixin selector official aLbyq;a(Lbrr;)Lcjr;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
getShapeProperty
public abstract Property<RailShape> getShapeProperty()
- Mappings:
Namespace Name Mixin selector official an_Lbyg;an_()Lcku;intermediary method_9474Lnet/minecraft/class_2241;method_9474()Lnet/minecraft/class_2769;named getShapePropertyLnet/minecraft/block/AbstractRailBlock;getShapeProperty()Lnet/minecraft/state/property/Property;
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos)
Gets the possibly updated block state of this block when a neighboring block is updated.- 覆盖:
getStateForNeighborUpdate在类中AbstractBlock- 参数:
state- the state of this blockdirection- the direction from this block to the neighborneighborState- the state of the updated neighbor blockworld- the worldpos- the position of this blockneighborPos- the position of the neighbor block- 返回:
- the new state of this block
- Mappings:
Namespace Name Mixin selector official aLcjq;a(Lcjr;Lgg;Lcjr;Lbvs;Lgb;Lgb;)Lcjr;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
getFluidState
public FluidState getFluidState(BlockState state)
- 覆盖:
getFluidState在类中AbstractBlock- Mappings:
Namespace Name Mixin selector official c_Lcjq;c_(Lcjr;)Ldds;intermediary method_9545Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;named getFluidStateLnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;
-
-