public class BlockState extends StateHolder<Block,BlockState> implements IStateHolder<BlockState>, IForgeBlockState
object
field_215672_b
コンストラクタと説明 |
---|
BlockState(Block blockIn,
com.google.common.collect.ImmutableMap<IProperty<?>,java.lang.Comparable<?>> properties) |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
allowsMovement(IBlockReader worldIn,
BlockPos pos,
PathType type) |
boolean |
blockNeedsPostProcessing(IBlockReader worldIn,
BlockPos pos) |
void |
cacheState() |
boolean |
canEntitySpawn(IBlockReader worldIn,
BlockPos pos,
EntityType<?> type) |
boolean |
canProvidePower() |
boolean |
causesSuffocation(IBlockReader worldIn,
BlockPos pos) |
static <T> BlockState |
deserialize(com.mojang.datafixers.Dynamic<T> dynamic) |
float |
getAmbientOcclusionLightValue(IBlockReader reader,
BlockPos pos) |
Block |
getBlock() |
float |
getBlockHardness(IBlockReader worldIn,
BlockPos pos) |
VoxelShape |
getCollisionShape(IBlockReader worldIn,
BlockPos pos) |
VoxelShape |
getCollisionShape(IBlockReader worldIn,
BlockPos pos,
ISelectionContext context) |
int |
getComparatorInputOverride(World worldIn,
BlockPos pos) |
INamedContainerProvider |
getContainer(World worldIn,
BlockPos pos) |
java.util.List<ItemStack> |
getDrops(LootContext.Builder builder) |
VoxelShape |
getFaceOcclusionShape(IBlockReader worldIn,
BlockPos pos,
Direction directionIn) |
IFluidState |
getFluidState() |
int |
getLightValue() |
Material |
getMaterial() |
MaterialColor |
getMaterialColor(IBlockReader worldIn,
BlockPos pos)
非推奨です。
use {@link BlockState#rotate(IWorld, BlockPos, Rotation)
|
Vec3d |
getOffset(IBlockReader access,
BlockPos pos) |
int |
getOpacity(IBlockReader worldIn,
BlockPos pos) |
float |
getPlayerRelativeBlockHardness(PlayerEntity player,
IBlockReader worldIn,
BlockPos pos) |
long |
getPositionRandom(BlockPos pos) |
PushReaction |
getPushReaction() |
VoxelShape |
getRaytraceShape(IBlockReader worldIn,
BlockPos pos) |
VoxelShape |
getRenderShape(IBlockReader worldIn,
BlockPos pos) |
BlockRenderType |
getRenderType() |
VoxelShape |
getShape(IBlockReader worldIn,
BlockPos pos) |
VoxelShape |
getShape(IBlockReader worldIn,
BlockPos pos,
ISelectionContext context) |
SoundType |
getSoundType() |
int |
getStrongPower(IBlockReader blockAccess,
BlockPos pos,
Direction side) |
int |
getWeakPower(IBlockReader blockAccess,
BlockPos pos,
Direction side) |
boolean |
hasComparatorInputOverride() |
boolean |
isAir()
非推奨です。
use {@link BlockState#isAir(IBlockReader, BlockPos)
|
boolean |
isCollisionShapeLargerThanFullBlock() |
boolean |
isCollisionShapeOpaque(IBlockReader blockReaderIn,
BlockPos blockPosIn) |
boolean |
isEmissiveRendering() |
boolean |
isIn(Tag<Block> tagIn) |
boolean |
isNormalCube(IBlockReader reader,
BlockPos pos) |
boolean |
isOpaqueCube(IBlockReader worldIn,
BlockPos pos) |
boolean |
isReplaceable(BlockItemUseContext useContext) |
boolean |
isReplaceable(Fluid fluidIn) |
boolean |
isSideInvisible(BlockState state,
Direction face) |
boolean |
isSolid() |
boolean |
isSolidSide(IBlockReader blockReaderIn,
BlockPos blockPosIn,
Direction directionIn) |
boolean |
isSuffocating(IBlockReader blockReaderIn,
BlockPos blockPosIn) |
boolean |
isTopSolid(IBlockReader reader,
BlockPos pos,
Entity entityIn)
True if the collision box of this state covers the entire upper face of the blockspace
|
boolean |
isTransparent() |
boolean |
isValidPosition(IWorldReader worldIn,
BlockPos pos) |
BlockState |
mirror(Mirror mirrorIn)
Returns the blockstate mirrored in the given way.
|
void |
neighborChanged(World worldIn,
BlockPos posIn,
Block blockIn,
BlockPos fromPosIn,
boolean isMoving) |
ActionResultType |
onBlockActivated(World worldIn,
PlayerEntity player,
Hand handIn,
BlockRayTraceResult resultIn) |
void |
onBlockAdded(World worldIn,
BlockPos pos,
BlockState oldState,
boolean isMoving) |
void |
onBlockClicked(World worldIn,
BlockPos pos,
PlayerEntity player) |
boolean |
onBlockEventReceived(World worldIn,
BlockPos pos,
int id,
int param)
Called on both Client and Server when World#addBlockEvent is called.
|
void |
onEntityCollision(World worldIn,
BlockPos pos,
Entity entityIn) |
void |
onProjectileCollision(World worldIn,
BlockState state,
BlockRayTraceResult hit,
Entity projectile) |
void |
onReplaced(World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving) |
boolean |
propagatesSkylightDown(IBlockReader worldIn,
BlockPos pos) |
void |
randomTick(ServerWorld worldIn,
BlockPos posIn,
java.util.Random randomIn) |
BlockState |
rotate(Rotation rot)
Returns the blockstate with the given rotation.
|
static <T> com.mojang.datafixers.Dynamic<T> |
serialize(com.mojang.datafixers.types.DynamicOps<T> opsIn,
BlockState state) |
void |
spawnAdditionalDrops(World worldIn,
BlockPos pos,
ItemStack stack) |
void |
tick(ServerWorld worldIn,
BlockPos posIn,
java.util.Random randomIn) |
boolean |
ticksRandomly() |
void |
updateDiagonalNeighbors(IWorld worldIn,
BlockPos pos,
int flags)
Performs validations on the block state and possibly neighboring blocks to validate whether the incoming state is
valid to stay in the world.
|
void |
updateNeighbors(IWorld worldIn,
BlockPos pos,
int flags)
For all neighbors, have them react to this block's existence, potentially updating their states as needed.
|
BlockState |
updatePostPlacement(Direction face,
BlockState queried,
IWorld worldIn,
BlockPos currentPos,
BlockPos offsetPos) |
buildPropertyValueTable, cycle, cyclePropertyValue, get, getProperties, getValues, has, toString, with
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, getName, getValues, with, withString
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockState, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getHarvestLevel, getHarvestTool, getLightValue, getPickBlock, getSlipperiness, 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
public void cacheState()
public Block getBlock()
public Material getMaterial()
public boolean canEntitySpawn(IBlockReader worldIn, BlockPos pos, EntityType<?> type)
public boolean propagatesSkylightDown(IBlockReader worldIn, BlockPos pos)
public int getOpacity(IBlockReader worldIn, BlockPos pos)
public VoxelShape getFaceOcclusionShape(IBlockReader worldIn, BlockPos pos, Direction directionIn)
public boolean isCollisionShapeLargerThanFullBlock()
public boolean isTransparent()
public int getLightValue()
@Deprecated public boolean isAir()
@Deprecated public MaterialColor getMaterialColor(IBlockReader worldIn, BlockPos pos)
public BlockState rotate(Rotation rot)
public BlockState mirror(Mirror mirrorIn)
public BlockRenderType getRenderType()
public boolean isEmissiveRendering()
public float getAmbientOcclusionLightValue(IBlockReader reader, BlockPos pos)
public boolean isNormalCube(IBlockReader reader, BlockPos pos)
public boolean canProvidePower()
public int getWeakPower(IBlockReader blockAccess, BlockPos pos, Direction side)
public boolean hasComparatorInputOverride()
public float getBlockHardness(IBlockReader worldIn, BlockPos pos)
public float getPlayerRelativeBlockHardness(PlayerEntity player, IBlockReader worldIn, BlockPos pos)
public int getStrongPower(IBlockReader blockAccess, BlockPos pos, Direction side)
public PushReaction getPushReaction()
public boolean isOpaqueCube(IBlockReader worldIn, BlockPos pos)
public boolean isSolid()
public boolean isSideInvisible(BlockState state, Direction face)
public VoxelShape getShape(IBlockReader worldIn, BlockPos pos)
public VoxelShape getShape(IBlockReader worldIn, BlockPos pos, ISelectionContext context)
public VoxelShape getCollisionShape(IBlockReader worldIn, BlockPos pos)
public VoxelShape getCollisionShape(IBlockReader worldIn, BlockPos pos, ISelectionContext context)
public VoxelShape getRenderShape(IBlockReader worldIn, BlockPos pos)
public VoxelShape getRaytraceShape(IBlockReader worldIn, BlockPos pos)
public final boolean isTopSolid(IBlockReader reader, BlockPos pos, Entity entityIn)
public Vec3d getOffset(IBlockReader access, BlockPos pos)
public boolean onBlockEventReceived(World worldIn, BlockPos pos, int id, int param)
public void neighborChanged(World worldIn, BlockPos posIn, Block blockIn, BlockPos fromPosIn, boolean isMoving)
public void updateNeighbors(IWorld worldIn, BlockPos pos, int flags)
public void updateDiagonalNeighbors(IWorld worldIn, BlockPos pos, int flags)
public void onBlockAdded(World worldIn, BlockPos pos, BlockState oldState, boolean isMoving)
public void onReplaced(World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
public void tick(ServerWorld worldIn, BlockPos posIn, java.util.Random randomIn)
public void randomTick(ServerWorld worldIn, BlockPos posIn, java.util.Random randomIn)
public java.util.List<ItemStack> getDrops(LootContext.Builder builder)
public ActionResultType onBlockActivated(World worldIn, PlayerEntity player, Hand handIn, BlockRayTraceResult resultIn)
public void onBlockClicked(World worldIn, BlockPos pos, PlayerEntity player)
public boolean isSuffocating(IBlockReader blockReaderIn, BlockPos blockPosIn)
public boolean causesSuffocation(IBlockReader worldIn, BlockPos pos)
public BlockState updatePostPlacement(Direction face, BlockState queried, IWorld worldIn, BlockPos currentPos, BlockPos offsetPos)
public boolean allowsMovement(IBlockReader worldIn, BlockPos pos, PathType type)
public boolean isReplaceable(BlockItemUseContext useContext)
public boolean isReplaceable(Fluid fluidIn)
public boolean isValidPosition(IWorldReader worldIn, BlockPos pos)
public boolean blockNeedsPostProcessing(IBlockReader worldIn, BlockPos pos)
@Nullable public INamedContainerProvider getContainer(World worldIn, BlockPos pos)
public IFluidState getFluidState()
public boolean ticksRandomly()
public long getPositionRandom(BlockPos pos)
public SoundType getSoundType()
public void onProjectileCollision(World worldIn, BlockState state, BlockRayTraceResult hit, Entity projectile)
public boolean isSolidSide(IBlockReader blockReaderIn, BlockPos blockPosIn, Direction directionIn)
public boolean isCollisionShapeOpaque(IBlockReader blockReaderIn, BlockPos blockPosIn)
public static <T> com.mojang.datafixers.Dynamic<T> serialize(com.mojang.datafixers.types.DynamicOps<T> opsIn, BlockState state)
public static <T> BlockState deserialize(com.mojang.datafixers.Dynamic<T> dynamic)