Package net.minecraft.block
Class AbstractRailBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.AbstractRailBlock
- Direct Known Subclasses:
DetectorRailBlock,PoweredRailBlock,RailBlock
public abstract class AbstractRailBlock extends Block
- Mappings:
Namespace Name official afeintermediary net/minecraft/class_154named net/minecraft/block/AbstractRailBlock
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractRailBlock.RailPlacementHelperstatic classAbstractRailBlock.RailShapeTypeNested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description protected booleanallowCurvesFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRailBlock(boolean allowCurves) -
Method Summary
Modifier and Type Method Description booleancanBePlacedAtPos(World world, BlockPos pos)Returns whether the current block can be placed at a certainBlockPosBoxgetCollisionBox(World world, BlockPos pos, BlockState state)Returns a box by adding the block's current location and the block's corresponding value in its Bounding BoxintgetPistonInteractionType()Returns the block's piston interaction type, as provided by it's material.RenderLayergetRenderLayerType()Returns the appropriate RenderLayer for a block.abstract Property<AbstractRailBlock.RailShapeType>getShapeProperty()booleanhasTransperancy()static booleanisRail(BlockState state)static booleanisRail(World world, BlockPos pos)HitResultmethod_655(World world, BlockPos pos, Vec3d vec1, Vec3d vec2)voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.voidonBreaking(World world, BlockPos pos, BlockState state)Runs when the block is removed (by an entity or explosion).voidonCreation(World world, BlockPos pos, BlockState state)Runs when the block is placed (by a player or enderman).booleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockvoidsetBoundingBox(WorldView view, BlockPos pos)protected BlockStateupdateBlockState(World world, BlockPos pos, BlockState state, boolean forceUpdate)protected voidupdateBlockState(World world, BlockPos pos, BlockState state, Block block)Methods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendItemStacks, appendProperties, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBlockType, getBonusDrops, getBrightness, getByBlockState, getById, getColor, getColor, getComparatorOutput, getData, getDefaultState, getDropCount, getDropItem, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPickItem, getSelectionBox, getStateFromData, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslatedName, getTranslationKey, getWeakRedstonePower, harvest, hasBlockEntity, hasCollision, hasCollision, hasComparatorOutput, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isSideInvisible, isTransluscent, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onEvent, onLandedUpon, onPlaced, onSteppedOn, onUpdateTick, onUse, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, stateFromData, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
allowCurves
protected final boolean allowCurves- Mappings:
Namespace Name Mixin selector official aLafe;a:Zintermediary field_543Lnet/minecraft/class_154;field_543:Znamed allowCurvesLnet/minecraft/block/AbstractRailBlock;allowCurves:Z
-
-
Constructor Details
-
AbstractRailBlock
protected AbstractRailBlock(boolean allowCurves)- Mappings:
Namespace Name Mixin selector official <init>Lafe;<init>(Z)Vintermediary <init>Lnet/minecraft/class_154;<init>(Z)Vnamed <init>Lnet/minecraft/block/AbstractRailBlock;<init>(Z)V
-
-
Method Details
-
isRail
- Mappings:
Namespace Name Mixin selector official eLafe;e(Ladm;Lcj;)Zintermediary method_593Lnet/minecraft/class_154;method_593(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed isRailLnet/minecraft/block/AbstractRailBlock;isRail(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
isRail
- Mappings:
Namespace Name Mixin selector official dLafe;d(Lalz;)Zintermediary method_592Lnet/minecraft/class_154;method_592(Lnet/minecraft/class_376;)Znamed isRailLnet/minecraft/block/AbstractRailBlock;isRail(Lnet/minecraft/block/BlockState;)Z
-
getCollisionBox
Returns a box by adding the block's current location and the block's corresponding value in its Bounding Box- Overrides:
getCollisionBoxin classBlock- Parameters:
world- The world that the block has been placedpos- The block's positionstate- The block's BlockState- Returns:
- The Collision box
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;)Laug;intermediary method_645Lnet/minecraft/class_160;method_645(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Lnet/minecraft/class_646;named getCollisionBoxLnet/minecraft/block/Block;getCollisionBox(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_699Lnet/minecraft/class_160;method_699()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
method_655
- Overrides:
method_655in classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Laui;Laui;)Lauh;intermediary method_655Lnet/minecraft/class_160;method_655(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_649;Lnet/minecraft/class_649;)Lnet/minecraft/class_647;named method_655Lnet/minecraft/block/Block;method_655(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/hit/HitResult;
-
setBoundingBox
- Overrides:
setBoundingBoxin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;)Vintermediary method_665Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)V
-
renderAsNormalBlock
public boolean renderAsNormalBlock()Returns whether the block can be rendered as a normal block- Overrides:
renderAsNormalBlockin classBlock- Returns:
- Whether the block can be rendered as a normal block
- Mappings:
Namespace Name Mixin selector official dLafh;d()Zintermediary method_709Lnet/minecraft/class_160;method_709()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
canBePlacedAtPos
Returns whether the current block can be placed at a certainBlockPos- Overrides:
canBePlacedAtPosin classBlock- Returns:
- Whether the current block can be placed at a BlockPos
- Mappings:
Namespace Name Mixin selector official dLafh;d(Ladm;Lcj;)Zintermediary method_711Lnet/minecraft/class_160;method_711(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Znamed canBePlacedAtPosLnet/minecraft/block/Block;canBePlacedAtPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
onCreation
Runs when the block is placed (by a player or enderman).- Overrides:
onCreationin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official cLafh;c(Ladm;Lcj;Lalz;)Vintermediary method_703Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
neighborUpdate
Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.- Overrides:
neighborUpdatein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateblock- The adjacent Block that updated the current block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lafh;)Vintermediary method_648Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)Vnamed neighborUpdateLnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
updateBlockState
- Mappings:
Namespace Name Mixin selector official bLafe;b(Ladm;Lcj;Lalz;Lafh;)Vintermediary method_591Lnet/minecraft/class_154;method_591(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)Vnamed updateBlockStateLnet/minecraft/block/AbstractRailBlock;updateBlockState(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
updateBlockState
protected BlockState updateBlockState(World world, BlockPos pos, BlockState state, boolean forceUpdate)- Mappings:
Namespace Name Mixin selector official aLafe;a(Ladm;Lcj;Lalz;Z)Lalz;intermediary method_590Lnet/minecraft/class_154;method_590(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Z)Lnet/minecraft/class_376;named updateBlockStateLnet/minecraft/block/AbstractRailBlock;updateBlockState(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Lnet/minecraft/block/BlockState;
-
getPistonInteractionType
public int getPistonInteractionType()Returns the block's piston interaction type, as provided by it's material.- Overrides:
getPistonInteractionTypein classBlock- Returns:
- Current block's piston interaction type
- Mappings:
Namespace Name Mixin selector official kLafh;k()Iintermediary method_728Lnet/minecraft/class_160;method_728()Inamed getPistonInteractionTypeLnet/minecraft/block/Block;getPistonInteractionType()I
-
getRenderLayerType
Returns the appropriate RenderLayer for a block. Only called on the client.- Overrides:
getRenderLayerTypein classBlock- Returns:
- The block's RenderLayer
- Mappings:
Namespace Name Mixin selector official mLafh;m()Ladf;intermediary method_731Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
-
onBreaking
Runs when the block is removed (by an entity or explosion).- Overrides:
onBreakingin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official bLafh;b(Ladm;Lcj;Lalz;)Vintermediary method_688Lnet/minecraft/class_160;method_688(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onBreakingLnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
getShapeProperty
- Mappings:
Namespace Name Mixin selector official nLafe;n()Lamo;intermediary method_594Lnet/minecraft/class_154;method_594()Lnet/minecraft/class_392;named getShapePropertyLnet/minecraft/block/AbstractRailBlock;getShapeProperty()Lnet/minecraft/state/property/Property;
-