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
public abstract class AbstractRailBlock extends Block implements Waterloggable
- Mappings:
Namespace Name official bwk
intermediary net/minecraft/class_2241
named net/minecraft/block/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 private boolean
allowCurves
protected static VoxelShape
ASCENDING_SHAPE
protected static VoxelShape
STRAIGHT_SHAPE
static BooleanProperty
WATERLOGGED
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRailBlock(boolean allowCurves, AbstractBlock.Settings settings)
-
Method Summary
Modifier and Type Method Description boolean
canMakeCurves()
boolean
canPlaceAt(BlockState state, WorldView world, BlockPos pos)
FluidState
getFluidState(BlockState state)
VoxelShape
getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
PistonBehavior
getPistonBehavior(BlockState state)
BlockState
getPlacementState(ItemPlacementContext ctx)
abstract Property<RailShape>
getShapeProperty()
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.static boolean
isRail(BlockState state)
static boolean
isRail(World world, BlockPos pos)
void
neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
void
onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
void
onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)
Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)
ifnewState
is different fromstate
.private static boolean
shouldDropRail(BlockPos pos, World world, RailShape shape)
Checks if this rail should be dropped.protected void
updateBlockState(BlockState state, World world, BlockPos pos, Block neighbor)
protected BlockState
updateBlockState(World world, BlockPos pos, BlockState state, boolean forceUpdate)
protected BlockState
updateCurves(BlockState state, World world, BlockPos pos, boolean notify)
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendProperties, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, method_33614, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, 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, getDefaultMapColor, getDroppedStacks, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTick, rotate, scheduledTick
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getBucketFillSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
STRAIGHT_SHAPE
- Mappings:
Namespace Name Mixin selector official a
Lbwk;a:Ldjn;
intermediary field_9958
Lnet/minecraft/class_2241;field_9958:Lnet/minecraft/class_265;
named STRAIGHT_SHAPE
Lnet/minecraft/block/AbstractRailBlock;STRAIGHT_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
ASCENDING_SHAPE
- Mappings:
Namespace Name Mixin selector official b
Lbwk;b:Ldjn;
intermediary field_9960
Lnet/minecraft/class_2241;field_9960:Lnet/minecraft/class_265;
named ASCENDING_SHAPE
Lnet/minecraft/block/AbstractRailBlock;ASCENDING_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WATERLOGGED
- Mappings:
Namespace Name Mixin selector official c
Lbwk;c:Lcik;
intermediary field_27096
Lnet/minecraft/class_2241;field_27096:Lnet/minecraft/class_2746;
named WATERLOGGED
Lnet/minecraft/block/AbstractRailBlock;WATERLOGGED:Lnet/minecraft/state/property/BooleanProperty;
-
allowCurves
private final boolean allowCurves- Mappings:
Namespace Name Mixin selector official d
Lbwk;d:Z
intermediary field_9959
Lnet/minecraft/class_2241;field_9959:Z
named allowCurves
Lnet/minecraft/block/AbstractRailBlock;allowCurves:Z
-
-
Constructor Details
-
AbstractRailBlock
- Mappings:
Namespace Name Mixin selector official <init>
Lbwk;<init>(ZLchs$c;)V
intermediary <init>
Lnet/minecraft/class_2241;<init>(ZLnet/minecraft/class_4970$class_2251;)V
named <init>
Lnet/minecraft/block/AbstractRailBlock;<init>(ZLnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
isRail
- Mappings:
Namespace Name Mixin selector official a
Lbwk;a(Lbtv;Lfx;)Z
intermediary method_9479
Lnet/minecraft/class_2241;method_9479(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Z
named isRail
Lnet/minecraft/block/AbstractRailBlock;isRail(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
isRail
- Mappings:
Namespace Name Mixin selector official g
Lbwk;g(Lcht;)Z
intermediary method_9476
Lnet/minecraft/class_2241;method_9476(Lnet/minecraft/class_2680;)Z
named isRail
Lnet/minecraft/block/AbstractRailBlock;isRail(Lnet/minecraft/block/BlockState;)Z
-
canMakeCurves
public boolean canMakeCurves()- Mappings:
Namespace Name Mixin selector official al_
Lbwk;al_()Z
intermediary method_9478
Lnet/minecraft/class_2241;method_9478()Z
named canMakeCurves
Lnet/minecraft/block/AbstractRailBlock;canMakeCurves()Z
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShape
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbsz;Lfx;Ldiz;)Ldjn;
intermediary method_9530
Lnet/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 getOutlineShape
Lnet/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:
canPlaceAt
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbty;Lfx;)Z
intermediary method_9558
Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Z
named canPlaceAt
Lnet/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:
onBlockAdded
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official b
Lchs;b(Lcht;Lbtv;Lfx;Lcht;Z)V
intermediary method_9615
Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
named onBlockAdded
Lnet/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 a
Lbwk;a(Lcht;Lbtv;Lfx;Z)Lcht;
intermediary method_24417
Lnet/minecraft/class_2241;method_24417(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Z)Lnet/minecraft/class_2680;
named updateCurves
Lnet/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)- Overrides:
neighborUpdate
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbtv;Lfx;Lbwu;Lfx;Z)V
intermediary method_9612
Lnet/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)V
named neighborUpdate
Lnet/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 a
Lbwk;a(Lfx;Lbtv;Lcix;)Z
intermediary method_27935
Lnet/minecraft/class_2241;method_27935(Lnet/minecraft/class_2338;Lnet/minecraft/class_1937;Lnet/minecraft/class_2768;)Z
named shouldDropRail
Lnet/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 a
Lbwk;a(Lcht;Lbtv;Lfx;Lbwu;)V
intermediary method_9477
Lnet/minecraft/class_2241;method_9477(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;)V
named updateBlockState
Lnet/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 a
Lbwk;a(Lbtv;Lfx;Lcht;Z)Lcht;
intermediary method_9475
Lnet/minecraft/class_2241;method_9475(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Lnet/minecraft/class_2680;
named updateBlockState
Lnet/minecraft/block/AbstractRailBlock;updateBlockState(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Lnet/minecraft/block/BlockState;
-
getPistonBehavior
- Overrides:
getPistonBehavior
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official c
Lchs;c(Lcht;)Ldar;
intermediary method_9527
Lnet/minecraft/class_4970;method_9527(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3619;
named getPistonBehavior
Lnet/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)
ifnewState
is different fromstate
. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplaced
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbtv;Lfx;Lcht;Z)V
intermediary method_9536
Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
named onStateReplaced
Lnet/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:
getPlacementState
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lbwu;a(Lbpv;)Lcht;
intermediary method_9605
Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
named getPlacementState
Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
getShapeProperty
- Mappings:
Namespace Name Mixin selector official am_
Lbwk;am_()Lciw;
intermediary method_9474
Lnet/minecraft/class_2241;method_9474()Lnet/minecraft/class_2769;
named getShapeProperty
Lnet/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:
getStateForNeighborUpdate
in 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 a
Lchs;a(Lcht;Lgc;Lcht;Lbtw;Lfx;Lfx;)Lcht;
intermediary method_9559
Lnet/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 getStateForNeighborUpdate
Lnet/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:
getFluidState
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official d
Lchs;d(Lcht;)Ldal;
intermediary method_9545
Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;
named getFluidState
Lnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;
-