public abstract class BlockRailBase extends Block
Block.EnumOffsetType, Block.Properties, Block.RenderSideCacheKey
Modifier and Type | Field and Description |
---|---|
protected static VoxelShape |
ASCENDING_AABB |
protected static VoxelShape |
FLAT_AABB |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockResistance, blocksMovement, capturedDrops, captureDrops, harvesters, lightValue, LOGGER, material, needsRandomTick, RANDOM, soundType, stateContainer
delegate
Modifier | Constructor and Description |
---|---|
protected |
BlockRailBase(boolean p_i48444_1_,
Block.Properties p_i48444_2_) |
Modifier and Type | Method and Description |
---|---|
boolean |
areCornersDisabled() |
boolean |
canMakeSlopes(IBlockState state,
IBlockReader world,
BlockPos pos)
Returns true if the rail can make up and down slopes.
|
protected IBlockState |
func_208489_a(World p_208489_1_,
BlockPos p_208489_2_,
IBlockState p_208489_3_,
boolean p_208489_4_) |
BlockFaceShape |
getBlockFaceShape(IBlockReader worldIn,
IBlockState state,
BlockPos pos,
EnumFacing face) |
EnumPushReaction |
getPushReaction(IBlockState state) |
RailShape |
getRailDirection(IBlockState state,
IBlockReader world,
BlockPos pos,
EntityMinecart cart)
Return the rail's direction.
|
float |
getRailMaxSpeed(IBlockState state,
World world,
BlockPos pos,
EntityMinecart cart)
Returns the max speed of the rail at the specified position.
|
BlockRenderLayer |
getRenderLayer() |
VoxelShape |
getShape(IBlockState state,
IBlockReader worldIn,
BlockPos pos) |
abstract IProperty<RailShape> |
getShapeProperty() |
boolean |
isFlexibleRail(IBlockState state,
IBlockReader world,
BlockPos pos)
Return true if the rail can make corners.
|
boolean |
isFullCube(IBlockState state) |
static boolean |
isRail(IBlockState p_208487_0_) |
static boolean |
isRail(World p_208488_0_,
BlockPos p_208488_1_) |
boolean |
isValidPosition(IBlockState state,
IWorldReaderBase worldIn,
BlockPos pos) |
void |
neighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos) |
void |
onBlockAdded(IBlockState state,
World worldIn,
BlockPos pos,
IBlockState oldState) |
void |
onMinecartPass(IBlockState state,
World world,
BlockPos pos,
EntityMinecart cart)
This function is called by any minecart that passes over this rail.
|
void |
onReplaced(IBlockState state,
World worldIn,
BlockPos pos,
IBlockState newState,
boolean isMoving) |
protected void |
updateState(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn) |
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, canProvidePower, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, doesSideFillSquare, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillItemGroup, fillStateContainer, fillWithRain, getAmbientOcclusionLightValue, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getDefaultState, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getItemDropped, getItemsToDropCount, getLightValue, getMapColor, getMaterial, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPackedLightmapCoords, getPlayerRelativeBlockHardness, getPositionRandom, getRaytraceShape, getRenderShape, getRenderType, getSilkTouchDrop, getSlipperiness, getSlipperiness, getSoundType, getStateById, getStateContainer, getStateForPlacement, getStateId, getStrongPower, getTickRandomly, getTranslationKey, getValidBlockForPosition, getWeakPower, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, isAir, isBlockNormalCube, isCollidable, isCollidable, isDirt, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isRock, isSideInvisible, isSolid, isTopSolid, isVariableOpacity, makeCuboidShape, mirror, needsPostProcessing, nudgeEntitiesWithNewState, onBlockActivated, onBlockClicked, onBlockHarvested, onBlockPlacedBy, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, propagatesSkylightDown, quantityDropped, randomTick, registerBlocks, replaceBlock, rotate, setDefaultState, shouldSideBeRendered, spawnAsEntity, tick, tickRate, toString, updateDiagonalNeighbors, updateNeighbors, updatePostPlacement, useNeighborBrightness
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canConnectRedstone, canCreatureSpawn, canEntityDestroy, canHarvestBlock, canPlaceTorchOnTop, canRenderInLayer, createTileEntity, doesSideBlockChestOpening, doesSideBlockRendering, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getDrops, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, getWeakChanges, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isNormalCube, isReplaceableOreGen, isStickyBlock, isToolEffective, isTopSolid, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower
protected static final VoxelShape FLAT_AABB
protected static final VoxelShape ASCENDING_AABB
protected BlockRailBase(boolean p_i48444_1_, Block.Properties p_i48444_2_)
public static boolean isRail(IBlockState p_208487_0_)
public boolean areCornersDisabled()
public VoxelShape getShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
public BlockFaceShape getBlockFaceShape(IBlockReader worldIn, IBlockState state, BlockPos pos, EnumFacing face)
getBlockFaceShape
in class Block
public boolean isFullCube(IBlockState state)
isFullCube
in class Block
public boolean isValidPosition(IBlockState state, IWorldReaderBase worldIn, BlockPos pos)
isValidPosition
in class Block
public void onBlockAdded(IBlockState state, World worldIn, BlockPos pos, IBlockState oldState)
onBlockAdded
in class Block
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
neighborChanged
in class Block
protected void updateState(IBlockState state, World worldIn, BlockPos pos, Block blockIn)
protected IBlockState func_208489_a(World p_208489_1_, BlockPos p_208489_2_, IBlockState p_208489_3_, boolean p_208489_4_)
public EnumPushReaction getPushReaction(IBlockState state)
getPushReaction
in class Block
public BlockRenderLayer getRenderLayer()
getRenderLayer
in class Block
public void onReplaced(IBlockState state, World worldIn, BlockPos pos, IBlockState newState, boolean isMoving)
onReplaced
in class Block
public boolean isFlexibleRail(IBlockState state, IBlockReader world, BlockPos pos)
world
- The world.pos
- Block's position in worldpublic boolean canMakeSlopes(IBlockState state, IBlockReader world, BlockPos pos)
world
- The world.pos
- Block's position in worldpublic RailShape getRailDirection(IBlockState state, IBlockReader world, BlockPos pos, @Nullable EntityMinecart cart)
world
- The world.pos
- Block's position in worldstate
- The BlockStatecart
- The cart asking for the metadata, null if it is not called by EntityMinecart.public float getRailMaxSpeed(IBlockState state, World world, BlockPos pos, EntityMinecart cart)
world
- The world.cart
- The cart on the rail, may be null.pos
- Block's position in worldpublic void onMinecartPass(IBlockState state, World world, BlockPos pos, EntityMinecart cart)
world
- The world.cart
- The cart on the rail.pos
- Block's position in world