Class MyceliumBlock


public class MyceliumBlock extends BlockMycelium
  • Constructor Details

    • MyceliumBlock

      public MyceliumBlock(int blockID)
  • Method Details

    • updateTick

      public void updateTick(World world, int x, int y, int z, 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 BlockMycelium
    • createStackedBlock

      protected ItemStack createStackedBlock(int metadata)
      Description copied from class: Block
      Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null. // +++START EDIT+++ FCNOTE: This is the function used to create the silk-touch drop // ---END EDIT---
      Overrides:
      createStackedBlock in class Block
    • idDropped

      public int idDropped(int metadata, Random rand, int fortuneModifier)
      Description copied from class: Block
      Returns the ID of the items to drop on destruction.
      Overrides:
      idDropped in class BlockMycelium
    • dropComponentItemsOnBadBreak

      public boolean dropComponentItemsOnBadBreak(World world, int x, int y, int z, int metadata, float chanceOfDrop)
      Description copied from class: Block
      Called by explosions and improper tool use. Should return true if the block processes its own drops through this method, false otherwise Note that the block may no longer be at the specified position when this is called
      Overrides:
      dropComponentItemsOnBadBreak in class BlockMycelium
    • onBlockDestroyedWithImproperTool

      public void onBlockDestroyedWithImproperTool(World world, EntityPlayer player, int x, int y, int z, int metadata)
      Description copied from class: Block
      Called on server only, after the block is removed from the world
      Overrides:
      onBlockDestroyedWithImproperTool in class BlockMycelium
    • onBlockDestroyedByExplosion

      public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion)
      Description copied from class: Block
      // +++START EDIT+++ Called upon the block being destroyed by an explosion // ---END EDIT---
      Overrides:
      onBlockDestroyedByExplosion in class BlockMycelium
    • onNeighborDirtDugWithImproperTool

      protected void onNeighborDirtDugWithImproperTool(World world, int x, int y, int z, int toFacing)
      Overrides:
      onNeighborDirtDugWithImproperTool in class BlockMycelium
    • canBePistonShoveled

      public boolean canBePistonShoveled(World world, int x, int y, int z)
      Overrides:
      canBePistonShoveled in class BlockMycelium
    • canMobsSpawnOn

      public boolean canMobsSpawnOn(World world, int x, int y, int z)
      Description copied from class: Block
      This is only a first-pass indicator as to whether ANY mobs can spawn on top of the block, so stuff like leaves where only Jungle Spiders can spawn on them, should still return true.
      Overrides:
      canMobsSpawnOn in class BlockMycelium
    • canBeGrazedOn

      public boolean canBeGrazedOn(IBlockAccess blockAccess, int x, int y, int z, EntityAnimal animal)
      Overrides:
      canBeGrazedOn in class BlockMycelium
    • onGrazed

      public void onGrazed(World world, int x, int y, int z, EntityAnimal animal)
      Overrides:
      onGrazed in class BlockMycelium
    • onVegetationAboveGrazed

      public void onVegetationAboveGrazed(World world, int x, int y, int z, EntityAnimal animal)
      Overrides:
      onVegetationAboveGrazed in class BlockMycelium
    • getCanBlightSpreadToBlock

      public boolean getCanBlightSpreadToBlock(World world, int x, int y, int z, int blightLevel)
      Overrides:
      getCanBlightSpreadToBlock in class BlockMycelium
    • canConvertBlock

      public boolean canConvertBlock(ItemStack stack, World world, int x, int y, int z)
      Overrides:
      canConvertBlock in class BlockMycelium
    • convertBlock

      public boolean convertBlock(ItemStack stack, World world, int x, int y, int z, int fromSide)
      Description copied from class: Block
      Returns false if the block has not been replaced with another, and should be removed
      Overrides:
      convertBlock in class BlockMycelium
    • canMyceliumSurviveAtLocation

      public static boolean canMyceliumSurviveAtLocation(World world, int x, int y, int z)
    • checkForMyceliumSpreadFromLocation

      public static void checkForMyceliumSpreadFromLocation(World world, int x, int y, int z)
    • attempToSpreadMyceliumToLocation

      public static boolean attempToSpreadMyceliumToLocation(World world, int x, int y, int z)
    • isSparse

      public boolean isSparse(IBlockAccess blockAccess, int x, int y, int z)
      Overrides:
      isSparse in class BlockMycelium
    • isSparse

      public boolean isSparse(int metadata)
      Overrides:
      isSparse in class BlockMycelium
    • setSparse

      public void setSparse(World world, int x, int y, int z)
      Overrides:
      setSparse in class BlockMycelium
    • setFullyGrown

      public void setFullyGrown(World world, int x, int y, int z)
      Overrides:
      setFullyGrown in class BlockMycelium
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister register)
      Description copied from class: Block
      When 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:
      registerIcons in class BlockMycelium
    • getBlockTexture

      @Environment(CLIENT) public Icon getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side)
      Description copied from class: Block
      Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
      Overrides:
      getBlockTexture in class BlockMycelium
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderer, int x, int y, int z)
      Overrides:
      renderBlock in class BlockMycelium