Class FabricPlatformHelper

java.lang.Object
de.cech12.bucketlib.platform.FabricPlatformHelper
All Implemented Interfaces:
IPlatformHelper

public class FabricPlatformHelper extends Object implements IPlatformHelper
The platform service implementation for Fabric.
  • Constructor Details

    • FabricPlatformHelper

      public FabricPlatformHelper()
  • 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.
    • getCurrentLevel

      public net.minecraft.world.level.Level getCurrentLevel()
      Description copied from interface: IPlatformHelper
      Gets the current level.
      Specified by:
      getCurrentLevel in interface IPlatformHelper
      Returns:
      the current level.
    • getToolsAndUtilitiesTab

      public net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> getToolsAndUtilitiesTab()
      Description copied from interface: IPlatformHelper
      Gets the TOOLS_AND_UTILITIES creative tab.
      Specified by:
      getToolsAndUtilitiesTab in interface IPlatformHelper
      Returns:
      TOOLS_AND_UTILITIES creative tab.
    • getMilkTranslationKey

      public String getMilkTranslationKey()
      Description copied from interface: IPlatformHelper
      Gets the translation key for milk.
      Specified by:
      getMilkTranslationKey in interface IPlatformHelper
      Returns:
      translation key for milk
    • getBurnTime

      public int getBurnTime(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.crafting.RecipeType<?> recipeType)
      Description copied from interface: IPlatformHelper
      Gets the burn time of an ItemStack.
      Specified by:
      getBurnTime in interface IPlatformHelper
      Returns:
      burn time of an ItemStack