Package btw.block.blocks
Class SaplingBlock
java.lang.Object
net.minecraft.src.Block
btw.block.blocks.PlantsBlock
api.block.blocks.CropsBlock
api.block.blocks.DailyGrowthCropsBlock
btw.block.blocks.SaplingBlock
-
Field Summary
Fields inherited from class api.block.blocks.CropsBlock
BOUNDS_HALF_WIDTH, BOUNDS_WIDTHFields inherited from class net.minecraft.src.Block
anvil, beacon, bed, bedrock, blockClay, blockConstructorCalled, blockDiamond, blockEmerald, blockGold, blockHardness, blockIcon, blockID, blockIron, blockLapis, blockMaterial, blockNetherQuartz, blockParticleGravity, blockRedstone, blockReplaced, blockReplacedBy, blockResistance, blocksList, blockSnow, bookShelf, brewingStand, brick, cactus, cake, canBlockGrass, carpet, carrot, cauldron, chest, chestTrapped, cloth, coalBlock, cobblestone, cobblestoneMossy, cobblestoneWall, cocoaPlant, commandBlock, crops, currentBlockRenderer, daylightSensor, deadBush, dirt, dispenser, doorIron, doorWood, dragonEgg, dropper, enableStats, enchantmentTable, enderChest, endPortal, endPortalFrame, fence, fenceGate, fenceIron, fire, flowerPot, furnaceBurning, furnaceIdle, glass, glowStone, grass, gravel, hardenedClay, hasKilnRecipe, hay, hopperBlock, ice, isBlockContainer, jukebox, ladder, lavaMoving, lavaStill, leaves, lever, lightOpacity, lightValue, lockedChest, maxX, maxY, maxZ, melon, melonStem, minX, minY, minZ, mobSpawner, modID, modIDSetter, mushroomBrown, mushroomCapBrown, mushroomCapRed, mushroomRed, music, mycelium, needsRandomTick, 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, textureName, thinGlass, tilledField, tnt, torchRedstoneActive, torchRedstoneIdle, torchWood, trapdoor, tripWire, tripWireSource, useNeighborBrightness, vine, waterlily, waterMoving, waterStill, web, whiteStone, wood, woodDoubleSlab, woodenButton, woodSingleSlab, workbench -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd2x2TreeGrower(AbstractTreeGrower grower, int weight) addTreeGrower(AbstractTreeGrower grower, int weight) protected voidattemptToGrow(World world, int x, int y, int z, Random rand) protected voidattemptToGrow2x2Tree(World world, int x, int y, int z) protected voidattemptToGrowTree(World world, int x, int y, int z) booleancanBeCrushedByFallingEntity(World world, int i, int j, int k, EntityFallingSand entity) protected intcanGrow2x2Tree(World world, int x, int y, int z) This method can be called from positions next to the sapling, so it needs to verify its own location as wellprotected booleancanGrowOnBlock(World world, int x, int y, int z) booleancanWeedsGrowInBlock(IBlockAccess blockAccess, int i, int j, int k) This determines whether weeds can share space with crop blocks, or grow within their own independent weed blocksprotected booleancheckFor2x2Tree(World world, int x, int y, int z) intdamageDropped(int metadata) Determines the damage on the item the block drops.getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int x, int y, int z) protected intgetIcon(int side, int metadata) From the specified side and block metadata retrieves the blocks texture.intThe type of render function that is called for this blockprotected intvoidgetSubBlocks(int metadata, CreativeTabs creativeTabs, List list) returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)getTreeGrower(Random rand) getTreeGrower2x2(Random rand) intReturns the ID of the items to drop on destruction.protected voidincrementGrowthLevel(World world, int x, int y, int z) booleanonCreativeBonemealApplied(World world, int x, int y, int z) Called when bonemeal is applied in creative mode.protected booleanvoidregisterIcons(IconRegister register) When this method is called, your block should register all the icons it needs with the given IconRegister.booleanremoveTreeGrower(String name) booleanrenderBlock(RenderBlocks renderer, int x, int y, int z) protected booleanvoidupdateTick(World world, int x, int y, int z, Random rand) Ticks the block if it's been scheduled // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---Methods inherited from class api.block.blocks.DailyGrowthCropsBlock
getBaseGrowthChance, getHasGrownToday, getHasGrownToday, setHasGrownToday, setHasGrownToday, updateFlagForGrownTodayMethods inherited from class api.block.blocks.CropsBlock
canBeGrazedOn, canGrowAtCurrentLightLevel, dropBlockAsItemWithChance, dropSeeds, getConvertsLegacySoil, getGrowthLevel, getGrowthLevel, getLightLevelForGrowth, idPicked, isFullyGrown, isFullyGrown, onGrazed, onNeighborBlockChange, renderCrops, setGrowthLevel, setGrowthLevelNoNotify, updateIfBlockStaysMethods inherited from class btw.block.blocks.PlantsBlock
attemptToApplyFertilizerTo, breakBlock, canBlockStay, canGroundCoverRestOnBlock, canPlaceBlockAt, clientBreakBlock, getCollisionBoundingBoxFromPool, getWeedsGrowthLevel, groundCoverRestingOnVisualOffset, isInBrightLight, isOpaqueCube, onBlockActivated, onEntityCollidedWithBlock, removeWeeds, renderAsNormalBlockMethods inherited from class net.minecraft.src.Block
addCollisionBoxesToList, adjustMetadataForPistonMove, adjustPathWeightOnNotBlocked, areAxesEffectiveOn, arechiselseffectiveon, arechiselseffectiveon, areHoesEffectiveOn, arePicksEffectiveOn, areShovelsEffectiveOn, attachToFacing, attemptToAffectBlockWithSoul, attemptToCombineWithFallingEntity, blocksEndermanPickup, canBeConvertedByMobSpawner, canBePistonShoveled, canBlockBePulledByPiston, canBlockBePushedByPiston, canBlocksBePlacedAgainstThisBlock, canBlockStayDuringGenerate, canBlockSuffocateEntity, canCactusGrowOnBlock, canChiselsHarvest, canCollideCheck, canContainPistonPackingToFacing, canConvertBlock, canDomesticatedCropsGrowOnBlock, canDropFromExplosion, canEndermenPickUpBlock, canFallIntoBlockAtPos, canLeashKnotOnBlock, canMobsSpawnOn, canNetherWartGrowOnBlock, canPathThroughBlock, canPlaceBlockOnSide, canPlaceBlockOnSide, canProvidePower, canRedstoneConnectToSide, canReedsGrowOnBlock, canRotateAroundBlockOnTurntableToFacing, canRotateOnTurntable, canSaplingsGrowOnBlock, canSilkHarvest, canSilkHarvest, canSpitWebReplaceBlock, canSupportFallingBlocks, canSupportLeaves, canToolsStickInBlock, canToolStickInBlockSpecialCase, canTransmitRotationHorizontallyOnTurntable, canTransmitRotationVerticallyOnTurntable, canWildVegetationGrowOnBlock, canWitherDestroyBlock, checkForFall, checkForUnstableGround, clientBlockAdded, clientNotificationOfMetadataChange, collisionRayTrace, collisionRayTraceVsBlockBounds, colorMultiplier, convertBlock, convertBlockFromMobSpawner, convertFacingToBottomTextureRotation, convertFacingToTopTextureRotation, createStackedBlock, cycleFacing, disableStats, doEndermenIgnoreNeighbors, doesBlockBreakSaw, doesBlockDropAsItemOnSaw, doesBlockHopperEject, doesBlockHopperInsert, doesExtinguishFireAbove, doesInfiniteBurnToFacing, doesItemRenderAsBlock, dropBlockAsItem, dropBlockAsItem_do, dropComponentItemsOnBadBreak, dropItemsIndividually, dropItemsOnDestroyedByExplosion, dropItemsOnDestroyedByMiningCharge, dropXpOnBlockBreak, fillWithRain, func_82506_l, getAmbientOcclusionLightValue, getAsPistonMovingBoundingBox, getBlockBoundsFromPoolForItemRender, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockBrightness, getBlockColor, getBlockHardness, getBlockIDOnInfest, getBlocksMovement, getBlockTexture, getBlockTextureFromSide, getBreakSoundName, getBreakSoundName, getBuoyancy, getCanBeCookedByKiLn, getCanBeSetOnFireDirectly, getCanBeSetOnFireDirectlyByItem, getCanBlightSpreadToBlock, getCanBlockBeIncinerated, getCanBlockBeReplacedByFire, getCanBlockLightItemOnFire, getCanGrassGrowUnderBlock, getCanGrassSpreadToBlock, getCanMyceliumSpreadToBlock, getChanceOfFireSpreadingDirectlyTo, getChickenItemFoodValue, getComparatorInputOverride, getCookTimeMultiplierInKiLn, getCreativeTabToDisplayOn, getDamageValue, getDoesFireDamageToEntities, getDoesFireDamageToEntities, getDoesStumpRemoverWorkOnBlock, getEfficientToolLevel, getEnableStats, getExplosionResistance, getExplosionResistance, getFacing, getFacing, getFixedBlockBoundsFromPool, getFullBlockBoundingBoxFromPool, getFurnaceBurnTime, getHarvestToolLevel, getHerbivoreItemFoodValue, getHopperFilterIcon, getIconByIndex, getIsBlockWarm, getIsFertilizedForPlantGrowth, getIsProblemToRemove, getItemIconName, getLightValue, getLightValueForBlock, getLocalizedName, getMapColor, getMechanicalPowerLevelProvidedToAxleAtFacing, getMetadataConversionForStrataLevel, getMixedBrightnessForBlock, getMobilityFlag, getModId, getMovementModifier, getNewMetadataRotatedAroundBlockOnTurntableToFacing, getOppositeFacing, getOutputsWhenCookedByKiln, getPigItemFoodValue, getPistonShovelEjectDirection, getPlaceSoundName, getPlaceSoundName, getPlantGrowthOnMultiplier, getPlayerRelativeBlockHardness, getPreventsFluidFlow, getRenderBlockPass, getRenderColor, getSelectedBoundingBoxFromPool, getSelectedBoundingBoxFromPool, getStackRetrievedByBlockDispenser, getStepSound, getStepSound, getStepSoundInternal, getStepSoundName, getStepSoundName, getTextureName, getTickRandomly, getUnlocalizedName, getUnlocalizedName2, getWeightOnPathBlocked, harvestBlock, hasCenterHardPointToFacing, hasCenterHardPointToFacing, hasComparatorInputOverride, hasComparatorInputOverride, hasContactPointToFullFace, hasContactPointToSlabSideFace, hasContactPointToStairNarrowVerticalFace, hasContactPointToStairShapedFace, hasFallingBlockRestingOn, hasLargeCenterHardPointToFacing, hasLargeCenterHardPointToFacing, hasMortar, hasNeighborWithMortarInContact, hasSmallCenterHardPointToFacing, hasSmallCenterHardPointToFacing, hasStickySnowNeighborInContact, hasStrata, hasTileEntity, hasWaterToSidesOrTop, hideFromEMI, hideFromEMI, infestBlock, initBlockBounds, initBlockBounds, initializeBlock, installationIntegrityTest, isAirBlock, isAssociatedBlockID, isAssociatedBlockID, isBenchOrTable, isBlockAttachedToFacing, isBlockClimbable, isBlockDestroyedByBlockDispenser, isBlockHydratedForPlantGrowthOn, isBlockInfestable, isBlockInfestedBy, isBlockRestingOnThatBelow, isBlockSolid, isBreakableBarricade, isBreakableBarricadeOpen, isCollidable, isConsideredNeighbouringWaterForReedGrowthOn, isFallingBlock, isFence, isFlowerPot, isGroundCover, isIncineratedInCrucible, isLeafBlock, isLog, isNaturalStone, isNormalCube, isNormalCube, isProvidingStrongPower, isProvidingWeakPower, isRedstoneConductor, isReplaceableVegetation, isSnowCoveringTopSurface, isStairBlock, isStickyToSnow, isWall, mobSpawnOnVerticalOffset, mouseOverRayTrace, notifyNearbyAnimalsFinishedFalling, notifyNeighborDirtDugWithImproperTool, notifyNeighborsBlockDisrupted, notifyOfFullStagePlantGrowthOn, notifyOfPlantAboveRemoved, onArrowCollide, onArrowImpact, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByMiningCharge, onBlockDestroyedByPlayer, onBlockDestroyedLandingFromFall, onBlockDestroyedWithImproperTool, onBlockEventReceived, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onBlockPreDestroy, onBlockSawed, onBlockSawed, onBrokenByPistonPush, onCookedByKiLn, onCraftedOnTurntable, onCrushedByFallingEntity, onDestroyedByFire, onDirtDugWithImproperTool, onDirtSlabDugWithImproperTool, onEntityStepsIn, onEntityWalking, onFallenUpon, onFallingUpdate, onFinishedFalling, onFinishFalling, onFluidFlowIntoBlock, onInfested, onMortarApplied, onNeighborDirtDugWithImproperTool, onNeighborDisrupted, onPlayerWalksOnBlock, onPostBlockPlaced, onPreBlockPlacedByPiston, onRemovedByBlockDispenser, onRotatedAroundBlockOnTurntableToFacing, onRotatedOnTurntable, onStartFalling, onStruckByLightning, onVegetationAboveGrazed, postBlockDestroyedByExplosion, postBlockDestroyedByMiningCharge, preBlockPlacedBy, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomUpdateTick, renderBlockAsItem, renderBlockMovedByPiston, renderBlockSecondPass, renderBlockWithTexture, renderCookingByKiLnOverlay, renderCrossHatch, renderFallingBlock, rotateAroundJAxis, rotateFacingAroundY, rotateMetadataAroundYAxis, rotateOnTurntable, scheduleCheckForFall, setAlwaysStartlesAnimals, setAxesEffectiveOn, setAxesEffectiveOn, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockMaterial, setBlockUnbreakable, setBuoyancy, setBuoyant, setChickenItemFoodValue, setChiselsCanHarvest, setChiselsCanHarvest, setChiselsEffectiveOn, setChiselsEffectiveOn, setCreativeTab, setFacing, setFacing, setFireProperties, setFireProperties, setFurnaceBurnTime, setFurnaceBurnTime, setHardness, setHerbivoreItemFoodValue, setHoesEffectiveOn, setHoesEffectiveOn, setLightOpacity, setLightValue, setMapColorsForMetadata, setModID, setNeutralBuoyant, setNonBuoyant, setOnFireDirectly, setPicksEffectiveOn, setPicksEffectiveOn, setPigItemFoodValue, setResistance, setShovelsEffectiveOn, setShovelsEffectiveOn, setStepSound, setTextureName, setTickRandomly, setUnlocalizedName, shouldDeleteTileEntityOnBlockChange, shouldFenceConnectToThisBlockToFacing, shouldOffsetPositionIfPathingOutOf, shouldPaneConnectToThisBlockToFacing, shouldPlayStandardConvertSound, shouldRenderNeighborFullFaceSide, shouldRenderNeighborHalfSlabSide, shouldRenderWhileFalling, shouldSideBeRendered, shouldSideBeRenderedOnFallingBlock, shouldWallConnectToThisBlockToFacing, shouldWallFormPostBelowThisBlock, spreadGrassToBlock, spreadMyceliumToBlock, startlesAnimalsWhenPlaced, tickRate, toggleFacing, triggersBuddy, turntableCraftingRotation, velocityToAddToEntity
-
Constructor Details
-
SaplingBlock
-
-
Method Details
-
updateTick
Description copied from class:BlockTicks the block if it's been scheduled // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---- Overrides:
updateTickin classCropsBlock
-
attemptToGrow
- Overrides:
attemptToGrowin classDailyGrowthCropsBlock
-
incrementGrowthLevel
- Overrides:
incrementGrowthLevelin classCropsBlock
-
onCreativeBonemealApplied
Called when bonemeal is applied in creative mode.- Overrides:
onCreativeBonemealAppliedin classDailyGrowthCropsBlock
-
requiresNaturalLight
protected boolean requiresNaturalLight()- Overrides:
requiresNaturalLightin classCropsBlock
-
canWeedsGrowInBlock
Description copied from class:BlockThis determines whether weeds can share space with crop blocks, or grow within their own independent weed blocks- Overrides:
canWeedsGrowInBlockin classCropsBlock
-
canGrowOnBlock
- Overrides:
canGrowOnBlockin classCropsBlock
-
canBeCrushedByFallingEntity
public boolean canBeCrushedByFallingEntity(World world, int i, int j, int k, EntityFallingSand entity) - Overrides:
canBeCrushedByFallingEntityin classBlock
-
getBlockBoundsFromPoolBasedOnState
public AxisAlignedBB getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int x, int y, int z) - Overrides:
getBlockBoundsFromPoolBasedOnStatein classCropsBlock
-
idDropped
Description copied from class:BlockReturns the ID of the items to drop on destruction.- Overrides:
idDroppedin classCropsBlock
-
damageDropped
public int damageDropped(int metadata) Description copied from class:BlockDetermines the damage on the item the block drops. Used in cloth and wood.- Overrides:
damageDroppedin classBlock
-
getCropItemID
protected int getCropItemID()- Specified by:
getCropItemIDin classCropsBlock
-
getSeedItemID
protected int getSeedItemID()- Specified by:
getSeedItemIDin classCropsBlock
-
onlyDropWhenFullyGrown
protected boolean onlyDropWhenFullyGrown()- Overrides:
onlyDropWhenFullyGrownin classCropsBlock
-
attemptToGrowTree
-
checkFor2x2Tree
-
attemptToGrow2x2Tree
-
canGrow2x2Tree
This method can be called from positions next to the sapling, so it needs to verify its own location as well -
getTreeGrower
-
getTreeGrower2x2
-
addTreeGrower
-
add2x2TreeGrower
-
removeTreeGrower
-
registerIcons
Description copied from class:BlockWhen this method is called, your block should register all the icons it needs with the given IconRegister. This is the only chance you get to register icons.- Overrides:
registerIconsin classBlock
-
getIcon
Description copied from class:BlockFrom the specified side and block metadata retrieves the blocks texture. Args: side, metadata -
getSubBlocks
Description copied from class:Blockreturns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)- Overrides:
getSubBlocksin classBlock
-
renderBlock
- Overrides:
renderBlockin classCropsBlock
-
getRenderType
@Environment(CLIENT) public int getRenderType()Description copied from class:BlockThe type of render function that is called for this block- Overrides:
getRenderTypein classBlock
-