public class BlockDoublePlant extends BlockBush implements IGrowable, IShearable
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockDoublePlant.EnumPlantType |
Block.EnumOffsetType, Block.SoundType| Modifier and Type | Field and Description |
|---|---|
static PropertyEnum |
HALF |
static PropertyEnum |
VARIANT |
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, capturedDrops, captureDrops, delegate, enableStats, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, RANDOM, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness| Constructor and Description |
|---|
BlockDoublePlant() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBlockStay(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
canGrow(World worldIn,
BlockPos pos,
IBlockState state,
boolean isClient) |
boolean |
canPlaceBlockAt(World worldIn,
BlockPos pos) |
boolean |
canUseBonemeal(World worldIn,
java.util.Random rand,
BlockPos pos,
IBlockState state) |
protected void |
checkAndDropBlock(World worldIn,
BlockPos pos,
IBlockState state) |
int |
colorMultiplier(IBlockAccess worldIn,
BlockPos pos,
int renderPass) |
protected BlockState |
createBlockState() |
int |
damageDropped(IBlockState state) |
IBlockState |
getActualState(IBlockState state,
IBlockAccess worldIn,
BlockPos pos) |
int |
getDamageValue(World worldIn,
BlockPos pos) |
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune) |
int |
getMetaFromState(IBlockState state) |
Block.EnumOffsetType |
getOffsetType() |
IBlockState |
getStateFromMeta(int meta) |
void |
getSubBlocks(Item itemIn,
CreativeTabs tab,
java.util.List list) |
BlockDoublePlant.EnumPlantType |
getVariant(IBlockAccess worldIn,
BlockPos pos) |
void |
grow(World worldIn,
java.util.Random rand,
BlockPos pos,
IBlockState state) |
void |
harvestBlock(World worldIn,
EntityPlayer player,
BlockPos pos,
IBlockState state,
TileEntity te) |
boolean |
isReplaceable(World worldIn,
BlockPos pos) |
boolean |
isShearable(ItemStack item,
IBlockAccess world,
BlockPos pos)
Checks if the object is currently shearable
Example: Sheep return false when they have no wool
|
void |
onBlockHarvested(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer player) |
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
IBlockState state,
EntityLivingBase placer,
ItemStack stack) |
java.util.List<ItemStack> |
onSheared(ItemStack item,
IBlockAccess world,
BlockPos pos,
int fortune)
Performs the shear function on this object.
|
void |
placeAt(World worldIn,
BlockPos lowerPos,
BlockDoublePlant.EnumPlantType variant,
int flags) |
boolean |
removedByPlayer(World world,
BlockPos pos,
EntityPlayer player,
boolean willHarvest)
Called when a player removes a block.
|
void |
setBlockBoundsBasedOnState(IBlockAccess worldIn,
BlockPos pos) |
canPlaceBlockOn, getBlockLayer, getCollisionBoundingBox, getPlant, getPlantType, isFullCube, isOpaqueCube, onNeighborBlockChange, updateTickaddCollisionBoxesToList, addDestroyEffects, addHitEffects, beginLeavesDecay, breakBlock, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, colorMultiplier, createStackedBlock, createTileEntity, disableStats, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMixedBrightnessForBlock, getMobilityFlag, getPickBlock, getPlayerRelativeBlockHardness, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, getStateId, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockSolid, isBurning, isCollidable, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isProvidingStrongPower, isProvidingWeakPower, isReplaceableOreGen, isSideSolid, isSolidFullCube, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, modifyAcceleration, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockPlaced, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, recolorBlock, registerBlocks, requiresUpdates, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRatepublic static final PropertyEnum VARIANT
public static final PropertyEnum HALF
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
setBlockBoundsBasedOnState in class Blockpublic BlockDoublePlant.EnumPlantType getVariant(IBlockAccess worldIn, BlockPos pos)
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt in class BlockBushpublic boolean isReplaceable(World worldIn, BlockPos pos)
isReplaceable in class Blockprotected void checkAndDropBlock(World worldIn, BlockPos pos, IBlockState state)
checkAndDropBlock in class BlockBushpublic boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
canBlockStay in class BlockBushpublic Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped in class Blockpublic int damageDropped(IBlockState state)
damageDropped in class Blockpublic int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
colorMultiplier in class Blockpublic void placeAt(World worldIn, BlockPos lowerPos, BlockDoublePlant.EnumPlantType variant, int flags)
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
onBlockPlacedBy in class Blockpublic void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
harvestBlock in class Blockpublic void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
onBlockHarvested in class Blockpublic void getSubBlocks(Item itemIn, CreativeTabs tab, java.util.List list)
getSubBlocks in class Blockpublic int getDamageValue(World worldIn, BlockPos pos)
getDamageValue in class Blockpublic boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean isClient)
public boolean canUseBonemeal(World worldIn, java.util.Random rand, BlockPos pos, IBlockState state)
canUseBonemeal in interface IGrowablepublic void grow(World worldIn, java.util.Random rand, BlockPos pos, IBlockState state)
public IBlockState getStateFromMeta(int meta)
getStateFromMeta in class Blockpublic IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
getActualState in class Blockpublic int getMetaFromState(IBlockState state)
getMetaFromState in class Blockprotected BlockState createBlockState()
createBlockState in class Blockpublic Block.EnumOffsetType getOffsetType()
getOffsetType in class Blockpublic boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
IShearableisShearable in interface IShearableitem - The itemstack that is being used, Possible to be nullworld - The current worldpos - Block's position in world.public java.util.List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
IShearableonSheared in interface IShearableitem - The itemstack that is being used, Possible to be nullworld - The current worldpos - If this is a block, the block's position in world.fortune - The fortune level of the shears being usedpublic boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
BlockremovedByPlayer in class Blockworld - The current worldpos - Block position in worldplayer - The player damaging the block, may be nullwillHarvest - 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 harvestBlock