Class AbstractFurnaceMock

All Implemented Interfaces:
io.papermc.paper.block.LockableTileState, org.bukkit.block.BlockState, org.bukkit.block.Container, org.bukkit.block.Furnace, org.bukkit.block.Lockable, org.bukkit.block.TileState, org.bukkit.inventory.BlockInventoryHolder, org.bukkit.inventory.InventoryHolder, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.persistence.PersistentDataHolder
Direct Known Subclasses:
BlastFurnaceMock, SmokerMock

public abstract class AbstractFurnaceMock extends ContainerMock implements org.bukkit.block.Furnace
Mock implementation of a Furnace.
See Also:
  • Constructor Details

    • AbstractFurnaceMock

      protected AbstractFurnaceMock(@NotNull @NotNull org.bukkit.Material material)
      Constructs a new AbstractFurnaceMock for the provided Material. Only supports Material.SMOKER, Material.FURNACE, and Material.BLAST_FURNACE.
      Parameters:
      material - The material this state is for.
    • AbstractFurnaceMock

      protected AbstractFurnaceMock(@NotNull @NotNull org.bukkit.block.Block block)
      Constructs a new AbstractFurnaceMock for the provided Block. Only supports Material.SMOKER, Material.FURNACE, and Material.BLAST_FURNACE.
      Parameters:
      block - The block this state is for.
    • AbstractFurnaceMock

      protected AbstractFurnaceMock(@NotNull @NotNull AbstractFurnaceMock state)
      Constructs a new AbstractFurnaceMock by cloning the data from an existing one.
      Parameters:
      state - The state to clone.
  • Method Details

    • createInventory

      @NotNull protected @NotNull FurnaceInventoryMock createInventory()
      Specified by:
      createInventory in class ContainerMock
      Returns:
      A new inventory, of the correct type for the state.
    • getBurnTime

      public short getBurnTime()
      Specified by:
      getBurnTime in interface org.bukkit.block.Furnace
    • setBurnTime

      public void setBurnTime(short burnTime)
      Specified by:
      setBurnTime in interface org.bukkit.block.Furnace
    • getCookTime

      public short getCookTime()
      Specified by:
      getCookTime in interface org.bukkit.block.Furnace
    • setCookTime

      public void setCookTime(short cookTime)
      Specified by:
      setCookTime in interface org.bukkit.block.Furnace
    • getCookTimeTotal

      public int getCookTimeTotal()
      Specified by:
      getCookTimeTotal in interface org.bukkit.block.Furnace
    • setCookTimeTotal

      public void setCookTimeTotal(int cookTimeTotal)
      Specified by:
      setCookTimeTotal in interface org.bukkit.block.Furnace
    • getRecipesUsed

      @NotNull public @NotNull Map<org.bukkit.inventory.CookingRecipe<?>,Integer> getRecipesUsed()
      Specified by:
      getRecipesUsed in interface org.bukkit.block.Furnace
    • getCookSpeedMultiplier

      public double getCookSpeedMultiplier()
      Specified by:
      getCookSpeedMultiplier in interface org.bukkit.block.Furnace
    • setCookSpeedMultiplier

      public void setCookSpeedMultiplier(double multiplier)
      Specified by:
      setCookSpeedMultiplier in interface org.bukkit.block.Furnace
    • getRecipeUsedCount

      public int getRecipeUsedCount(@NotNull @NotNull org.bukkit.NamespacedKey furnaceRecipe)
      Specified by:
      getRecipeUsedCount in interface org.bukkit.block.Furnace
    • hasRecipeUsedCount

      public boolean hasRecipeUsedCount(@NotNull @NotNull org.bukkit.NamespacedKey furnaceRecipe)
      Specified by:
      hasRecipeUsedCount in interface org.bukkit.block.Furnace
    • setRecipeUsedCount

      public void setRecipeUsedCount(@NotNull @NotNull org.bukkit.inventory.CookingRecipe<?> furnaceRecipe, int count)
      Specified by:
      setRecipeUsedCount in interface org.bukkit.block.Furnace
    • setRecipesUsed

      public void setRecipesUsed(@NotNull @NotNull Map<org.bukkit.inventory.CookingRecipe<?>,Integer> recipesUsed)
      Specified by:
      setRecipesUsed in interface org.bukkit.block.Furnace
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.FurnaceInventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.block.Container
      Specified by:
      getInventory in interface org.bukkit.block.Furnace
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
      Overrides:
      getInventory in class ContainerMock
    • getSnapshotInventory

      @NotNull public @NotNull org.bukkit.inventory.FurnaceInventory getSnapshotInventory()
      Specified by:
      getSnapshotInventory in interface org.bukkit.block.Container
      Specified by:
      getSnapshotInventory in interface org.bukkit.block.Furnace
      Overrides:
      getSnapshotInventory in class ContainerMock