Class OvenBlock

All Implemented Interfaces:
ITileEntityProvider
Direct Known Subclasses:
LooseOvenBlockBurning, LooseOvenBlockIdle

public class OvenBlock extends BlockFurnace
  • Field Details

    • modelBlockInterior

      protected final BlockModel modelBlockInterior
    • clickYTopPortion

      protected final float clickYTopPortion
      See Also:
    • clickYBottomPortion

      protected final float clickYBottomPortion
      See Also:
    • isMortared

      protected boolean isMortared
      true if this is a mortared oven
    • isRenderingInterior

      @Environment(CLIENT) protected boolean isRenderingInterior
  • Constructor Details

    • OvenBlock

      protected OvenBlock(int iBlockID, boolean bIsLit, boolean bIsMortared)
  • Method Details

    • createNewTileEntity

      public TileEntity createNewTileEntity(World world)
      Description copied from class: BlockFurnace
      Returns a new instance of a block's tile entity class. Called on placing the block.
      Specified by:
      createNewTileEntity in interface ITileEntityProvider
      Overrides:
      createNewTileEntity in class BlockFurnace
    • onBlockActivated

      public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int iFacing, float fXClick, float fYClick, float fZClick)
      Description copied from class: BlockFurnace
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class BlockFurnace
    • onBlockAdded

      public void onBlockAdded(World world, int i, int j, int k)
      Description copied from class: BlockFurnace
      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
      onBlockAdded in class BlockFurnace
    • onMortarApplied

      public boolean onMortarApplied(World world, int i, int j, int k)
      Description copied from class: Block
      Should return true if mortar has been successfully applied to block.
      Overrides:
      onMortarApplied in class Block
    • quantityDropped

      public int quantityDropped(Random rand)
      Description copied from class: Block
      Returns the quantity of items to drop on block destruction.
      Overrides:
      quantityDropped in class BlockFurnace
    • 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 BlockFurnace
    • canSilkHarvest

      protected boolean canSilkHarvest(int iMetadata)
      Overrides:
      canSilkHarvest in class Block
    • dropBlockAsItemWithChance

      public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
      Drops the block items with a specified chance of dropping the specified items
      Overrides:
      dropBlockAsItemWithChance 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
    • canPlaceBlockAt

      public boolean canPlaceBlockAt(World world, int i, int j, int k)
      Description copied from class: Block
      Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
      Overrides:
      canPlaceBlockAt in class Block
    • onNeighborBlockChange

      public void onNeighborBlockChange(World world, int i, int j, int k, int iBlockID)
      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
    • hasLargeCenterHardPointToFacing

      public boolean hasLargeCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency)
      Description copied from class: Block
      large attachment points that can support a full block width
      Overrides:
      hasLargeCenterHardPointToFacing in class Block
    • updateFurnaceBlockState

      public void updateFurnaceBlockState(boolean bBurning, World world, int i, int j, int k, boolean bHasContents)
      Description copied from class: BlockFurnace
      Update which block ID the furnace is using depending on whether or not it is burning
      Overrides:
      updateFurnaceBlockState in class BlockFurnace
    • getCanBeSetOnFireDirectly

      public boolean getCanBeSetOnFireDirectly(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      Whether the block itself can be set on fire, rather than a neighboring block being set to a fire block
      Overrides:
      getCanBeSetOnFireDirectly in class Block
    • setOnFireDirectly

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

      public int getChanceOfFireSpreadingDirectlyTo(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getChanceOfFireSpreadingDirectlyTo in class Block
    • renderAsNormalBlock

      public boolean renderAsNormalBlock()
      Description copied from class: Block
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
      renderAsNormalBlock in class Block
    • getIDDroppedOnSilkTouch

      protected int getIDDroppedOnSilkTouch()
      Overrides:
      getIDDroppedOnSilkTouch in class BlockFurnace
    • getIsBlockWarm

      public boolean getIsBlockWarm(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      Returns true if the block is warm enough to melt nearby snow or ice
      Overrides:
      getIsBlockWarm in class Block
    • doesBlockHopperInsert

      public boolean doesBlockHopperInsert(World world, int i, int j, int k)
      Description copied from class: Block
      Applies to Hopper inserting items directly into the block's inventory. This does not ensure the block has a valid inventory, it's just a first-pass chance to block such behavior.
      Overrides:
      doesBlockHopperInsert in class Block
    • getComparatorInputOverride

      public int getComparatorInputOverride(World world, int x, int y, int z, int side)
      Description copied from class: BlockFurnace
      If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal strength when this block inputs to a comparator.
      Overrides:
      getComparatorInputOverride in class BlockFurnace
    • hasMortar

      public boolean hasMortar(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      hasMortar in class Block
    • isNormalCube

      public boolean isNormalCube(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      isNormalCube in class Block
    • isValidCookItem

      public boolean isValidCookItem(ItemStack stack)
    • isMortared

      public boolean isMortared()
      true if this oven is mortared
    • 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 BlockFurnace
    • idPicked

      @Environment(CLIENT) public int idPicked(World world, int i, int j, int k)
      Description copied from class: Block
      only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) // +++START EDIT+++ FCNOTE: Client only // ---END EDIT---
      Overrides:
      idPicked in class BlockFurnace
    • 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 BlockFurnace
    • shouldSideBeRendered

      @Environment(CLIENT) public boolean shouldSideBeRendered(IBlockAccess blockAccess, int iNeighborI, int iNeighborJ, int iNeighborK, int iSide)
      Overrides:
      shouldSideBeRendered in class Block
    • renderBlock

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

      @Environment(CLIENT) public void renderBlockSecondPass(RenderBlocks renderer, int i, int j, int k, boolean bFirstPassResult)
      Description copied from class: Block
      If the block has a second pass, like a kiln cooking overlay texture, it should Override this method. This method does not call the overlay by default to cut down on rendering time, since this function is called by every single loaded block. Note that this function is necessary to prevent potential recursion within RenderBlock, if it were to call its own overlays directly, and then potentially get called with a texture overlay itself through RenderBlockWithTexture.
      Overrides:
      renderBlockSecondPass in class Block
    • getMixedBrightnessForBlock

      @Environment(CLIENT) public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Description copied from class: Block
      Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids
      Overrides:
      getMixedBrightnessForBlock in class Block
    • renderBlockWithTexture

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

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

      @Environment(CLIENT) public void randomDisplayTick(World world, int x, int y, int z, Random rand)
      Description copied from class: Block
      A randomly called display update to be able to add particles or other items for display
      Overrides:
      randomDisplayTick in class BlockFurnace
    • renderBlockMovedByPiston

      @Environment(CLIENT) public void renderBlockMovedByPiston(RenderBlocks renderBlocks, int i, int j, int k)
      Overrides:
      renderBlockMovedByPiston in class Block