Class ForgePlatformHelper

java.lang.Object
de.cech12.unlitcampfire.platform.ForgePlatformHelper
All Implemented Interfaces:
IPlatformHelper

public class ForgePlatformHelper extends Object implements IPlatformHelper
The platform service implementation for Forge.
  • Constructor Details

    • ForgePlatformHelper

      public ForgePlatformHelper()
  • Method Details

    • getPlatformName

      public String getPlatformName()
      Description copied from interface: IPlatformHelper
      Gets the name of the current platform
      Specified by:
      getPlatformName in interface IPlatformHelper
      Returns:
      The name of the current platform.
    • isModLoaded

      public boolean isModLoaded(String modId)
      Description copied from interface: IPlatformHelper
      Checks if a mod with the given id is loaded.
      Specified by:
      isModLoaded in interface IPlatformHelper
      Parameters:
      modId - The mod to check if it is loaded.
      Returns:
      True if the mod is loaded, false otherwise.
    • isDevelopmentEnvironment

      public boolean isDevelopmentEnvironment()
      Description copied from interface: IPlatformHelper
      Check if the game is currently in a development environment.
      Specified by:
      isDevelopmentEnvironment in interface IPlatformHelper
      Returns:
      True if in a development environment, false otherwise.
    • getBurnTimeOf

      public int getBurnTimeOf(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IPlatformHelper
      Gets the burn time of a given item stack
      Specified by:
      getBurnTimeOf in interface IPlatformHelper
      Parameters:
      level - level
      stack - item stack
      Returns:
      burn time of the given item stack
    • getRemainingStackAfterUsage

      public net.minecraft.world.item.ItemStack getRemainingStackAfterUsage(net.minecraft.world.item.ItemStack usedStack)
      Description copied from interface: IPlatformHelper
      Gets the item stack that remains after usage of the given item stack.
      Specified by:
      getRemainingStackAfterUsage in interface IPlatformHelper
      Parameters:
      usedStack - used item stack
      Returns:
      remaining item stack after usage