public class Block extends ForgeRegistryEntry<Block> implements IItemProvider, IForgeBlock
修飾子とタイプ | クラスと説明 |
---|---|
static class |
Block.OffsetType |
static class |
Block.Properties |
static class |
Block.RenderSideCacheKey |
修飾子とタイプ | フィールドと説明 |
---|---|
static ObjectIntIdentityMap<BlockState> |
BLOCK_STATE_IDS
非推奨です。
|
protected float |
blockHardness
Indicates how many hits it takes to break a block.
|
protected float |
blockResistance
Indicates how much this block can resist explosions
|
protected boolean |
blocksMovement |
protected int |
lightValue
Amount of light emitted
|
protected static org.apache.logging.log4j.Logger |
LOGGER |
protected Material |
material |
protected MaterialColor |
materialColor |
protected java.util.Random |
RANDOM |
protected SoundType |
soundType |
protected StateContainer<Block,BlockState> |
stateContainer |
protected boolean |
ticksRandomly
Flags whether or not this block is of a type that needs random ticking.
|
delegate
コンストラクタと説明 |
---|
Block(Block.Properties properties) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addInformation(ItemStack stack,
IBlockReader worldIn,
java.util.List<ITextComponent> tooltip,
ITooltipFlag flagIn) |
boolean |
allowsMovement(BlockState state,
IBlockReader worldIn,
BlockPos pos,
PathType type)
非推奨です。
|
void |
animateTick(BlockState stateIn,
World worldIn,
BlockPos pos,
java.util.Random rand)
Called periodically clientside on blocks near the player to show effects (like furnace fire particles).
|
Item |
asItem() |
boolean |
canDropFromExplosion(Explosion explosionIn)
非推奨です。
|
boolean |
canEntitySpawn(BlockState state,
IBlockReader worldIn,
BlockPos pos,
EntityType<?> type)
非推奨です。
|
static boolean |
cannotAttach(Block blockIn)
Checks if the provided block is in the hardcoded list of blocks that will not attach to fences/panes/walls
|
boolean |
canProvidePower(BlockState state)
非推奨です。
call via
IBlockState#canProvidePower() whenever possible. Implementing/overriding is fine. |
boolean |
canSpawnInBlock()
Return true if an entity can be spawned inside the block (used to get the player's bed spawn location)
|
boolean |
canSustainPlant(BlockState state,
IBlockReader world,
BlockPos pos,
Direction facing,
IPlantable plantable)
Determines if this block can support the passed in plant, allowing it to be planted and grow.
|
boolean |
causesSuffocation(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
static boolean |
doesSideFillSquare(VoxelShape shape,
Direction side) |
void |
dropXpOnBlockBreak(World worldIn,
BlockPos pos,
int amount)
Spawns the given amount of experience into the World as XP orb entities
|
boolean |
eventReceived(BlockState state,
World worldIn,
BlockPos pos,
int id,
int param)
非推奨です。
call via
IBlockState#onBlockEventReceived(World,BlockPos,int,int) whenever possible.
Implementing/overriding is fine. |
void |
fillItemGroup(ItemGroup group,
NonNullList<ItemStack> items)
returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
|
protected void |
fillStateContainer(StateContainer.Builder<Block,BlockState> builder) |
void |
fillWithRain(World worldIn,
BlockPos pos)
Called similar to random ticks, but only when it is raining.
|
float |
getAmbientOcclusionLightValue(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
static Block |
getBlockFromItem(Item itemIn) |
float |
getBlockHardness(BlockState blockState,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
call via
IBlockState#getBlockHardness(World,BlockPos) whenever possible.
Implementing/overriding is fine. |
VoxelShape |
getCollisionShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context)
非推奨です。
|
int |
getComparatorInputOverride(BlockState blockState,
World worldIn,
BlockPos pos)
非推奨です。
call via
IBlockState#getComparatorInputOverride(World,BlockPos) whenever possible.
Implementing/overriding is fine. |
INamedContainerProvider |
getContainer(BlockState state,
World worldIn,
BlockPos pos)
非推奨です。
|
BlockState |
getDefaultState()
Gets the default state for this block
|
java.util.List<ItemStack> |
getDrops(BlockState state,
LootContext.Builder builder)
非推奨です。
|
static java.util.List<ItemStack> |
getDrops(BlockState state,
ServerWorld worldIn,
BlockPos pos,
TileEntity tileEntityIn) |
static java.util.List<ItemStack> |
getDrops(BlockState state,
ServerWorld worldIn,
BlockPos pos,
TileEntity tileEntityIn,
Entity entityIn,
ItemStack stack) |
float |
getExplosionResistance()
非推奨です。
|
IFluidState |
getFluidState(BlockState state)
非推奨です。
|
int |
getHarvestLevel(BlockState state)
Queries the harvest level of this item stack for the specified tool class,
Returns -1 if this tool is not of the specified type
|
ToolType |
getHarvestTool(BlockState state)
Queries the class of tool required to harvest this block, if null is returned
we assume that anything can harvest this block.
|
ItemStack |
getItem(IBlockReader worldIn,
BlockPos pos,
BlockState state)
非推奨です。
|
float |
getJumpFactor() |
int |
getLightValue(BlockState state)
非推奨です。
prefer calling
IBlockState#getLightValue() |
ResourceLocation |
getLootTable() |
Material |
getMaterial(BlockState state)
非推奨です。
call via
IBlockState#getMaterial() whenever possible. Implementing/overriding is fine. |
MaterialColor |
getMaterialColor(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
call via
IBlockState#getMapColor(IBlockAccess,BlockPos) whenever possible.
Implementing/overriding is fine. |
ITextComponent |
getNameTextComponent() |
Vec3d |
getOffset(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
call via
IBlockState#getOffset(IBlockAccess,BlockPos) whenever possible.
Implementing/overriding is fine. |
Block.OffsetType |
getOffsetType()
Get the OffsetType for this Block.
|
int |
getOpacity(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
float |
getPlayerRelativeBlockHardness(BlockState state,
PlayerEntity player,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
call via
IBlockState#getPlayerRelativeBlockHardness(EntityPlayer,World,BlockPos) whenever
possible. Implementing/overriding is fine. |
long |
getPositionRandom(BlockState state,
BlockPos pos)
非推奨です。
|
PushReaction |
getPushReaction(BlockState state)
非推奨です。
call via
IBlockState#getMobilityFlag() whenever possible. Implementing/overriding is fine. |
VoxelShape |
getRaytraceShape(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
VoxelShape |
getRenderShape(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
BlockRenderType |
getRenderType(BlockState state)
非推奨です。
call via
IBlockState#getRenderType() whenever possible. Implementing/overriding is fine. |
VoxelShape |
getShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context)
非推奨です。
|
float |
getSlipperiness()
非推奨です。
|
float |
getSlipperiness(BlockState state,
IWorldReader world,
BlockPos pos,
Entity entity)
Gets the slipperiness at the given location at the given state.
|
SoundType |
getSoundType(BlockState state)
非推奨です。
|
float |
getSpeedFactor() |
static BlockState |
getStateById(int id) |
StateContainer<Block,BlockState> |
getStateContainer() |
BlockState |
getStateForPlacement(BlockItemUseContext context) |
static int |
getStateId(BlockState state) |
int |
getStrongPower(BlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
Direction side)
非推奨です。
call via
IBlockState#getStrongPower(IBlockAccess,BlockPos,EnumFacing) whenever possible.
Implementing/overriding is fine. |
java.util.Set<ResourceLocation> |
getTags()
Retrieves a list of tags names this is known to be associated with.
|
java.lang.String |
getTranslationKey()
Returns the unlocalized name of the block with "tile." appended to the front.
|
static BlockState |
getValidBlockForPosition(BlockState currentState,
IWorld worldIn,
BlockPos pos)
With the provided block state, performs neighbor checks for all neighboring blocks to get an "adjusted" blockstate
for placement in the world, if the current state is not valid.
|
int |
getWeakPower(BlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
Direction side)
非推奨です。
call via
IBlockState#getWeakPower(IBlockAccess,BlockPos,EnumFacing) whenever possible.
Implementing/overriding is fine. |
void |
harvestBlock(World worldIn,
PlayerEntity player,
BlockPos pos,
BlockState state,
TileEntity te,
ItemStack stack)
Spawns the block's drops in the world.
|
boolean |
hasComparatorInputOverride(BlockState state)
非推奨です。
call via
IBlockState#hasComparatorInputOverride() whenever possible. Implementing/overriding
is fine. |
static boolean |
hasEnoughSolidSide(IWorldReader worldIn,
BlockPos pos,
Direction directionIn)
Returns true if the block can stay on position if attached to given side
|
static boolean |
hasSolidSide(BlockState state,
IBlockReader worldIn,
BlockPos pos,
Direction side) |
static boolean |
hasSolidSideOnTop(IBlockReader worldIn,
BlockPos pos)
Returns true if the block in given position has a solid top face
|
boolean |
hasTileEntity()
非推奨です。
|
boolean |
isAir(BlockState state)
非推奨です。
|
boolean |
isEmissiveRendering(BlockState p_225543_1_)
非推奨です。
|
boolean |
isIn(Tag<Block> tagIn) |
boolean |
isNormalCube(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
static boolean |
isOpaque(VoxelShape shape)
Gets whether the provided
VoxelShape is opaque |
boolean |
isOpaqueCube(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
boolean |
isReplaceable(BlockState state,
BlockItemUseContext useContext)
非推奨です。
|
boolean |
isReplaceable(BlockState p_225541_1_,
Fluid p_225541_2_)
非推奨です。
|
boolean |
isSideInvisible(BlockState state,
BlockState adjacentBlockState,
Direction side)
非推奨です。
|
boolean |
isSolid(BlockState state)
非推奨です。
|
boolean |
isTransparent(BlockState state)
非推奨です。
|
boolean |
isValidPosition(BlockState state,
IWorldReader worldIn,
BlockPos pos)
非推奨です。
|
boolean |
isVariableOpacity() |
boolean |
isViewBlocking(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
static VoxelShape |
makeCuboidShape(double x1,
double y1,
double z1,
double x2,
double y2,
double z2) |
BlockState |
mirror(BlockState state,
Mirror mirrorIn)
非推奨です。
call via
IBlockState#withMirror(Mirror) whenever possible. Implementing/overriding is fine. |
boolean |
needsPostProcessing(BlockState state,
IBlockReader worldIn,
BlockPos pos)
非推奨です。
|
void |
neighborChanged(BlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos,
boolean isMoving)
非推奨です。
|
static BlockState |
nudgeEntitiesWithNewState(BlockState oldState,
BlockState newState,
World worldIn,
BlockPos pos) |
ActionResultType |
onBlockActivated(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player,
Hand handIn,
BlockRayTraceResult hit)
非推奨です。
|
void |
onBlockAdded(BlockState state,
World worldIn,
BlockPos pos,
BlockState oldState,
boolean isMoving)
非推奨です。
|
void |
onBlockClicked(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player)
非推奨です。
|
void |
onBlockHarvested(World worldIn,
BlockPos pos,
BlockState state,
PlayerEntity player)
Called before the Block is set to air in the world.
|
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
BlockState state,
LivingEntity placer,
ItemStack stack)
Called by ItemBlocks after a block is set in the world, to allow post-place logic
|
void |
onEntityCollision(BlockState state,
World worldIn,
BlockPos pos,
Entity entityIn)
非推奨です。
|
void |
onEntityWalk(World worldIn,
BlockPos pos,
Entity entityIn)
Called when the given entity walks on this Block
|
void |
onExplosionDestroy(World worldIn,
BlockPos pos,
Explosion explosionIn)
Called when this Block is destroyed by an Explosion
|
void |
onFallenUpon(World worldIn,
BlockPos pos,
Entity entityIn,
float fallDistance)
Block's chance to react to a living entity falling on it.
|
void |
onLanded(IBlockReader worldIn,
Entity entityIn)
Called when an Entity lands on this Block.
|
void |
onPlayerDestroy(IWorld worldIn,
BlockPos pos,
BlockState state)
Called after a player destroys this Block - the posiiton pos may no longer hold the state indicated.
|
void |
onProjectileCollision(World worldIn,
BlockState state,
BlockRayTraceResult hit,
Entity projectile) |
void |
onReplaced(BlockState state,
World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving)
非推奨です。
|
boolean |
propagatesSkylightDown(BlockState state,
IBlockReader reader,
BlockPos pos) |
void |
randomTick(BlockState state,
ServerWorld worldIn,
BlockPos pos,
java.util.Random random)
非推奨です。
|
static void |
replaceBlock(BlockState oldState,
BlockState newState,
IWorld worldIn,
BlockPos pos,
int flags)
Replaces oldState with newState, possibly playing effects and creating drops.
|
BlockState |
rotate(BlockState state,
Rotation rot)
非推奨です。
call via
IBlockState#withRotation(Rotation) whenever possible. Implementing/overriding is
fine. |
protected void |
setDefaultState(BlockState state) |
static boolean |
shouldSideBeRendered(BlockState adjacentState,
IBlockReader blockState,
BlockPos blockAccess,
Direction pos)
""
|
void |
spawnAdditionalDrops(BlockState state,
World worldIn,
BlockPos pos,
ItemStack stack)
非推奨です。
|
static void |
spawnAsEntity(World worldIn,
BlockPos pos,
ItemStack stack)
Spawns the given stack into the World at the given position, respecting the doTileDrops gamerule
|
static void |
spawnDrops(BlockState state,
World worldIn,
BlockPos pos) |
static void |
spawnDrops(BlockState state,
World worldIn,
BlockPos pos,
TileEntity tileEntityIn) |
static void |
spawnDrops(BlockState state,
World worldIn,
BlockPos pos,
TileEntity tileEntityIn,
Entity entityIn,
ItemStack stack) |
void |
tick(BlockState state,
ServerWorld worldIn,
BlockPos pos,
java.util.Random rand)
非推奨です。
|
int |
tickRate(IWorldReader worldIn)
How many world ticks before ticking
|
boolean |
ticksRandomly(BlockState state)
Returns whether or not this block is of a type that needs random ticking.
|
java.lang.String |
toString() |
void |
updateDiagonalNeighbors(BlockState state,
IWorld worldIn,
BlockPos pos,
int flags)
非推奨です。
|
void |
updateNeighbors(BlockState stateIn,
IWorld worldIn,
BlockPos pos,
int flags)
非推奨です。
|
BlockState |
updatePostPlacement(BlockState stateIn,
Direction facing,
BlockState facingState,
IWorld worldIn,
BlockPos currentPos,
BlockPos facingPos)
非推奨です。
|
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 org.apache.logging.log4j.Logger LOGGER
@Deprecated public static final ObjectIntIdentityMap<BlockState> BLOCK_STATE_IDS
protected final int lightValue
protected final float blockHardness
protected final float blockResistance
protected final boolean ticksRandomly
protected final SoundType soundType
protected final Material material
protected final MaterialColor materialColor
protected final StateContainer<Block,BlockState> stateContainer
protected final boolean blocksMovement
protected java.util.Random RANDOM
public Block(Block.Properties properties)
public static int getStateId(@Nullable BlockState state)
public static BlockState getStateById(int id)
public static BlockState nudgeEntitiesWithNewState(BlockState oldState, BlockState newState, World worldIn, BlockPos pos)
public static VoxelShape makeCuboidShape(double x1, double y1, double z1, double x2, double y2, double z2)
@Deprecated public boolean canEntitySpawn(BlockState state, IBlockReader worldIn, BlockPos pos, EntityType<?> type)
@Deprecated public boolean isAir(BlockState state)
@Deprecated public int getLightValue(BlockState state)
IBlockState#getLightValue()
@Deprecated public Material getMaterial(BlockState state)
IBlockState#getMaterial()
whenever possible. Implementing/overriding is fine.@Deprecated public MaterialColor getMaterialColor(BlockState state, IBlockReader worldIn, BlockPos pos)
IBlockState#getMapColor(IBlockAccess,BlockPos)
whenever possible.
Implementing/overriding is fine.@Deprecated public void updateNeighbors(BlockState stateIn, IWorld worldIn, BlockPos pos, int flags)
public static BlockState getValidBlockForPosition(BlockState currentState, IWorld worldIn, BlockPos pos)
public static void replaceBlock(BlockState oldState, BlockState newState, IWorld worldIn, BlockPos pos, int flags)
World.setBlockState(net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, int)
@Deprecated public void updateDiagonalNeighbors(BlockState state, IWorld worldIn, BlockPos pos, int flags)
IWorldWriter#setBlockState(IBlockState, BlockPos, int)
.@Deprecated public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos)
@Deprecated public BlockState rotate(BlockState state, Rotation rot)
IBlockState#withRotation(Rotation)
whenever possible. Implementing/overriding is
fine.@Deprecated public BlockState mirror(BlockState state, Mirror mirrorIn)
IBlockState#withMirror(Mirror)
whenever possible. Implementing/overriding is fine.public static boolean cannotAttach(Block blockIn)
@Deprecated public boolean isNormalCube(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean causesSuffocation(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean isViewBlocking(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean allowsMovement(BlockState state, IBlockReader worldIn, BlockPos pos, PathType type)
@Deprecated public BlockRenderType getRenderType(BlockState state)
IBlockState#getRenderType()
whenever possible. Implementing/overriding is fine.@Deprecated public boolean isReplaceable(BlockState state, BlockItemUseContext useContext)
@Deprecated public boolean isReplaceable(BlockState p_225541_1_, Fluid p_225541_2_)
@Deprecated public float getBlockHardness(BlockState blockState, IBlockReader worldIn, BlockPos pos)
IBlockState#getBlockHardness(World,BlockPos)
whenever possible.
Implementing/overriding is fine.public boolean ticksRandomly(BlockState state)
@Deprecated public boolean hasTileEntity()
@Deprecated public boolean needsPostProcessing(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean isEmissiveRendering(BlockState p_225543_1_)
public static boolean shouldSideBeRendered(BlockState adjacentState, IBlockReader blockState, BlockPos blockAccess, Direction pos)
@Deprecated public final boolean isSolid(BlockState state)
@Deprecated public boolean isSideInvisible(BlockState state, BlockState adjacentBlockState, Direction side)
@Deprecated public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
@Deprecated public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
@Deprecated public VoxelShape getRenderShape(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public VoxelShape getRaytraceShape(BlockState state, IBlockReader worldIn, BlockPos pos)
public static boolean hasSolidSideOnTop(IBlockReader worldIn, BlockPos pos)
public static boolean hasEnoughSolidSide(IWorldReader worldIn, BlockPos pos, Direction directionIn)
public static boolean hasSolidSide(BlockState state, IBlockReader worldIn, BlockPos pos, Direction side)
public static boolean doesSideFillSquare(VoxelShape shape, Direction side)
public static boolean isOpaque(VoxelShape shape)
VoxelShape
is opaque@Deprecated public final boolean isOpaqueCube(BlockState state, IBlockReader worldIn, BlockPos pos)
public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos)
@Deprecated public int getOpacity(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean isTransparent(BlockState state)
@Deprecated public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random random)
@Deprecated public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random rand)
public void animateTick(BlockState stateIn, World worldIn, BlockPos pos, java.util.Random rand)
randomTick
and #needsRandomTick
, and will always be called regardless
of whether the block can receive random update tickspublic void onPlayerDestroy(IWorld worldIn, BlockPos pos, BlockState state)
@Deprecated public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving)
public int tickRate(IWorldReader worldIn)
@Nullable @Deprecated public INamedContainerProvider getContainer(BlockState state, World worldIn, BlockPos pos)
@Deprecated public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving)
@Deprecated public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
@Deprecated public float getPlayerRelativeBlockHardness(BlockState state, PlayerEntity player, IBlockReader worldIn, BlockPos pos)
IBlockState#getPlayerRelativeBlockHardness(EntityPlayer,World,BlockPos)
whenever
possible. Implementing/overriding is fine.@Deprecated public void spawnAdditionalDrops(BlockState state, World worldIn, BlockPos pos, ItemStack stack)
public ResourceLocation getLootTable()
@Deprecated public java.util.List<ItemStack> getDrops(BlockState state, LootContext.Builder builder)
public static java.util.List<ItemStack> getDrops(BlockState state, ServerWorld worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn)
public static java.util.List<ItemStack> getDrops(BlockState state, ServerWorld worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn, @Nullable Entity entityIn, ItemStack stack)
public static void spawnDrops(BlockState state, World worldIn, BlockPos pos)
public static void spawnDrops(BlockState state, World worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn)
public static void spawnDrops(BlockState state, World worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn, Entity entityIn, ItemStack stack)
public static void spawnAsEntity(World worldIn, BlockPos pos, ItemStack stack)
public void dropXpOnBlockBreak(World worldIn, BlockPos pos, int amount)
@Deprecated public float getExplosionResistance()
public void onExplosionDestroy(World worldIn, BlockPos pos, Explosion explosionIn)
@Deprecated public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos)
@Deprecated public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit)
public void onEntityWalk(World worldIn, BlockPos pos, Entity entityIn)
@Nullable public BlockState getStateForPlacement(BlockItemUseContext context)
@Deprecated public void onBlockClicked(BlockState state, World worldIn, BlockPos pos, PlayerEntity player)
@Deprecated public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
IBlockState#getWeakPower(IBlockAccess,BlockPos,EnumFacing)
whenever possible.
Implementing/overriding is fine.@Deprecated public boolean canProvidePower(BlockState state)
IBlockState#canProvidePower()
whenever possible. Implementing/overriding is fine.@Deprecated public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn)
@Deprecated public int getStrongPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
IBlockState#getStrongPower(IBlockAccess,BlockPos,EnumFacing)
whenever possible.
Implementing/overriding is fine.public void harvestBlock(World worldIn, PlayerEntity player, BlockPos pos, BlockState state, @Nullable TileEntity te, ItemStack stack)
public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack)
public boolean canSpawnInBlock()
public ITextComponent getNameTextComponent()
public java.lang.String getTranslationKey()
@Deprecated public boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int id, int param)
IBlockState#onBlockEventReceived(World,BlockPos,int,int)
whenever possible.
Implementing/overriding is fine.@Deprecated public PushReaction getPushReaction(BlockState state)
IBlockState#getMobilityFlag()
whenever possible. Implementing/overriding is fine.@Deprecated public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos)
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
public void onLanded(IBlockReader worldIn, Entity entityIn)
@Deprecated public ItemStack getItem(IBlockReader worldIn, BlockPos pos, BlockState state)
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items)
@Deprecated public IFluidState getFluidState(BlockState state)
@Deprecated public float getSlipperiness()
public float getSpeedFactor()
public float getJumpFactor()
@Deprecated public long getPositionRandom(BlockState state, BlockPos pos)
IBakedModel#getQuads
, used for random model rotationspublic void onProjectileCollision(World worldIn, BlockState state, BlockRayTraceResult hit, Entity projectile)
public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player)
public void fillWithRain(World worldIn, BlockPos pos)
@Deprecated public boolean canDropFromExplosion(Explosion explosionIn)
@Deprecated public boolean hasComparatorInputOverride(BlockState state)
IBlockState#hasComparatorInputOverride()
whenever possible. Implementing/overriding
is fine.@Deprecated public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos)
IBlockState#getComparatorInputOverride(World,BlockPos)
whenever possible.
Implementing/overriding is fine.protected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
public StateContainer<Block,BlockState> getStateContainer()
protected final void setDefaultState(BlockState state)
public final BlockState getDefaultState()
public Block.OffsetType getOffsetType()
@Deprecated public Vec3d getOffset(BlockState state, IBlockReader worldIn, BlockPos pos)
IBlockState#getOffset(IBlockAccess,BlockPos)
whenever possible.
Implementing/overriding is fine.@Deprecated public SoundType getSoundType(BlockState state)
public Item asItem()
asItem
インタフェース内 IItemProvider
public boolean isVariableOpacity()
public java.lang.String toString()
toString
クラス内 java.lang.Object
public void addInformation(ItemStack stack, @Nullable IBlockReader worldIn, java.util.List<ITextComponent> tooltip, ITooltipFlag flagIn)
public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity)
IForgeBlock
Note that entities may reduce slipperiness by a certain factor of their own;
for net.minecraft.entity.EntityLivingBase
, this is .91
.
net.minecraft.entity.item.EntityItem
uses .98
, and
net.minecraft.entity.projectile.EntityFishHook
uses .92
.
getSlipperiness
インタフェース内 IForgeBlock
state
- state of the blockworld
- the worldpos
- the position in the worldentity
- the entity in question@Nullable public ToolType getHarvestTool(BlockState state)
IForgeBlock
getHarvestTool
インタフェース内 IForgeBlock
public int getHarvestLevel(BlockState state)
IForgeBlock
getHarvestLevel
インタフェース内 IForgeBlock
public boolean canSustainPlant(BlockState state, IBlockReader world, BlockPos pos, Direction facing, IPlantable plantable)
IForgeBlock
canSustainPlant
インタフェース内 IForgeBlock
state
- The Current stateworld
- The current worldfacing
- The direction relative to the given position the plant wants to be, typically its UPplantable
- The plant that wants to checkpublic final java.util.Set<ResourceLocation> getTags()
IForgeBlock
getTags
インタフェース内 IForgeBlock