public class BlockShearableDoublePlant extends BlockDoublePlant implements IShearable
Block.EnumOffsetType, Block.Properties, Block.RenderSideCacheKey
Modifier and Type | Field and Description |
---|---|
static EnumProperty<DoubleBlockHalf> |
field_208063_b |
HALF
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockResistance, blocksMovement, capturedDrops, captureDrops, harvesters, lightValue, LOGGER, material, needsRandomTick, RANDOM, soundType, stateContainer
delegate
Constructor and Description |
---|
BlockShearableDoublePlant(Block p_i48335_1_,
Block.Properties p_i48335_2_) |
Modifier and Type | Method and Description |
---|---|
IItemProvider |
getItemDropped(IBlockState state,
World worldIn,
BlockPos pos,
int fortune) |
protected void |
harvest(IBlockState p_196391_1_,
World p_196391_2_,
BlockPos p_196391_3_,
ItemStack p_196391_4_) |
boolean |
isReplaceable(IBlockState state,
BlockItemUseContext useContext) |
boolean |
isShearable(ItemStack item,
IWorldReader world,
BlockPos pos)
Checks if the object is currently shearable
Example: Sheep return false when they have no wool
|
java.util.List<ItemStack> |
onSheared(ItemStack item,
IWorld world,
BlockPos pos,
int fortune)
Performs the shear function on this object.
|
fillStateContainer, getOffsetType, getPositionRandom, getStateForPlacement, harvestBlock, isValidPosition, onBlockHarvested, onBlockPlacedBy, placeAt, updatePostPlacement
getBlockFaceShape, getOpacity, getPlant, getRenderLayer, isFullCube, isValidGround
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, canProvidePower, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, doesSideFillSquare, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillItemGroup, fillWithRain, getAmbientOcclusionLightValue, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getDefaultState, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getItemsToDropCount, getLightValue, getMapColor, getMaterial, getNameTextComponent, getOffset, getPackedLightmapCoords, getPlayerRelativeBlockHardness, getPushReaction, getRaytraceShape, getRenderShape, getRenderType, getShape, getSilkTouchDrop, getSlipperiness, getSlipperiness, getSoundType, getStateById, getStateContainer, getStateId, getStrongPower, getTickRandomly, getTranslationKey, getValidBlockForPosition, getWeakPower, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, isAir, isBlockNormalCube, isCollidable, isCollidable, isDirt, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isIn, isNormalCube, isOpaque, isOpaqueCube, isRock, isSideInvisible, isSolid, isTopSolid, isVariableOpacity, makeCuboidShape, mirror, needsPostProcessing, neighborChanged, nudgeEntitiesWithNewState, onBlockActivated, onBlockAdded, onBlockClicked, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onReplaced, propagatesSkylightDown, quantityDropped, randomTick, registerBlocks, replaceBlock, rotate, setDefaultState, shouldSideBeRendered, spawnAsEntity, tick, tickRate, toString, updateDiagonalNeighbors, updateNeighbors, useNeighborBrightness
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPlantType
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
public static final EnumProperty<DoubleBlockHalf> field_208063_b
public BlockShearableDoublePlant(Block p_i48335_1_, Block.Properties p_i48335_2_)
public boolean isReplaceable(IBlockState state, BlockItemUseContext useContext)
isReplaceable
in class Block
protected void harvest(IBlockState p_196391_1_, World p_196391_2_, BlockPos p_196391_3_, ItemStack p_196391_4_)
harvest
in class BlockDoublePlant
public IItemProvider getItemDropped(IBlockState state, World worldIn, BlockPos pos, int fortune)
getItemDropped
in class BlockDoublePlant
public boolean isShearable(ItemStack item, IWorldReader world, BlockPos pos)
IShearable
isShearable
in interface IShearable
item
- The ItemStack that is being used, may be empty.world
- The current world.pos
- Block's position in world.public java.util.List<ItemStack> onSheared(ItemStack item, IWorld world, BlockPos pos, int fortune)
IShearable
onSheared
in interface IShearable
item
- The ItemStack that is being used, may be empty.world
- The current world.pos
- If this is a block, the block's position in world.fortune
- The fortune level of the shears being used.