public class Block
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Block.EnumOffsetType |
static class |
Block.SoundType |
Modifier | Constructor and Description |
---|---|
protected |
Block(Material materialIn) |
Modifier and Type | Method and Description |
---|---|
void |
addCollisionBoxesToList(World worldIn,
BlockPos pos,
IBlockState state,
AxisAlignedBB mask,
java.util.List list,
Entity collidingEntity) |
boolean |
addDestroyEffects(World world,
BlockPos pos,
EffectRenderer effectRenderer)
Spawn particles for when the block is destroyed.
|
boolean |
addHitEffects(World worldObj,
MovingObjectPosition target,
EffectRenderer effectRenderer)
Spawn a digging particle effect in the world, this is a wrapper
around EffectRenderer.addBlockHitEffects to allow the block more
control over the particles.
|
void |
beginLeavesDecay(World world,
BlockPos pos)
Called when a leaf should start its decay process.
|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
canBeReplacedByLeaves(IBlockAccess world,
BlockPos pos)
Used during tree growth to determine if newly generated leaves can replace this block.
|
boolean |
canCollideCheck(IBlockState state,
boolean hitIfLiquid) |
boolean |
canConnectRedstone(IBlockAccess world,
BlockPos pos,
EnumFacing side)
Determine if this block can make a redstone connection on the side provided,
Useful to control which sides are inputs and outputs for redstone wires.
|
boolean |
canCreatureSpawn(IBlockAccess world,
BlockPos pos,
EntityLiving.SpawnPlacementType type)
Determines if a specified mob type can spawn on this block, returning false will
prevent any mob from spawning on the block.
|
boolean |
canDropFromExplosion(Explosion explosionIn) |
boolean |
canEntityDestroy(IBlockAccess world,
BlockPos pos,
Entity entity)
Determines if this block is can be destroyed by the specified entities normal behavior.
|
boolean |
canHarvestBlock(IBlockAccess world,
BlockPos pos,
EntityPlayer player)
Determines if the player can harvest this block, obtaining it's drops when the block is destroyed.
|
boolean |
canPlaceBlockAt(World worldIn,
BlockPos pos) |
boolean |
canPlaceBlockOnSide(World worldIn,
BlockPos pos,
EnumFacing side) |
boolean |
canPlaceTorchOnTop(IBlockAccess world,
BlockPos pos)
Determines if a torch can be placed on the top surface of this block.
|
boolean |
canProvidePower() |
boolean |
canRenderInLayer(EnumWorldBlockLayer layer)
Queries if this block should render in a given layer.
|
boolean |
canReplace(World worldIn,
BlockPos pos,
EnumFacing side,
ItemStack stack) |
protected boolean |
canSilkHarvest()
Deprecated.
|
boolean |
canSilkHarvest(World world,
BlockPos pos,
IBlockState state,
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 |
canSustainLeaves(IBlockAccess world,
BlockPos pos)
Determines if this block can prevent leaves connected to it from decaying.
|
boolean |
canSustainPlant(IBlockAccess world,
BlockPos pos,
EnumFacing direction,
IPlantable plantable)
Determines if this block can support the passed in plant, allowing it to be planted and grow.
|
protected java.util.List<ItemStack> |
captureDrops(boolean start) |
MovingObjectPosition |
collisionRayTrace(World worldIn,
BlockPos pos,
Vec3 start,
Vec3 end) |
int |
colorMultiplier(IBlockAccess worldIn,
BlockPos pos) |
int |
colorMultiplier(IBlockAccess worldIn,
BlockPos pos,
int renderPass) |
protected BlockState |
createBlockState() |
protected ItemStack |
createStackedBlock(IBlockState state) |
TileEntity |
createTileEntity(World world,
IBlockState state)
Called throughout the code as a replacement for ITileEntityProvider.createNewTileEntity
Return the same thing you would from that function.
|
int |
damageDropped(IBlockState state) |
protected Block |
disableStats() |
void |
dropBlockAsItem(World worldIn,
BlockPos pos,
IBlockState state,
int forture) |
void |
dropBlockAsItemWithChance(World worldIn,
BlockPos pos,
IBlockState state,
float chance,
int fortune) |
void |
dropXpOnBlockBreak(World worldIn,
BlockPos pos,
int amount) |
void |
fillWithRain(World worldIn,
BlockPos pos) |
IBlockState |
getActualState(IBlockState state,
IBlockAccess worldIn,
BlockPos pos) |
float |
getAmbientOcclusionLightValue() |
EnumFacing |
getBedDirection(IBlockAccess world,
BlockPos pos)
Returns the direction of the block.
|
BlockPos |
getBedSpawnPosition(IBlockAccess world,
BlockPos pos,
EntityPlayer player)
Returns the position that the player is moved to upon
waking up, or respawning at the bed.
|
double |
getBlockBoundsMaxX() |
double |
getBlockBoundsMaxY() |
double |
getBlockBoundsMaxZ() |
double |
getBlockBoundsMinX() |
double |
getBlockBoundsMinY() |
double |
getBlockBoundsMinZ() |
static Block |
getBlockById(int id) |
int |
getBlockColor() |
static Block |
getBlockFromItem(Item itemIn) |
static Block |
getBlockFromName(java.lang.String name) |
float |
getBlockHardness(World worldIn,
BlockPos pos) |
EnumWorldBlockLayer |
getBlockLayer() |
BlockState |
getBlockState() |
AxisAlignedBB |
getCollisionBoundingBox(World worldIn,
BlockPos pos,
IBlockState state) |
int |
getComparatorInputOverride(World worldIn,
BlockPos pos) |
CreativeTabs |
getCreativeTabToDisplayOn() |
int |
getDamageValue(World worldIn,
BlockPos pos) |
IBlockState |
getDefaultState() |
java.util.List<ItemStack> |
getDrops(IBlockAccess world,
BlockPos pos,
IBlockState state,
int fortune)
This returns a complete list of items dropped from this block.
|
boolean |
getEnableStats() |
float |
getEnchantPowerBonus(World world,
BlockPos pos)
Determines the amount of enchanting power this block can provide to an enchanting table.
|
int |
getExpDrop(IBlockAccess world,
BlockPos pos,
int fortune)
Gathers how much experience this block drops when broken.
|
float |
getExplosionResistance(Entity exploder) |
float |
getExplosionResistance(World world,
BlockPos pos,
Entity exploder,
Explosion explosion)
Location sensitive version of getExplosionRestance
|
IBlockState |
getExtendedState(IBlockState state,
IBlockAccess world,
BlockPos pos)
Can return IExtendedBlockState
|
int |
getFireSpreadSpeed(IBlockAccess world,
BlockPos pos,
EnumFacing face)
Called when fire is updating on a neighbor block.
|
int |
getFlammability(IBlockAccess world,
BlockPos pos,
EnumFacing face)
Chance that fire will spread and consume this block.
|
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
|
java.lang.String |
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.
|
static int |
getIdFromBlock(Block blockIn) |
Item |
getItem(World worldIn,
BlockPos pos) |
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune) |
int |
getLightOpacity() |
int |
getLightOpacity(IBlockAccess world,
BlockPos pos)
Location aware and overrideable version of the lightOpacity array,
return the number to subtract from the light value when it passes through this block.
|
int |
getLightValue() |
int |
getLightValue(IBlockAccess world,
BlockPos pos)
Get a light value for the block at the specified coordinates, normal ranges are between 0 and 15
|
java.lang.String |
getLocalizedName() |
MapColor |
getMapColor(IBlockState state) |
Material |
getMaterial() |
int |
getMetaFromState(IBlockState state) |
int |
getMixedBrightnessForBlock(IBlockAccess worldIn,
BlockPos pos) |
int |
getMobilityFlag() |
Block.EnumOffsetType |
getOffsetType() |
ItemStack |
getPickBlock(MovingObjectPosition target,
World world,
BlockPos pos)
Called when a user uses the creative pick block button on this block
|
float |
getPlayerRelativeBlockHardness(EntityPlayer playerIn,
World worldIn,
BlockPos pos) |
int |
getRenderColor(IBlockState state) |
int |
getRenderType() |
AxisAlignedBB |
getSelectedBoundingBox(World worldIn,
BlockPos pos) |
static IBlockState |
getStateById(int id) |
IBlockState |
getStateForEntityRender(IBlockState state) |
IBlockState |
getStateFromMeta(int meta) |
static int |
getStateId(IBlockState state) |
void |
getSubBlocks(Item itemIn,
CreativeTabs tab,
java.util.List list) |
boolean |
getTickRandomly() |
java.lang.String |
getUnlocalizedName() |
boolean |
getUseNeighborBrightness() |
EnumFacing[] |
getValidRotations(World world,
BlockPos pos)
Get the rotations that can apply to the block at the specified coordinates.
|
boolean |
getWeakChanges(IBlockAccess world,
BlockPos pos)
If this block should be notified of weak changes.
|
void |
harvestBlock(World worldIn,
EntityPlayer player,
BlockPos pos,
IBlockState state,
TileEntity te) |
boolean |
hasComparatorInputOverride() |
boolean |
hasTileEntity()
Deprecated.
|
boolean |
hasTileEntity(IBlockState state)
Called throughout the code as a replacement for block instanceof BlockContainer
Moving this to the Block base class allows for mods that wish to extend vanilla
blocks, and also want to have a tile entity on that block, may.
|
boolean |
isAir(IBlockAccess world,
BlockPos pos)
Determines this block should be treated as an air block
by the rest of the code.
|
boolean |
isAssociatedBlock(Block other) |
boolean |
isBeaconBase(IBlockAccess worldObj,
BlockPos pos,
BlockPos beacon)
Determines if this block can be used as the base of a beacon.
|
boolean |
isBed(IBlockAccess world,
BlockPos pos,
Entity player)
Determines if this block is classified as a Bed, Allowing
players to sleep in it, though the block has to specifically
perform the sleeping functionality in it's activated event.
|
boolean |
isBedFoot(IBlockAccess world,
BlockPos pos)
Determines if the current block is the foot half of the bed.
|
boolean |
isBlockSolid(IBlockAccess worldIn,
BlockPos pos,
EnumFacing side) |
boolean |
isBurning(IBlockAccess world,
BlockPos pos)
Determines if this block should set fire and deal fire damage
to entities coming into contact with it.
|
boolean |
isCollidable() |
static boolean |
isEqualTo(Block blockIn,
Block other) |
boolean |
isFertile(World world,
BlockPos pos)
Checks if this soil is fertile, typically this means that growth rates
of plants on this soil will be slightly sped up.
|
boolean |
isFireSource(World world,
BlockPos pos,
EnumFacing side)
Currently only called by fire when it is on top of this block.
|
boolean |
isFlammable(IBlockAccess world,
BlockPos pos,
EnumFacing face)
Called when fire is updating, checks if a block face can catch fire.
|
boolean |
isFlowerPot() |
boolean |
isFoliage(IBlockAccess world,
BlockPos pos)
Used by getTopSolidOrLiquidBlock while placing biome decorations, villages, etc
Also used to determine if the player can spawn on this block.
|
boolean |
isFullBlock() |
boolean |
isFullCube() |
boolean |
isLadder(IBlockAccess world,
BlockPos pos,
EntityLivingBase entity)
Checks if a player or entity can use this block to 'climb' like a ladder.
|
boolean |
isLeaves(IBlockAccess world,
BlockPos pos)
Determines if this block is considered a leaf block, used to apply the leaf decay and generation system.
|
boolean |
isNormalCube() |
boolean |
isNormalCube(IBlockAccess world,
BlockPos pos)
Return true if the block is a normal, solid cube.
|
boolean |
isOpaqueCube() |
boolean |
isPassable(IBlockAccess worldIn,
BlockPos pos) |
int |
isProvidingStrongPower(IBlockAccess worldIn,
BlockPos pos,
IBlockState state,
EnumFacing side) |
int |
isProvidingWeakPower(IBlockAccess worldIn,
BlockPos pos,
IBlockState state,
EnumFacing side) |
boolean |
isReplaceable(World worldIn,
BlockPos pos) |
boolean |
isReplaceableOreGen(World world,
BlockPos pos,
com.google.common.base.Predicate<IBlockState> target)
Determines if the current block is replaceable by Ore veins during world generation.
|
boolean |
isSideSolid(IBlockAccess world,
BlockPos pos,
EnumFacing side)
Checks if the block is a solid face on the given side, used by placement logic.
|
boolean |
isSolidFullCube() |
boolean |
isToolEffective(java.lang.String type,
IBlockState state)
Checks if the specified tool type is efficient on this block,
meaning that it digs at full speed.
|
boolean |
isTranslucent() |
boolean |
isVisuallyOpaque() |
boolean |
isWood(IBlockAccess world,
BlockPos pos) |
Vec3 |
modifyAcceleration(World worldIn,
BlockPos pos,
Entity entityIn,
Vec3 motion) |
boolean |
onBlockActivated(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer playerIn,
EnumFacing side,
float hitX,
float hitY,
float hitZ) |
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state) |
void |
onBlockClicked(World worldIn,
BlockPos pos,
EntityPlayer playerIn) |
void |
onBlockDestroyedByExplosion(World worldIn,
BlockPos pos,
Explosion explosionIn) |
void |
onBlockDestroyedByPlayer(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
onBlockEventReceived(World worldIn,
BlockPos pos,
IBlockState state,
int eventID,
int eventParam) |
void |
onBlockExploded(World world,
BlockPos pos,
Explosion explosion)
Called when the block is destroyed by an explosion.
|
void |
onBlockHarvested(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer player) |
IBlockState |
onBlockPlaced(World worldIn,
BlockPos pos,
EnumFacing facing,
float hitX,
float hitY,
float hitZ,
int meta,
EntityLivingBase placer) |
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
IBlockState state,
EntityLivingBase placer,
ItemStack stack) |
void |
onEntityCollidedWithBlock(World worldIn,
BlockPos pos,
Entity entityIn) |
void |
onEntityCollidedWithBlock(World worldIn,
BlockPos pos,
IBlockState state,
Entity entityIn) |
void |
onFallenUpon(World worldIn,
BlockPos pos,
Entity entityIn,
float fallDistance) |
void |
onLanded(World worldIn,
Entity entityIn) |
void |
onNeighborBlockChange(World worldIn,
BlockPos pos,
IBlockState state,
Block neighborBlock) |
void |
onNeighborChange(IBlockAccess world,
BlockPos pos,
BlockPos neighbor)
Called when a tile entity on a side of this block changes is created or is destroyed.
|
void |
onPlantGrow(World world,
BlockPos pos,
BlockPos source)
Called when a plant grows on this block, only implemented for saplings using the WorldGen*Trees classes right now.
|
int |
quantityDropped(IBlockState state,
int fortune,
java.util.Random random)
State and fortune sensitive version, this replaces the old (int meta, Random rand)
version in 1.1.
|
int |
quantityDropped(java.util.Random random) |
int |
quantityDroppedWithBonus(int fortune,
java.util.Random random) |
void |
randomDisplayTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
void |
randomTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random random) |
boolean |
recolorBlock(World world,
BlockPos pos,
EnumFacing side,
EnumDyeColor color)
Common way to recolor a block with an external tool
|
static void |
registerBlocks() |
boolean |
removedByPlayer(World world,
BlockPos pos,
EntityPlayer player,
boolean willHarvest)
Called when a player removes a block.
|
boolean |
requiresUpdates() |
boolean |
rotateBlock(World world,
BlockPos pos,
EnumFacing axis)
Rotate the block.
|
void |
setBedOccupied(IBlockAccess world,
BlockPos pos,
EntityPlayer player,
boolean occupied)
Called when a user either starts or stops sleeping in the bed.
|
void |
setBlockBounds(float minX,
float minY,
float minZ,
float maxX,
float maxY,
float maxZ) |
void |
setBlockBoundsBasedOnState(IBlockAccess worldIn,
BlockPos pos) |
void |
setBlockBoundsForItemRender() |
Block |
setBlockUnbreakable() |
Block |
setCreativeTab(CreativeTabs tab) |
protected void |
setDefaultState(IBlockState state) |
Block |
setHardness(float hardness) |
void |
setHarvestLevel(java.lang.String toolClass,
int level)
Sets or removes the tool and level required to harvest this block.
|
void |
setHarvestLevel(java.lang.String toolClass,
int level,
IBlockState state)
Sets or removes the tool and level required to harvest this block.
|
Block |
setLightLevel(float value) |
Block |
setLightOpacity(int opacity) |
Block |
setResistance(float resistance) |
Block |
setStepSound(Block.SoundType sound) |
Block |
setTickRandomly(boolean shouldTick) |
Block |
setUnlocalizedName(java.lang.String name) |
boolean |
shouldCheckWeakPower(IBlockAccess world,
BlockPos pos,
EnumFacing side)
Called to determine whether to allow the a block to handle its own indirect power rather than using the default rules.
|
boolean |
shouldSideBeRendered(IBlockAccess worldIn,
BlockPos pos,
EnumFacing side) |
static void |
spawnAsEntity(World worldIn,
BlockPos pos,
ItemStack stack) |
int |
tickRate(World worldIn) |
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
public static final RegistryNamespacedDefaultedByKey blockRegistry
@Deprecated public static final ObjectIntIdentityMap BLOCK_STATE_IDS
public static final Block.SoundType soundTypeStone
public static final Block.SoundType soundTypeWood
public static final Block.SoundType soundTypeGravel
public static final Block.SoundType soundTypeGrass
public static final Block.SoundType soundTypePiston
public static final Block.SoundType soundTypeMetal
public static final Block.SoundType soundTypeGlass
public static final Block.SoundType soundTypeCloth
public static final Block.SoundType soundTypeSand
public static final Block.SoundType soundTypeSnow
public static final Block.SoundType soundTypeLadder
public static final Block.SoundType soundTypeAnvil
public static final Block.SoundType SLIME_SOUND
protected boolean fullBlock
protected int lightOpacity
protected boolean translucent
protected int lightValue
protected boolean useNeighborBrightness
protected float blockHardness
protected float blockResistance
protected boolean enableStats
protected boolean needsRandomTick
protected boolean isBlockContainer
protected double minX
protected double minY
protected double minZ
protected double maxX
protected double maxY
protected double maxZ
public Block.SoundType stepSound
public float blockParticleGravity
protected final Material blockMaterial
public float slipperiness
protected final BlockState blockState
public final RegistryDelegate<Block> delegate
protected java.lang.ThreadLocal<EntityPlayer> harvesters
protected static java.util.Random RANDOM
protected static java.lang.ThreadLocal<java.lang.Boolean> captureDrops
protected static java.lang.ThreadLocal<java.util.List<ItemStack>> capturedDrops
protected Block(Material materialIn)
public static int getIdFromBlock(Block blockIn)
public static int getStateId(IBlockState state)
public static Block getBlockById(int id)
public static IBlockState getStateById(int id)
public static Block getBlockFromName(java.lang.String name)
public boolean isFullBlock()
public int getLightOpacity()
public boolean isTranslucent()
public int getLightValue()
public boolean getUseNeighborBrightness()
public Material getMaterial()
public MapColor getMapColor(IBlockState state)
public IBlockState getStateFromMeta(int meta)
public int getMetaFromState(IBlockState state)
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
public Block setStepSound(Block.SoundType sound)
public Block setLightOpacity(int opacity)
public Block setLightLevel(float value)
public Block setResistance(float resistance)
public boolean isSolidFullCube()
public boolean isNormalCube()
public boolean isVisuallyOpaque()
public boolean isFullCube()
public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
public int getRenderType()
public Block setHardness(float hardness)
public Block setBlockUnbreakable()
public Block setTickRandomly(boolean shouldTick)
public boolean getTickRandomly()
@Deprecated public boolean hasTileEntity()
public final void setBlockBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos)
public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side)
public boolean isBlockSolid(IBlockAccess worldIn, BlockPos pos, EnumFacing side)
public AxisAlignedBB getSelectedBoundingBox(World worldIn, BlockPos pos)
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, java.util.List list, Entity collidingEntity)
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
public boolean isOpaqueCube()
public boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
public boolean isCollidable()
public void randomTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random random)
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state)
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
public int tickRate(World worldIn)
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
public int quantityDropped(java.util.Random random)
public Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
public float getPlayerRelativeBlockHardness(EntityPlayer playerIn, World worldIn, BlockPos pos)
public final void dropBlockAsItem(World worldIn, BlockPos pos, IBlockState state, int forture)
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
public int damageDropped(IBlockState state)
public float getExplosionResistance(Entity exploder)
public MovingObjectPosition collisionRayTrace(World worldIn, BlockPos pos, Vec3 start, Vec3 end)
public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn)
public boolean canReplace(World worldIn, BlockPos pos, EnumFacing side, ItemStack stack)
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side)
public EnumWorldBlockLayer getBlockLayer()
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn)
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
public void onBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn)
public Vec3 modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3 motion)
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
public final double getBlockBoundsMinX()
public final double getBlockBoundsMaxX()
public final double getBlockBoundsMinY()
public final double getBlockBoundsMaxY()
public final double getBlockBoundsMinZ()
public final double getBlockBoundsMaxZ()
public int getBlockColor()
public int getRenderColor(IBlockState state)
public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
public int isProvidingWeakPower(IBlockAccess worldIn, BlockPos pos, IBlockState state, EnumFacing side)
public final int colorMultiplier(IBlockAccess worldIn, BlockPos pos)
public boolean canProvidePower()
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
public int isProvidingStrongPower(IBlockAccess worldIn, BlockPos pos, IBlockState state, EnumFacing side)
public void setBlockBoundsForItemRender()
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
@Deprecated protected boolean canSilkHarvest()
protected ItemStack createStackedBlock(IBlockState state)
public int quantityDroppedWithBonus(int fortune, java.util.Random random)
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
public Block setUnlocalizedName(java.lang.String name)
public java.lang.String getLocalizedName()
public java.lang.String getUnlocalizedName()
public boolean onBlockEventReceived(World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam)
public boolean getEnableStats()
protected Block disableStats()
public int getMobilityFlag()
public float getAmbientOcclusionLightValue()
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
public void getSubBlocks(Item itemIn, CreativeTabs tab, java.util.List list)
public Block setCreativeTab(CreativeTabs tab)
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
public CreativeTabs getCreativeTabToDisplayOn()
public boolean isFlowerPot()
public boolean requiresUpdates()
public boolean canDropFromExplosion(Explosion explosionIn)
public boolean isAssociatedBlock(Block other)
public boolean hasComparatorInputOverride()
public IBlockState getStateForEntityRender(IBlockState state)
protected BlockState createBlockState()
public BlockState getBlockState()
protected final void setDefaultState(IBlockState state)
public final IBlockState getDefaultState()
public Block.EnumOffsetType getOffsetType()
public int getLightValue(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean isLadder(IBlockAccess world, BlockPos pos, EntityLivingBase entity)
world
- The current worldpos
- Block position in worldentity
- The entity trying to use the ladder, CAN be null.public boolean isNormalCube(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side)
world
- The current worldpos
- Block position in worldside
- The side to checkpublic boolean isBurning(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean isAir(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean canHarvestBlock(IBlockAccess world, BlockPos pos, EntityPlayer player)
player
- The player damaging the block, may be nullmeta
- The block's current metadatapublic boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
world
- The current worldplayer
- The player damaging the block, may be nullpos
- Block position in worldwillHarvest
- True if Block.harvestBlock will be called after this, if the return in true.
Can be useful to delay the destruction of tile entities till after harvestBlockpublic int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
world
- The current worldpos
- Block position in worldface
- The face that the fire is coming frompublic boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face)
world
- The current worldpos
- Block position in worldface
- The face that the fire is coming frompublic int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face)
world
- The current worldpos
- Block position in worldface
- The face that the fire is coming frompublic boolean isFireSource(World world, BlockPos pos, EnumFacing side)
world
- The current worldpos
- Block position in worldmetadata
- The blocks current metadataside
- The face that the fire is coming frompublic boolean hasTileEntity(IBlockState state)
state
- State of the current blockpublic TileEntity createTileEntity(World world, IBlockState state)
metadata
- The Metadata of the current blockpublic int quantityDropped(IBlockState state, int fortune, java.util.Random random)
state
- Current statefortune
- Current item fortune levelrandom
- Random number generatorpublic java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
world
- The current worldpos
- Block position in worldstate
- Current statefortune
- Breakers fortune levelpublic boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player)
world
- The worldpos
- Block position in worldstate
- current block stateplayer
- The player doing the harvestingpublic boolean canCreatureSpawn(IBlockAccess world, BlockPos pos, EntityLiving.SpawnPlacementType type)
world
- The current worldpos
- Block position in worldtype
- The Mob Category Typepublic boolean isBed(IBlockAccess world, BlockPos pos, Entity player)
world
- The current worldpos
- Block position in worldplayer
- The player or camera entity, null in some cases.public BlockPos getBedSpawnPosition(IBlockAccess world, BlockPos pos, EntityPlayer player)
world
- The current worldpos
- Block position in worldplayer
- The player or camera entity, null in some cases.public void setBedOccupied(IBlockAccess world, BlockPos pos, EntityPlayer player, boolean occupied)
world
- The current worldpos
- Block position in worldplayer
- The player or camera entity, null in some cases.occupied
- True if we are occupying the bed, or false if they are stopping use of the bedpublic EnumFacing getBedDirection(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean isBedFoot(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic void beginLeavesDecay(World world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean canSustainLeaves(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean isLeaves(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean canBeReplacedByLeaves(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean isWood(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean isReplaceableOreGen(World world, BlockPos pos, com.google.common.base.Predicate<IBlockState> target)
world
- The current worldpos
- Block position in worldtarget
- The generic target block the gen is looking for, Standards define stone
for overworld generation, and neatherack for the nether.public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
world
- The current worldpos
- Block position in worldexploder
- The entity that caused the explosion, can be nullexplosion
- The explosionpublic void onBlockExploded(World world, BlockPos pos, Explosion explosion)
world
- The current worldpos
- Block position in worldExplosion
- The explosion instance affecting the blockpublic boolean canConnectRedstone(IBlockAccess world, BlockPos pos, EnumFacing side)
world
- The current worldpos
- Block position in worldside
- The side that is trying to make the connection, CAN BE NULLpublic boolean canPlaceTorchOnTop(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos)
target
- The full target the player is looking atpublic boolean isFoliage(IBlockAccess world, BlockPos pos)
public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer)
world
- The current worldtarget
- The target the player is looking at {x/y/z/side/sub}effectRenderer
- A reference to the current effect renderer.public boolean addDestroyEffects(World world, BlockPos pos, EffectRenderer effectRenderer)
world
- The current worldpos
- Position to spawn the particleeffectRenderer
- A reference to the current effect renderer.public boolean canSustainPlant(IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable)
world
- The current worldpos
- Block position in worlddirection
- The direction relative to the given position the plant wants to be, typically its UPplantable
- The plant that wants to checkpublic void onPlantGrow(World world, BlockPos pos, BlockPos source)
world
- Current worldpos
- Block position in worldsource
- Source plant's position in worldpublic boolean isFertile(World world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic int getLightOpacity(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldpublic boolean canEntityDestroy(IBlockAccess world, BlockPos pos, Entity entity)
world
- The current worldpos
- Block position in worldpublic boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon)
world
- The current worldpos
- Block position in worldbeacon
- Beacon position in worldpublic boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
world
- The worldpos
- Block position in worldaxis
- The axis to rotate aroundpublic EnumFacing[] getValidRotations(World world, BlockPos pos)
world
- The worldpos
- Block position in worldpublic float getEnchantPowerBonus(World world, BlockPos pos)
world
- The Worldpos
- Block position in worldpublic boolean recolorBlock(World world, BlockPos pos, EnumFacing side, EnumDyeColor color)
world
- The worldpos
- Block position in worldside
- The side hit with the coloring toolcolor
- The color to change topublic int getExpDrop(IBlockAccess world, BlockPos pos, int fortune)
world
- The worldpos
- Block positionfortune
- public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor)
world
- The worldpos
- Block position in worldneighbor
- Block position of neighborpublic boolean shouldCheckWeakPower(IBlockAccess world, BlockPos pos, EnumFacing side)
world
- The worldpos
- Block position in worldside
- The INPUT side of the block to be powered - ie the opposite of this block's output sidepublic boolean getWeakChanges(IBlockAccess world, BlockPos pos)
world
- The current worldpos
- Block position in worldside
- The side to checkpublic void setHarvestLevel(java.lang.String toolClass, int level)
toolClass
- Classlevel
- Harvest level:
Wood: 0
Stone: 1
Iron: 2
Diamond: 3
Gold: 0public void setHarvestLevel(java.lang.String toolClass, int level, IBlockState state)
toolClass
- Classlevel
- Harvest level:
Wood: 0
Stone: 1
Iron: 2
Diamond: 3
Gold: 0state
- The specific state.public java.lang.String getHarvestTool(IBlockState state)
public int getHarvestLevel(IBlockState state)
stack
- This item stack instancepublic boolean isToolEffective(java.lang.String type, IBlockState state)
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos)
public boolean canRenderInLayer(EnumWorldBlockLayer layer)
protected java.util.List<ItemStack> captureDrops(boolean start)
public static void registerBlocks()