Class 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
  • Field Details

    • STRAIGHT_SHAPE

      protected static final VoxelShape 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

      protected static final 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

      public static final BooleanProperty 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

      protected AbstractRailBlock​(boolean allowCurves, AbstractBlock.Settings settings)
      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

      public static boolean isRail​(World world, BlockPos pos)
      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

      public static boolean isRail​(BlockState state)
      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 class AbstractBlock
      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

      public boolean canPlaceAt​(BlockState state, WorldView world, BlockPos pos)
      Overrides:
      canPlaceAt in class AbstractBlock
      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 class AbstractBlock
      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

      protected BlockState updateCurves​(BlockState state, World world, BlockPos pos, boolean notify)
      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 class AbstractBlock
      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

      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 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

      protected void updateBlockState​(BlockState state, World world, BlockPos pos, Block neighbor)
      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

      public PistonBehavior getPistonBehavior​(BlockState state)
      Overrides:
      getPistonBehavior in class AbstractBlock
      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 in WorldChunk.setBlockState(BlockPos, BlockState, boolean) if newState is different from state. Vanilla blocks perform removal cleanups here.
      Overrides:
      onStateReplaced in class AbstractBlock
      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

      public BlockState getPlacementState​(ItemPlacementContext ctx)
      Overrides:
      getPlacementState in class Block
      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

      public abstract Property<RailShape> 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 class AbstractBlock
      Parameters:
      state - the state of this block
      direction - the direction from this block to the neighbor
      neighborState - the state of the updated neighbor block
      world - the world
      pos - the position of this block
      neighborPos - 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

      public FluidState getFluidState​(BlockState state)
      Overrides:
      getFluidState in class AbstractBlock
      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;