Package net.minecraft.block
Class AbstractRailBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.AbstractRailBlock
- All Implemented Interfaces:
FluidDrainable,FluidFillable,Waterloggable,ItemConvertible
- Direct Known Subclasses:
DetectorRailBlock,PoweredRailBlock,RailBlock
- Mappings:
Namespace Name official cimintermediary net/minecraft/class_2241named net/minecraft/block/AbstractRailBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final VoxelShapeprivate final booleanprotected static final VoxelShapestatic final BooleanPropertyFields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRailBlock(boolean forbidCurves, AbstractBlock.Settings settings) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancanPlaceAt(BlockState state, WorldView world, BlockPos pos) getFluidState(BlockState state) getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getPistonBehavior(BlockState state) 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.static booleanisRail(BlockState state) static booleanvoidneighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, 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) Methods inherited from class net.minecraft.block.Block
afterBreak, appendProperties, appendStacks, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, 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, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTick, rotate, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getBucketFillSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
STRAIGHT_SHAPE
- Mappings:
Namespace Name Mixin selector official aLcim;a:Ldwm;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
- Mappings:
Namespace Name Mixin selector official bLcim;b:Ldwm;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
- Mappings:
Namespace Name Mixin selector official cLcim;c:Lcvi;intermediary field_27096Lnet/minecraft/class_2241;field_27096:Lnet/minecraft/class_2746;named WATERLOGGEDLnet/minecraft/block/AbstractRailBlock;WATERLOGGED:Lnet/minecraft/state/property/BooleanProperty;
-
forbidCurves
private final boolean forbidCurves- Mappings:
Namespace Name Mixin selector official dLcim;d:Zintermediary field_9959Lnet/minecraft/class_2241;field_9959:Znamed forbidCurvesLnet/minecraft/block/AbstractRailBlock;forbidCurves:Z
-
-
Constructor Details
-
AbstractRailBlock
- Mappings:
Namespace Name Mixin selector official <init>Lcim;<init>(ZLcuq$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
-
-
Method Details
-
isRail
- Mappings:
Namespace Name Mixin selector official aLcim;a(Lcga;Lgt;)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
- Mappings:
Namespace Name Mixin selector official gLcim;g(Lcur;)Zintermediary method_9476Lnet/minecraft/class_2241;method_9476(Lnet/minecraft/class_2680;)Znamed isRailLnet/minecraft/block/AbstractRailBlock;isRail(Lnet/minecraft/block/BlockState;)Z
-
cannotMakeCurves
public boolean cannotMakeCurves()- Mappings:
Namespace Name Mixin selector official bLcim;b()Zintermediary method_9478Lnet/minecraft/class_2241;method_9478()Znamed cannotMakeCurvesLnet/minecraft/block/AbstractRailBlock;cannotMakeCurves()Z
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcfg;Lgt;Ldvy;)Ldwm;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
- Overrides:
canPlaceAtin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcgd;Lgt;)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) - Overrides:
onBlockAddedin classAbstractBlock- Mappings:
Namespace Name Mixin selector official bLcuq;b(Lcur;Lcga;Lgt;Lcur;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
- Mappings:
Namespace Name Mixin selector official aLcim;a(Lcur;Lcga;Lgt;Z)Lcur;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 sourceBlock, BlockPos sourcePos, boolean notify) - Overrides:
neighborUpdatein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcga;Lgt;Lciw;Lgt;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
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 aLcim;a(Lgt;Lcga;Lcvv;)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
- Mappings:
Namespace Name Mixin selector official aLcim;a(Lcur;Lcga;Lgt;Lciw;)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 aLcim;a(Lcga;Lgt;Lcur;Z)Lcur;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
- Overrides:
getPistonBehaviorin classAbstractBlock- Mappings:
Namespace Name Mixin selector official dLcuq;d(Lcur;)Ldpe;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.- Overrides:
onStateReplacedin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lcga;Lgt;Lcur;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
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector official aLciw;a(Lcca;)Lcur;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
- Mappings:
Namespace Name Mixin selector official cLcim;c()Lcvu;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.- Overrides:
getStateForNeighborUpdatein classAbstractBlock- Parameters:
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- Returns:
- the new state of this block
- Mappings:
Namespace Name Mixin selector official aLcuq;a(Lcur;Lgy;Lcur;Lcgb;Lgt;Lgt;)Lcur;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
- Overrides:
getFluidStatein classAbstractBlock- Mappings:
Namespace Name Mixin selector official c_Lcuq;c_(Lcur;)Ldoy;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;
-