public class Block extends ForgeRegistryEntry<Block> implements IItemProvider, IForgeBlock
Modifier and Type | Class and Description |
---|---|
static class |
Block.EnumOffsetType |
static class |
Block.Properties |
static class |
Block.RenderSideCacheKey |
Modifier and Type | Field and Description |
---|---|
static ObjectIntIdentityMap<IBlockState> |
BLOCK_STATE_IDS
Deprecated.
|
protected float |
blockHardness |
protected MaterialColor |
blockMapColor |
protected float |
blockResistance |
protected boolean |
blocksMovement |
protected static java.lang.ThreadLocal<NonNullList<ItemStack>> |
capturedDrops |
protected static java.lang.ThreadLocal<java.lang.Boolean> |
captureDrops |
protected java.lang.ThreadLocal<EntityPlayer> |
harvesters |
protected int |
lightValue |
protected static org.apache.logging.log4j.Logger |
LOGGER |
protected Material |
material |
protected boolean |
needsRandomTick |
protected java.util.Random |
RANDOM |
protected SoundType |
soundType |
protected StateContainer<Block,IBlockState> |
stateContainer |
delegate
Constructor and Description |
---|
Block(Block.Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
addInformation(ItemStack stack,
IBlockReader worldIn,
java.util.List<ITextComponent> tooltip,
ITooltipFlag flagIn) |
boolean |
allowsMovement(IBlockState state,
IBlockReader worldIn,
BlockPos pos,
PathType type)
Deprecated.
|
void |
animateTick(IBlockState stateIn,
World worldIn,
BlockPos pos,
java.util.Random rand) |
Item |
asItem() |
boolean |
canDropFromExplosion(Explosion explosionIn) |
boolean |
canEntitySpawn(IBlockState state,
Entity entityIn)
Deprecated.
|
boolean |
canProvidePower(IBlockState state)
Deprecated.
|
protected boolean |
canSilkHarvest()
Deprecated.
|
boolean |
canSilkHarvest(IBlockState state,
IWorldReader world,
BlockPos pos,
EntityPlayer player)
Return true from this function if the player with silk touch can harvest this block directly, and not it's normal drops.
|
boolean |
canSpawnInBlock() |
boolean |
canSustainPlant(IBlockState state,
IBlockReader world,
BlockPos pos,
EnumFacing facing,
IPlantable plantable)
Determines if this block can support the passed in plant, allowing it to be planted and grow.
|
protected NonNullList<ItemStack> |
captureDrops(boolean start) |
boolean |
causesSuffocation(IBlockState state)
Deprecated.
|
static RayTraceResult |
collisionRayTrace(IBlockState state,
World worldIn,
BlockPos pos,
Vec3d start,
Vec3d end) |
static boolean |
doesSideFillSquare(VoxelShape shape,
EnumFacing side) |
void |
dropBlockAsItemWithChance(IBlockState state,
World worldIn,
BlockPos pos,
float chancePerItem,
int fortune)
Deprecated.
|
void |
dropXpOnBlockBreak(World worldIn,
BlockPos pos,
int amount) |
boolean |
eventReceived(IBlockState state,
World worldIn,
BlockPos pos,
int id,
int param)
Deprecated.
|
void |
fillItemGroup(ItemGroup group,
NonNullList<ItemStack> items) |
protected void |
fillStateContainer(StateContainer.Builder<Block,IBlockState> builder) |
void |
fillWithRain(World worldIn,
BlockPos pos) |
float |
getAmbientOcclusionLightValue(IBlockState state)
Deprecated.
|
BlockFaceShape |
getBlockFaceShape(IBlockReader worldIn,
IBlockState state,
BlockPos pos,
EnumFacing face)
Deprecated.
|
static Block |
getBlockFromItem(Item itemIn) |
float |
getBlockHardness(IBlockState blockState,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
VoxelShape |
getCollisionShape(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
int |
getComparatorInputOverride(IBlockState blockState,
World worldIn,
BlockPos pos)
Deprecated.
|
IBlockState |
getDefaultState() |
float |
getExplosionResistance()
Deprecated.
|
IFluidState |
getFluidState(IBlockState state)
Deprecated.
|
int |
getHarvestLevel(IBlockState 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(IBlockState 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,
IBlockState state)
Deprecated.
|
IItemProvider |
getItemDropped(IBlockState state,
World worldIn,
BlockPos pos,
int fortune) |
int |
getItemsToDropCount(IBlockState state,
int fortune,
World worldIn,
BlockPos pos,
java.util.Random random) |
int |
getLightValue(IBlockState state)
Deprecated.
|
MaterialColor |
getMapColor(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
Material |
getMaterial(IBlockState state)
Deprecated.
|
ITextComponent |
getNameTextComponent() |
Vec3d |
getOffset(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
Block.EnumOffsetType |
getOffsetType() |
int |
getOpacity(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
int |
getPackedLightmapCoords(IBlockState state,
IWorldReader source,
BlockPos pos)
Deprecated.
|
float |
getPlayerRelativeBlockHardness(IBlockState state,
EntityPlayer player,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
long |
getPositionRandom(IBlockState state,
BlockPos pos)
Deprecated.
|
EnumPushReaction |
getPushReaction(IBlockState state)
Deprecated.
|
VoxelShape |
getRaytraceShape(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
BlockRenderLayer |
getRenderLayer() |
VoxelShape |
getRenderShape(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
EnumBlockRenderType |
getRenderType(IBlockState state)
Deprecated.
|
VoxelShape |
getShape(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
protected ItemStack |
getSilkTouchDrop(IBlockState state) |
float |
getSlipperiness() |
float |
getSlipperiness(IBlockState state,
IWorldReader world,
BlockPos pos,
Entity entity)
Gets the slipperiness at the given location at the given state.
|
SoundType |
getSoundType()
Deprecated.
|
static IBlockState |
getStateById(int id) |
StateContainer<Block,IBlockState> |
getStateContainer() |
IBlockState |
getStateForPlacement(BlockItemUseContext context) |
static int |
getStateId(IBlockState state) |
int |
getStrongPower(IBlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
EnumFacing side)
Deprecated.
|
boolean |
getTickRandomly(IBlockState p_149653_1_) |
java.lang.String |
getTranslationKey() |
static IBlockState |
getValidBlockForPosition(IBlockState currentState,
IWorld worldIn,
BlockPos pos) |
int |
getWeakPower(IBlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
EnumFacing side)
Deprecated.
|
void |
harvestBlock(World worldIn,
EntityPlayer player,
BlockPos pos,
IBlockState state,
TileEntity te,
ItemStack stack) |
boolean |
hasComparatorInputOverride(IBlockState state)
Deprecated.
|
boolean |
hasCustomBreakingProgress(IBlockState state)
Deprecated.
|
boolean |
hasTileEntity()
Deprecated.
|
boolean |
isAir(IBlockState state)
Deprecated.
|
boolean |
isBlockNormalCube(IBlockState state)
Deprecated.
|
boolean |
isCollidable() |
boolean |
isCollidable(IBlockState state) |
static boolean |
isDirt(Block blockIn) |
static boolean |
isExceptBlockForAttachWithPiston(Block attachBlock) |
static boolean |
isExceptionBlockForAttaching(Block attachBlock) |
boolean |
isFullCube(IBlockState state)
Deprecated.
|
boolean |
isIn(Tag<Block> tagIn) |
boolean |
isNormalCube(IBlockState state)
Deprecated.
|
static boolean |
isOpaque(VoxelShape shape) |
boolean |
isOpaqueCube(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
boolean |
isReplaceable(IBlockState state,
BlockItemUseContext useContext)
Deprecated.
|
static boolean |
isRock(Block blockIn) |
boolean |
isSideInvisible(IBlockState state,
IBlockState adjacentBlockState,
EnumFacing side)
Deprecated.
|
boolean |
isSolid(IBlockState state)
Deprecated.
|
boolean |
isTopSolid(IBlockState state)
Deprecated.
|
boolean |
isValidPosition(IBlockState state,
IWorldReaderBase worldIn,
BlockPos pos)
Deprecated.
|
boolean |
isVariableOpacity() |
static VoxelShape |
makeCuboidShape(double x1,
double y1,
double z1,
double x2,
double y2,
double z2) |
IBlockState |
mirror(IBlockState state,
Mirror mirrorIn)
Deprecated.
|
boolean |
needsPostProcessing(IBlockState p_201783_1_,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
void |
neighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos)
Deprecated.
|
static IBlockState |
nudgeEntitiesWithNewState(IBlockState oldState,
IBlockState newState,
World worldIn,
BlockPos pos) |
boolean |
onBlockActivated(IBlockState state,
World worldIn,
BlockPos pos,
EntityPlayer player,
EnumHand hand,
EnumFacing side,
float hitX,
float hitY,
float hitZ)
Deprecated.
|
void |
onBlockAdded(IBlockState state,
World worldIn,
BlockPos pos,
IBlockState oldState)
Deprecated.
|
void |
onBlockClicked(IBlockState state,
World worldIn,
BlockPos pos,
EntityPlayer player)
Deprecated.
|
void |
onBlockHarvested(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer player) |
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
IBlockState state,
EntityLivingBase placer,
ItemStack stack) |
void |
onEntityCollision(IBlockState state,
World worldIn,
BlockPos pos,
Entity entityIn)
Deprecated.
|
void |
onEntityWalk(World worldIn,
BlockPos pos,
Entity entityIn) |
void |
onExplosionDestroy(World worldIn,
BlockPos pos,
Explosion explosionIn) |
void |
onFallenUpon(World worldIn,
BlockPos pos,
Entity entityIn,
float fallDistance) |
void |
onLanded(IBlockReader worldIn,
Entity entityIn) |
void |
onPlayerDestroy(IWorld worldIn,
BlockPos pos,
IBlockState state) |
void |
onReplaced(IBlockState state,
World worldIn,
BlockPos pos,
IBlockState newState,
boolean isMoving)
Deprecated.
|
boolean |
propagatesSkylightDown(IBlockState state,
IBlockReader reader,
BlockPos pos) |
int |
quantityDropped(IBlockState state,
java.util.Random random)
Deprecated.
|
void |
randomTick(IBlockState state,
World worldIn,
BlockPos pos,
java.util.Random random)
Deprecated.
|
static void |
registerBlocks() |
static void |
replaceBlock(IBlockState oldState,
IBlockState newState,
IWorld worldIn,
BlockPos pos,
int flags) |
IBlockState |
rotate(IBlockState state,
Rotation rot)
Deprecated.
|
protected void |
setDefaultState(IBlockState state) |
static boolean |
shouldSideBeRendered(IBlockState adjacentState,
IBlockReader blockState,
BlockPos blockAccess,
EnumFacing pos) |
static void |
spawnAsEntity(World worldIn,
BlockPos pos,
ItemStack stack) |
void |
tick(IBlockState state,
World worldIn,
BlockPos pos,
java.util.Random random)
Deprecated.
|
int |
tickRate(IWorldReaderBase worldIn) |
java.lang.String |
toString() |
void |
updateDiagonalNeighbors(IBlockState state,
IWorld worldIn,
BlockPos pos,
int flags)
Deprecated.
|
void |
updateNeighbors(IBlockState stateIn,
IWorld worldIn,
BlockPos pos,
int flags)
Deprecated.
|
IBlockState |
updatePostPlacement(IBlockState stateIn,
EnumFacing facing,
IBlockState facingState,
IWorld worldIn,
BlockPos currentPos,
BlockPos facingPos)
Deprecated.
|
boolean |
useNeighborBrightness(IBlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
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 org.apache.logging.log4j.Logger LOGGER
@Deprecated public static final ObjectIntIdentityMap<IBlockState> BLOCK_STATE_IDS
protected final int lightValue
protected final float blockHardness
protected final float blockResistance
protected final boolean needsRandomTick
protected final SoundType soundType
protected final Material material
protected final MaterialColor blockMapColor
protected final StateContainer<Block,IBlockState> stateContainer
protected final boolean blocksMovement
protected java.util.Random RANDOM
protected java.lang.ThreadLocal<EntityPlayer> harvesters
protected static java.lang.ThreadLocal<java.lang.Boolean> captureDrops
protected static java.lang.ThreadLocal<NonNullList<ItemStack>> capturedDrops
public Block(Block.Properties properties)
public static int getStateId(@Nullable IBlockState state)
public static IBlockState getStateById(int id)
public static IBlockState nudgeEntitiesWithNewState(IBlockState oldState, IBlockState 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(IBlockState state, Entity entityIn)
@Deprecated public boolean isAir(IBlockState state)
@Deprecated public int getLightValue(IBlockState state)
@Deprecated public Material getMaterial(IBlockState state)
@Deprecated public MaterialColor getMapColor(IBlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public void updateNeighbors(IBlockState stateIn, IWorld worldIn, BlockPos pos, int flags)
public static IBlockState getValidBlockForPosition(IBlockState currentState, IWorld worldIn, BlockPos pos)
public static void replaceBlock(IBlockState oldState, IBlockState newState, IWorld worldIn, BlockPos pos, int flags)
@Deprecated public void updateDiagonalNeighbors(IBlockState state, IWorld worldIn, BlockPos pos, int flags)
@Deprecated public IBlockState updatePostPlacement(IBlockState stateIn, EnumFacing facing, IBlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos)
@Deprecated public IBlockState rotate(IBlockState state, Rotation rot)
@Deprecated public IBlockState mirror(IBlockState state, Mirror mirrorIn)
public static boolean isExceptionBlockForAttaching(Block attachBlock)
public static boolean isExceptBlockForAttachWithPiston(Block attachBlock)
@Deprecated public boolean isBlockNormalCube(IBlockState state)
@Deprecated public boolean isNormalCube(IBlockState state)
@Deprecated public boolean causesSuffocation(IBlockState state)
@Deprecated public boolean isFullCube(IBlockState state)
@Deprecated public boolean isTopSolid(IBlockState state)
@Deprecated public boolean hasCustomBreakingProgress(IBlockState state)
@Deprecated public boolean allowsMovement(IBlockState state, IBlockReader worldIn, BlockPos pos, PathType type)
@Deprecated public EnumBlockRenderType getRenderType(IBlockState state)
@Deprecated public boolean isReplaceable(IBlockState state, BlockItemUseContext useContext)
@Deprecated public float getBlockHardness(IBlockState blockState, IBlockReader worldIn, BlockPos pos)
public boolean getTickRandomly(IBlockState p_149653_1_)
@Deprecated public boolean hasTileEntity()
@Deprecated public boolean needsPostProcessing(IBlockState p_201783_1_, IBlockReader worldIn, BlockPos pos)
@Deprecated public int getPackedLightmapCoords(IBlockState state, IWorldReader source, BlockPos pos)
public static boolean shouldSideBeRendered(IBlockState adjacentState, IBlockReader blockState, BlockPos blockAccess, EnumFacing pos)
@Deprecated public boolean isSolid(IBlockState state)
@Deprecated public boolean isSideInvisible(IBlockState state, IBlockState adjacentBlockState, EnumFacing side)
@Deprecated public BlockFaceShape getBlockFaceShape(IBlockReader worldIn, IBlockState state, BlockPos pos, EnumFacing face)
@Deprecated public VoxelShape getShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public VoxelShape getCollisionShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public VoxelShape getRenderShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public VoxelShape getRaytraceShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
public static boolean doesSideFillSquare(VoxelShape shape, EnumFacing side)
public static boolean isOpaque(VoxelShape shape)
@Deprecated public final boolean isOpaqueCube(IBlockState state, IBlockReader worldIn, BlockPos pos)
public boolean propagatesSkylightDown(IBlockState state, IBlockReader reader, BlockPos pos)
@Deprecated public int getOpacity(IBlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public final boolean useNeighborBrightness(IBlockState state, IBlockReader worldIn, BlockPos pos)
public boolean isCollidable(IBlockState state)
public boolean isCollidable()
@Deprecated public void randomTick(IBlockState state, World worldIn, BlockPos pos, java.util.Random random)
@Deprecated public void tick(IBlockState state, World worldIn, BlockPos pos, java.util.Random random)
public void animateTick(IBlockState stateIn, World worldIn, BlockPos pos, java.util.Random rand)
public void onPlayerDestroy(IWorld worldIn, BlockPos pos, IBlockState state)
@Deprecated public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
public int tickRate(IWorldReaderBase worldIn)
@Deprecated public void onBlockAdded(IBlockState state, World worldIn, BlockPos pos, IBlockState oldState)
@Deprecated public void onReplaced(IBlockState state, World worldIn, BlockPos pos, IBlockState newState, boolean isMoving)
@Deprecated public int quantityDropped(IBlockState state, java.util.Random random)
public IItemProvider getItemDropped(IBlockState state, World worldIn, BlockPos pos, int fortune)
@Deprecated public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, IBlockReader worldIn, BlockPos pos)
@Deprecated public void dropBlockAsItemWithChance(IBlockState state, World worldIn, BlockPos pos, float chancePerItem, int fortune)
@Deprecated public float getExplosionResistance()
@Nullable public static RayTraceResult collisionRayTrace(IBlockState state, World worldIn, BlockPos pos, Vec3d start, Vec3d end)
public void onExplosionDestroy(World worldIn, BlockPos pos, Explosion explosionIn)
public BlockRenderLayer getRenderLayer()
@Deprecated public boolean isValidPosition(IBlockState state, IWorldReaderBase worldIn, BlockPos pos)
@Deprecated public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
@Nullable public IBlockState getStateForPlacement(BlockItemUseContext context)
@Deprecated public void onBlockClicked(IBlockState state, World worldIn, BlockPos pos, EntityPlayer player)
@Deprecated public int getWeakPower(IBlockState blockState, IBlockReader blockAccess, BlockPos pos, EnumFacing side)
@Deprecated public boolean canProvidePower(IBlockState state)
@Deprecated public void onEntityCollision(IBlockState state, World worldIn, BlockPos pos, Entity entityIn)
@Deprecated public int getStrongPower(IBlockState blockState, IBlockReader blockAccess, BlockPos pos, EnumFacing side)
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, ItemStack stack)
@Deprecated protected boolean canSilkHarvest()
protected ItemStack getSilkTouchDrop(IBlockState state)
public int getItemsToDropCount(IBlockState state, int fortune, World worldIn, BlockPos pos, java.util.Random random)
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, @Nullable EntityLivingBase placer, ItemStack stack)
public boolean canSpawnInBlock()
public ITextComponent getNameTextComponent()
public java.lang.String getTranslationKey()
@Deprecated public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param)
@Deprecated public EnumPushReaction getPushReaction(IBlockState state)
@Deprecated public float getAmbientOcclusionLightValue(IBlockState state)
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, IBlockState state)
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items)
@Deprecated public IFluidState getFluidState(IBlockState state)
public float getSlipperiness()
@Deprecated public long getPositionRandom(IBlockState state, BlockPos pos)
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
public boolean canDropFromExplosion(Explosion explosionIn)
@Deprecated public boolean hasComparatorInputOverride(IBlockState state)
@Deprecated public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos)
protected void fillStateContainer(StateContainer.Builder<Block,IBlockState> builder)
public StateContainer<Block,IBlockState> getStateContainer()
protected final void setDefaultState(IBlockState state)
public final IBlockState getDefaultState()
public Block.EnumOffsetType getOffsetType()
@Deprecated public Vec3d getOffset(IBlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public SoundType getSoundType()
public Item asItem()
asItem
in interface IItemProvider
public boolean isVariableOpacity()
public java.lang.String toString()
toString
in class java.lang.Object
public void addInformation(ItemStack stack, @Nullable IBlockReader worldIn, java.util.List<ITextComponent> tooltip, ITooltipFlag flagIn)
public static boolean isRock(Block blockIn)
public static boolean isDirt(Block blockIn)
public static void registerBlocks()
protected NonNullList<ItemStack> captureDrops(boolean start)
public float getSlipperiness(IBlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity)
IForgeBlock
Note that entities may reduce slipperiness by a certain factor of their own;
for EntityLivingBase
, this is .91
.
EntityItem
uses .98
, and
EntityFishHook
uses .92
.
getSlipperiness
in interface IForgeBlock
state
- state of the blockworld
- the worldpos
- the position in the worldentity
- the entity in questionpublic boolean canSilkHarvest(IBlockState state, IWorldReader world, BlockPos pos, EntityPlayer player)
IForgeBlock
canSilkHarvest
in interface IForgeBlock
state
- current block stateworld
- The worldpos
- Block position in worldplayer
- The player doing the harvesting@Nullable public ToolType getHarvestTool(IBlockState state)
IForgeBlock
getHarvestTool
in interface IForgeBlock
public int getHarvestLevel(IBlockState state)
IForgeBlock
getHarvestLevel
in interface IForgeBlock
public boolean canSustainPlant(IBlockState state, IBlockReader world, BlockPos pos, EnumFacing facing, IPlantable plantable)
IForgeBlock
canSustainPlant
in interface 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 check