Interface IPlatformHelper

All Known Implementing Classes:
ForgePlatformHelper

public interface IPlatformHelper
Common platform helper service interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getBurnTimeOf(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
    Gets the burn time of a given item stack
    default String
    Gets the name of the environment type as a string.
    Gets the name of the current platform
    net.minecraft.world.item.ItemStack
    getRemainingStackAfterUsage(net.minecraft.world.item.ItemStack usedStack)
    Gets the item stack that remains after usage of the given item stack.
    boolean
    Check if the game is currently in a development environment.
    boolean
    Checks if a mod with the given id is loaded.
  • Method Details

    • getPlatformName

      String getPlatformName()
      Gets the name of the current platform
      Returns:
      The name of the current platform.
    • isModLoaded

      boolean isModLoaded(String modId)
      Checks if a mod with the given id is loaded.
      Parameters:
      modId - The mod to check if it is loaded.
      Returns:
      True if the mod is loaded, false otherwise.
    • isDevelopmentEnvironment

      boolean isDevelopmentEnvironment()
      Check if the game is currently in a development environment.
      Returns:
      True if in a development environment, false otherwise.
    • getEnvironmentName

      default String getEnvironmentName()
      Gets the name of the environment type as a string.
      Returns:
      The name of the environment type.
    • getBurnTimeOf

      int getBurnTimeOf(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
      Gets the burn time of a given item stack
      Parameters:
      level - level
      stack - item stack
      Returns:
      burn time of the given item stack
    • getRemainingStackAfterUsage

      net.minecraft.world.item.ItemStack getRemainingStackAfterUsage(net.minecraft.world.item.ItemStack usedStack)
      Gets the item stack that remains after usage of the given item stack.
      Parameters:
      usedStack - used item stack
      Returns:
      remaining item stack after usage