public abstract class AbstractRailBlock extends Block
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey
修飾子とタイプ | フィールドと説明 |
---|---|
protected static VoxelShape |
ASCENDING_AABB |
protected static VoxelShape |
FLAT_AABB |
BLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomly
delegate
修飾子 | コンストラクタと説明 |
---|---|
protected |
AbstractRailBlock(boolean p_i48444_1_,
Block.Properties p_i48444_2_) |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
areCornersDisabled() |
boolean |
canMakeSlopes(BlockState state,
IBlockReader world,
BlockPos pos)
Returns true if the rail can make up and down slopes.
|
PushReaction |
getPushReaction(BlockState state)
非推奨です。
call via
IBlockState#getMobilityFlag() whenever possible. Implementing/overriding is fine. |
RailShape |
getRailDirection(BlockState state,
IBlockReader world,
BlockPos pos,
AbstractMinecartEntity cart)
Return the rail's direction.
|
float |
getRailMaxSpeed(BlockState state,
World world,
BlockPos pos,
AbstractMinecartEntity cart)
Returns the max speed of the rail at the specified position.
|
VoxelShape |
getShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context) |
abstract IProperty<RailShape> |
getShapeProperty() |
BlockState |
getStateForPlacement(BlockItemUseContext context) |
protected BlockState |
getUpdatedState(World worldIn,
BlockPos pos,
BlockState state,
boolean placing) |
boolean |
isFlexibleRail(BlockState state,
IBlockReader world,
BlockPos pos)
Return true if the rail can make corners.
|
static boolean |
isRail(BlockState state) |
static boolean |
isRail(World worldIn,
BlockPos pos) |
boolean |
isValidPosition(BlockState state,
IWorldReader worldIn,
BlockPos pos) |
void |
neighborChanged(BlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos,
boolean isMoving) |
void |
onBlockAdded(BlockState state,
World worldIn,
BlockPos pos,
BlockState oldState,
boolean isMoving) |
void |
onMinecartPass(BlockState state,
World world,
BlockPos pos,
AbstractMinecartEntity cart)
This function is called by any minecart that passes over this rail.
|
void |
onReplaced(BlockState state,
World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving) |
protected void |
updateState(BlockState state,
World worldIn,
BlockPos pos,
Block blockIn) |
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, cannotAttach, canProvidePower, canSpawnInBlock, canSustainPlant, causesSuffocation, doesSideFillSquare, dropXpOnBlockBreak, eventReceived, fillItemGroup, fillStateContainer, fillWithRain, getAmbientOcclusionLightValue, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getContainer, getDefaultState, getDrops, getDrops, getDrops, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getJumpFactor, getLightValue, getLootTable, getMaterial, getMaterialColor, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPlayerRelativeBlockHardness, getPositionRandom, getRaytraceShape, getRenderShape, getRenderType, getSlipperiness, getSlipperiness, getSoundType, getSpeedFactor, getStateById, getStateContainer, getStateId, getStrongPower, getTags, getTranslationKey, getValidBlockForPosition, getWeakPower, harvestBlock, hasComparatorInputOverride, hasEnoughSolidSide, hasSolidSide, hasSolidSideOnTop, hasTileEntity, isAir, isEmissiveRendering, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isReplaceable, isSideInvisible, isSolid, isTransparent, isVariableOpacity, isViewBlocking, makeCuboidShape, mirror, needsPostProcessing, nudgeEntitiesWithNewState, onBlockActivated, onBlockClicked, onBlockHarvested, onBlockPlacedBy, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onProjectileCollision, propagatesSkylightDown, randomTick, replaceBlock, rotate, setDefaultState, shouldSideBeRendered, spawnAdditionalDrops, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, tick, tickRate, ticksRandomly, toString, updateDiagonalNeighbors, updateNeighbors, updatePostPlacement
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, getWeakChanges, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isSlimeBlock, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
protected static final VoxelShape FLAT_AABB
protected static final VoxelShape ASCENDING_AABB
protected AbstractRailBlock(boolean p_i48444_1_, Block.Properties p_i48444_2_)
public static boolean isRail(BlockState state)
public boolean areCornersDisabled()
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos)
isValidPosition
クラス内 Block
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving)
onBlockAdded
クラス内 Block
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving)
neighborChanged
クラス内 Block
protected void updateState(BlockState state, World worldIn, BlockPos pos, Block blockIn)
protected BlockState getUpdatedState(World worldIn, BlockPos pos, BlockState state, boolean placing)
public PushReaction getPushReaction(BlockState state)
IBlockState#getMobilityFlag()
whenever possible. Implementing/overriding is fine.getPushReaction
クラス内 Block
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
onReplaced
クラス内 Block
public BlockState getStateForPlacement(BlockItemUseContext context)
getStateForPlacement
クラス内 Block
public boolean isFlexibleRail(BlockState state, IBlockReader world, BlockPos pos)
world
- The world.pos
- Block's position in worldpublic boolean canMakeSlopes(BlockState state, IBlockReader world, BlockPos pos)
world
- The world.pos
- Block's position in worldpublic RailShape getRailDirection(BlockState state, IBlockReader world, BlockPos pos, @Nullable AbstractMinecartEntity 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(BlockState state, World world, BlockPos pos, AbstractMinecartEntity cart)
world
- The world.cart
- The cart on the rail, may be null.pos
- Block's position in worldpublic void onMinecartPass(BlockState state, World world, BlockPos pos, AbstractMinecartEntity cart)
world
- The world.cart
- The cart on the rail.pos
- Block's position in world