Class DirtSlabBlock


public class DirtSlabBlock extends AttachedSlabBlock
  • Field Details

  • Constructor Details

    • DirtSlabBlock

      public DirtSlabBlock(int iBlockID)
  • Method Details

    • 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 Block
    • damageDropped

      public int damageDropped(int iMetadata)
      Description copied from class: Block
      Determines the damage on the item the block drops. Used in cloth and wood.
      Overrides:
      damageDropped in class Block
    • idDropped

      public int idDropped(int iMetadata, Random random, int iFortuneModifier)
      Description copied from class: Block
      Returns the ID of the items to drop on destruction.
      Overrides:
      idDropped in class Block
    • getMovementModifier

      public float getMovementModifier(World world, int i, int j, int k)
      Overrides:
      getMovementModifier in class Block
    • dropComponentItemsOnBadBreak

      public boolean dropComponentItemsOnBadBreak(World world, int i, int j, int k, int iMetadata, float fChanceOfDrop)
      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 Block
    • getCanGrassSpreadToBlock

      public boolean getCanGrassSpreadToBlock(World world, int i, int j, int k)
      Overrides:
      getCanGrassSpreadToBlock in class Block
    • spreadGrassToBlock

      public boolean spreadGrassToBlock(World world, int x, int y, int z)
      Overrides:
      spreadGrassToBlock in class Block
    • getCanMyceliumSpreadToBlock

      public boolean getCanMyceliumSpreadToBlock(World world, int i, int j, int k)
      Overrides:
      getCanMyceliumSpreadToBlock in class Block
    • spreadMyceliumToBlock

      public boolean spreadMyceliumToBlock(World world, int x, int y, int z)
      Overrides:
      spreadMyceliumToBlock in class Block
    • attemptToCombineWithFallingEntity

      public boolean attemptToCombineWithFallingEntity(World world, int i, int j, int k, EntityFallingSand entity)
      Description copied from class: Block
      returns true if the block has combined with the entity
      Overrides:
      attemptToCombineWithFallingEntity in class Block
    • onAnchorBlockLost

      protected void onAnchorBlockLost(World world, int i, int j, int k)
      Specified by:
      onAnchorBlockLost in class AttachedSlabBlock
    • getCombinedBlockID

      public int getCombinedBlockID(int iMetadata)
      Specified by:
      getCombinedBlockID in class SlabBlock
    • getCombinedMetadata

      public int getCombinedMetadata(int iMetadata)
      Overrides:
      getCombinedMetadata in class SlabBlock
    • canBePistonShoveled

      public boolean canBePistonShoveled(World world, int i, int j, int k)
      Overrides:
      canBePistonShoveled in class Block
    • canSilkHarvest

      protected boolean canSilkHarvest()
      Description copied from class: Block
      Return true if a player with Silk Touch can harvest this block directly, and not its normal drops.
      Overrides:
      canSilkHarvest in class Block
    • 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 SlabBlock
    • canBeGrazedOn

      public boolean canBeGrazedOn(IBlockAccess blockAccess, int i, int j, int k, EntityAnimal byAnimal)
      Overrides:
      canBeGrazedOn in class Block
    • onGrazed

      public void onGrazed(World world, int i, int j, int k, EntityAnimal animal)
      Overrides:
      onGrazed in class Block
    • onVegetationAboveGrazed

      public void onVegetationAboveGrazed(World world, int i, int j, int k, EntityAnimal animal)
      Overrides:
      onVegetationAboveGrazed in class Block
    • onBlockDestroyedWithImproperTool

      public void onBlockDestroyedWithImproperTool(World world, EntityPlayer player, int i, int j, int k, int iMetadata)
      Description copied from class: Block
      Called on server only, after the block is removed from the world
      Overrides:
      onBlockDestroyedWithImproperTool in class Block
    • onBlockDestroyedByExplosion

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

      protected void onNeighborDirtDugWithImproperTool(World world, int i, int j, int k, int iToFacing)
      Overrides:
      onNeighborDirtDugWithImproperTool in class Block
    • getSubtype

      public int getSubtype(IBlockAccess blockAccess, int i, int j, int k)
    • getSubtype

      public int getSubtype(int iMetadata)
    • setSubtype

      public void setSubtype(World world, int i, int j, int k, int iSubtype)
    • 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 Block
    • getIcon

      @Environment(CLIENT) public Icon getIcon(int iSide, int iMetadata)
      Description copied from class: Block
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block
    • getBlockTexture

      @Environment(CLIENT) public Icon getBlockTexture(IBlockAccess blockAccess, int i, int j, int k, int iSide)
      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 Block
    • getSideOverlayTexture

      @Environment(CLIENT) public Icon getSideOverlayTexture(IBlockAccess blockAccess, int i, int j, int k)
    • getSubBlocks

      @Environment(CLIENT) public void getSubBlocks(int iBlockID, CreativeTabs creativeTabs, List list)
      Description copied from class: Block
      returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
      Overrides:
      getSubBlocks in class Block
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderer, int i, int j, int k)
      Overrides:
      renderBlock in class Block
    • renderBlockAsItem

      @Environment(CLIENT) public void renderBlockAsItem(RenderBlocks renderBlocks, int iItemDamage, float fBrightness)
      Overrides:
      renderBlockAsItem in class Block
    • colorMultiplier

      @Environment(CLIENT) public int colorMultiplier(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called when first determining what to render.
      Overrides:
      colorMultiplier in class Block