Interface FurnaceView

All Superinterfaces:
InventoryView

public interface FurnaceView extends InventoryView
An instance of InventoryView which provides extra methods related to furnace view data.
  • Method Details

    • getCookTime

      float getCookTime()
      The cook time for this view.

      See Furnace.getCookTime() for more information.

      Returns:
      a number between 0 and 1
    • getBurnTime

      float getBurnTime()
      The total burn time for this view.

      See Furnace.getBurnTime() for more information.

      Returns:
      a number between 0 and 1
    • isBurning

      boolean isBurning()
      Checks whether or not the furnace is burning
      Returns:
      true given that the furnace is burning
    • setCookTime

      void setCookTime(int cookProgress, int cookDuration)
      Sets the cook time

      Setting cook time requires manipulation of both cookProgress and cookDuration. This method does a simple division to get total progress within the furnaces visual duration bar. For a clear visual effect (cookProgress / cookDuration) should return a number between 0 and 1 inclusively.

      Parameters:
      cookProgress - the current of the cooking
      cookDuration - the total cook time
    • setBurnTime

      void setBurnTime(int burnProgress, int burnDuration)
      Sets the burn time

      Setting burn time requires manipulation of both burnProgress and burnDuration. This method does a simple division to get total progress within the furnaces visual burning bar. For a clear visual effect (burnProgress / burnDuration) should return a number between 0 and 1 inclusively.

      Parameters:
      burnProgress - the progress towards the burnDuration
      burnDuration - the total duration the view should be lit