Class FarmlandBlock

Direct Known Subclasses:
FarmlandBlockFertilized

public class FarmlandBlock extends FarmlandBlockBase
  • Field Details

    • LIGHT_LEVEL_FOR_WEED_GROWTH

      public static final int LIGHT_LEVEL_FOR_WEED_GROWTH
      See Also:
  • Constructor Details

    • FarmlandBlock

      public FarmlandBlock(int iBlockID)
  • Method Details

    • onNeighborBlockChange

      public void onNeighborBlockChange(World world, int i, int j, int k, int iNeighborBlockID)
      Description copied from class: Block
      Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor blockID // +++START EDIT+++ FCNOTE: Only called on server // ---END EDIT---
      Overrides:
      onNeighborBlockChange in class Block
    • updateTick

      public void updateTick(World world, int i, int j, int k, Random rand)
      Description copied from class: Block
      Ticks the block if it's been scheduled // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---
      Overrides:
      updateTick in class FarmlandBlockBase
    • notifyOfPlantAboveRemoved

      public void notifyOfPlantAboveRemoved(World world, int x, int y, int z, Block plantBlock)
      Description copied from class: Block
      Called server only. Called AFTER the plant is removed, so it's no longer valid.
      Overrides:
      notifyOfPlantAboveRemoved in class Block
    • isHydrated

      protected boolean isHydrated(int iMetadata)
      Specified by:
      isHydrated in class FarmlandBlockBase
    • setFullyHydrated

      public int setFullyHydrated(int iMetadata)
      Specified by:
      setFullyHydrated in class FarmlandBlockBase
    • dryIncrementally

      protected void dryIncrementally(World world, int i, int j, int k)
      Specified by:
      dryIncrementally in class FarmlandBlockBase
    • isFertilized

      protected boolean isFertilized(IBlockAccess blockAccess, int i, int j, int k)
      Specified by:
      isFertilized in class FarmlandBlockBase
    • setFertilized

      protected void setFertilized(World world, int i, int j, int k)
      Overrides:
      setFertilized in class FarmlandBlockBase
    • getWeedsGrowthLevel

      public int getWeedsGrowthLevel(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      The growth level of weeds growing out of this block. Range of 0 to 7
      Overrides:
      getWeedsGrowthLevel in class Block
    • removeWeeds

      public void removeWeeds(World world, int i, int j, int k)
      Overrides:
      removeWeeds in class Block
    • checkForSoilReversion

      protected void checkForSoilReversion(World world, int i, int j, int k)
      Overrides:
      checkForSoilReversion in class FarmlandBlockBase
    • getHorizontalHydrationRange

      protected int getHorizontalHydrationRange(World world, int i, int j, int k)
      Overrides:
      getHorizontalHydrationRange in class FarmlandBlockBase
    • canWeedsShareSpaceWithBlockAt

      public boolean canWeedsShareSpaceWithBlockAt(World world, int i, int j, int k)
    • getWeedsGrowthLevel

      protected int getWeedsGrowthLevel(int iMetadata)
    • setWeedsGrowthLevel

      protected void setWeedsGrowthLevel(World world, int i, int j, int k, int iGrowthLevel)
    • setWeedsGrowthLevel

      protected int setWeedsGrowthLevel(int iMetadata, int iGrowthLevel)
    • checkForSnowReversion

      public boolean checkForSnowReversion(World world, int i, int j, int k, Random rand)
      Returns true if the block has been reverted to loose dirt
    • updateWeedGrowth

      public void updateWeedGrowth(World world, int i, int j, int k, Random rand)