public class BlockLeaves extends BlockLeavesBase implements IShearable
Modifier and Type | Field and Description |
---|---|
static String[][] |
field_94396_b |
static String[] |
LEAF_TYPES |
graphicsLevel
anvil, beacon, bed, bedrock, blockClay, blockDiamond, blockEmerald, blockGold, blockHardness, blockID, blockIron, blockLapis, blockMaterial, blockNetherQuartz, blockParticleGravity, blockRedstone, blockResistance, blocksList, blockSnow, bookShelf, brewingStand, brick, cactus, cake, canBlockGrass, carpet, carrot, cauldron, chest, chestTrapped, cloth, coalBlock, cobblestone, cobblestoneMossy, cobblestoneWall, cocoaPlant, commandBlock, crops, daylightSensor, deadBush, dirt, dispenser, doorIron, doorWood, dragonEgg, dropper, enchantmentTable, enderChest, endPortal, endPortalFrame, fence, fenceGate, fenceIron, fire, flowerPot, furnaceBurning, furnaceIdle, glass, glowStone, grass, gravel, hardenedClay, hay, hopperBlock, ice, jukebox, ladder, lavaMoving, lavaStill, leaves, lever, lightOpacity, lightValue, lockedChest, melon, melonStem, mobSpawner, mushroomBrown, mushroomCapBrown, mushroomCapRed, mushroomRed, music, mycelium, netherBrick, netherFence, netherrack, netherStalk, obsidian, opaqueCubeLookup, oreCoal, oreDiamond, oreEmerald, oreGold, oreIron, oreLapis, oreNetherQuartz, oreRedstone, oreRedstoneGlowing, pistonBase, pistonExtension, pistonMoving, pistonStickyBase, planks, plantRed, plantYellow, portal, potato, pressurePlateGold, pressurePlateIron, pressurePlatePlanks, pressurePlateStone, pumpkin, pumpkinLantern, pumpkinStem, rail, railActivator, railDetector, railPowered, redstoneComparatorActive, redstoneComparatorIdle, redstoneLampActive, redstoneLampIdle, redstoneRepeaterActive, redstoneRepeaterIdle, redstoneWire, reed, sand, sandStone, sapling, signPost, signWall, silverfish, skull, slipperiness, slowSand, snow, soundAnvilFootstep, soundClothFootstep, soundGlassFootstep, soundGrassFootstep, soundGravelFootstep, soundLadderFootstep, soundMetalFootstep, soundPowderFootstep, soundSandFootstep, soundSnowFootstep, soundStoneFootstep, soundWoodFootstep, sponge, stainedClay, stairsBrick, stairsCobblestone, stairsNetherBrick, stairsNetherQuartz, stairsSandStone, stairsStoneBrick, stairsWoodBirch, stairsWoodJungle, stairsWoodOak, stairsWoodSpruce, stepSound, stone, stoneBrick, stoneButton, stoneDoubleSlab, stoneSingleSlab, tallGrass, thinGlass, tilledField, tnt, torchRedstoneActive, torchRedstoneIdle, torchWood, trapdoor, tripWire, tripWireSource, useNeighborBrightness, vine, waterlily, waterMoving, waterStill, web, whiteStone, wood, woodDoubleSlab, woodenButton, woodSingleSlab, workbench
Modifier and Type | Method and Description |
---|---|
void |
beginLeavesDecay(World world,
int x,
int y,
int z)
Called when a leaf should start its decay process.
|
void |
breakBlock(World par1World,
int par2,
int par3,
int par4,
int par5,
int par6)
Called on server worlds only when the block has been replaced by a different block ID, or the same block with a
different metadata value, but before the new metadata value is set.
|
int |
colorMultiplier(IBlockAccess par1IBlockAccess,
int par2,
int par3,
int par4) |
int |
damageDropped(int par1)
Determines the damage on the item the block drops.
|
void |
dropBlockAsItemWithChance(World par1World,
int par2,
int par3,
int par4,
int par5,
float par6,
int par7)
Drops the block items with a specified chance of dropping the specified items
|
int |
getBlockColor() |
Icon |
getIcon(int par1,
int par2) |
int |
getRenderColor(int par1) |
void |
getSubBlocks(int par1,
CreativeTabs par2CreativeTabs,
List par3List) |
void |
harvestBlock(World par1World,
EntityPlayer par2EntityPlayer,
int par3,
int par4,
int par5,
int par6)
Called when the player destroys a block with an item that can harvest it.
|
int |
idDropped(int par1,
Random par2Random,
int par3)
Returns the ID of the items to drop on destruction.
|
boolean |
isLeaves(World world,
int x,
int y,
int z)
Determines if this block is considered a leaf block, used to apply the leaf decay and generation system.
|
boolean |
isOpaqueCube()
Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
|
boolean |
isShearable(ItemStack item,
World world,
int x,
int y,
int z)
Checks if the object is currently shearable
Example: Sheep return false when they have no wool
|
ArrayList<ItemStack> |
onSheared(ItemStack item,
World world,
int x,
int y,
int z,
int fortune)
Performs the shear function on this object.
|
int |
quantityDropped(Random par1Random)
Returns the quantity of items to drop on block destruction.
|
void |
randomDisplayTick(World par1World,
int par2,
int par3,
int par4,
Random par5Random) |
void |
registerIcons(IconRegister par1IconRegister) |
void |
setGraphicsLevel(boolean par1) |
void |
updateTick(World par1World,
int par2,
int par3,
int par4,
Random par5Random)
Ticks the block if it's been scheduled
|
shouldSideBeRendered
addBlockDestroyEffects, addBlockHitEffects, addCollisionBoxesToList, addCreativeItems, canBeReplacedByLeaves, canBlockStay, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDragonDestroy, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInPass, canSilkHarvest, canSustainLeaves, canSustainPlant, collisionRayTrace, createTileEntity, dropBlockAsItem, fillWithRain, func_82506_l, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockBrightness, getBlockDropped, getBlockHardness, getBlocksMovement, getBlockTexture, getBlockTextureFromSide, getCollisionBoundingBoxFromPool, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getEnableStats, getEnchantPowerBonus, getExplosionResistance, getExplosionResistance, getFilledPercentage, getFireSpreadSpeed, getFlammability, getItemIconName, getLightOpacity, getLightValue, getLocalizedName, getMixedBrightnessForBlock, getMobilityFlag, getPickBlock, getPlayerRelativeBlockHardness, getRenderBlockPass, getRenderType, getSelectedBoundingBoxFromPool, getTickRandomly, getUnlocalizedName, getValidRotations, hasComparatorInputOverride, hasTileEntity, hasTileEntity, idPicked, isAirBlock, isAssociatedBlockID, isAssociatedBlockID, isBeaconBase, isBed, isBedFoot, isBlockBurning, isBlockFoliage, isBlockNormalCube, isBlockReplaceable, isBlockSolid, isBlockSolidOnSide, isCollidable, isFertile, isFireSource, isFlammable, isFlowerPot, isGenMineableReplaceable, isLadder, isNormalCube, isProvidingStrongPower, isProvidingWeakPower, isWood, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onBlockPreDestroy, onEntityCollidedWithBlock, onEntityWalking, onFallenUpon, onNeighborBlockChange, onNeighborTileChange, onPlantGrow, onPostBlockPlaced, quantityDropped, quantityDroppedWithBonus, recolourBlock, removeBlockByPlayer, renderAsNormalBlock, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setBurnProperties, setCreativeTab, setHardness, setLightOpacity, setLightValue, setResistance, setStepSound, setTextureName, setTickRandomly, setUnlocalizedName, tickRate, velocityToAddToEntity, weakTileChanges
public static final String[] LEAF_TYPES
public static final String[][] field_94396_b
public int getBlockColor()
getBlockColor
in class Block
public int getRenderColor(int par1)
getRenderColor
in class Block
public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
colorMultiplier
in class Block
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
breakBlock
in class Block
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
updateTick
in class Block
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
randomDisplayTick
in class Block
public int quantityDropped(Random par1Random)
quantityDropped
in class Block
public int idDropped(int par1, Random par2Random, int par3)
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
dropBlockAsItemWithChance
in class Block
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
harvestBlock
in class Block
public int damageDropped(int par1)
damageDropped
in class Block
public boolean isOpaqueCube()
isOpaqueCube
in class BlockLeavesBase
public void setGraphicsLevel(boolean par1)
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
getSubBlocks
in class Block
public void registerIcons(IconRegister par1IconRegister)
registerIcons
in class Block
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
IShearable
isShearable
in interface IShearable
item
- The itemstack that is being used, Possible to be nullworld
- The current worldx
- The X Positiony
- The Y Positionz
- The Z Positionpublic ArrayList<ItemStack> onSheared(ItemStack item, World world, int x, int y, int z, int fortune)
IShearable
onSheared
in interface IShearable
item
- The itemstack that is being used, Possible to be nullworld
- The current worldx
- The X Positiony
- The Y Positionz
- The Z Positionfortune
- The fortune level of the shears being usedpublic void beginLeavesDecay(World world, int x, int y, int z)
Block
beginLeavesDecay
in class Block
world
- The current worldx
- X Positiony
- Y Positionz
- Z Position