public class BlockDoublePlant extends BlockBush implements IGrowable, IShearable
Modifier and Type | Class and Description |
---|---|
static class |
BlockDoublePlant.EnumBlockHalf |
static class |
BlockDoublePlant.EnumPlantType |
Block.EnumOffsetType
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
static PropertyEnum<EnumFacing> |
FACING |
static PropertyEnum<BlockDoublePlant.EnumBlockHalf> |
HALF |
static PropertyEnum<BlockDoublePlant.EnumPlantType> |
VARIANT |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightness
delegate
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) |
protected BlockStateContainer |
createBlockState() |
int |
damageDropped(IBlockState state) |
IBlockState |
getActualState(IBlockState state,
IBlockAccess worldIn,
BlockPos pos) |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
ItemStack |
getItem(World worldIn,
BlockPos pos,
IBlockState state) |
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<ItemStack> list) |
void |
grow(World worldIn,
java.util.Random rand,
BlockPos pos,
IBlockState state) |
void |
harvestBlock(World worldIn,
EntityPlayer player,
BlockPos pos,
IBlockState state,
TileEntity te,
ItemStack stack) |
boolean |
isReplaceable(IBlockAccess 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(IBlockState state,
World world,
BlockPos pos,
EntityPlayer player,
boolean willHarvest)
Called when a player removes a block.
|
canSustainBush, getBlockLayer, getCollisionBoundingBox, getPlant, getPlantType, isFullCube, isOpaqueCube, neighborChanged, updateTick
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, beginLeavesDecay, breakBlock, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, createStackedBlock, createTileEntity, disableStats, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillWithRain, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMobilityFlag, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSoundType, getStateById, getStateId, getStrongPower, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isFullyOpaque, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, modifyAcceleration, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockPlaced, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, rayTrace, recolorBlock, registerBlocks, requiresUpdates, rotateBlock, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRate, toString, withMirror, withRotation
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public static final PropertyEnum<BlockDoublePlant.EnumPlantType> VARIANT
public static final PropertyEnum<BlockDoublePlant.EnumBlockHalf> HALF
public static final PropertyEnum<EnumFacing> FACING
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox
in class BlockBush
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt
in class BlockBush
public boolean isReplaceable(IBlockAccess worldIn, BlockPos pos)
isReplaceable
in class Block
protected void checkAndDropBlock(World worldIn, BlockPos pos, IBlockState state)
checkAndDropBlock
in class BlockBush
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
canBlockStay
in class BlockBush
@Nullable public Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped
in class Block
public int damageDropped(IBlockState state)
damageDropped
in class Block
public 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 Block
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, @Nullable ItemStack stack)
harvestBlock
in class Block
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
onBlockHarvested
in class Block
public void getSubBlocks(Item itemIn, CreativeTabs tab, java.util.List<ItemStack> list)
getSubBlocks
in class Block
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
public 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 IGrowable
public void grow(World worldIn, java.util.Random rand, BlockPos pos, IBlockState state)
public IBlockState getStateFromMeta(int meta)
getStateFromMeta
in class Block
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
getActualState
in class Block
public int getMetaFromState(IBlockState state)
getMetaFromState
in class Block
protected BlockStateContainer createBlockState()
createBlockState
in class Block
public Block.EnumOffsetType getOffsetType()
getOffsetType
in class Block
public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
IShearable
isShearable
in interface IShearable
item
- 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)
IShearable
onSheared
in interface IShearable
item
- 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(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
Block
removedByPlayer
in class Block
state
- The current state.world
- 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