Class FabricPlatformHelper

java.lang.Object
com.github.voidleech.oblivion.services.FabricPlatformHelper
All Implemented Interfaces:
IPlatformHelper

public class FabricPlatformHelper extends Object implements IPlatformHelper
  • 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.
    • isModEarlyLoaded

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

      public Path getResourcePath(String modId, String resource)
      Specified by:
      getResourcePath in interface IPlatformHelper
    • 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.
    • register

      public <I, T extends I> Supplier<T> register(net.minecraft.core.Registry<I> registry, String modId, String name, Supplier<T> sup)
      Description copied from interface: IPlatformHelper
      Registers an object
      Specified by:
      register in interface IPlatformHelper
      Returns:
    • addMix

      public void addMix(Supplier<? extends net.minecraft.world.item.alchemy.Potion> input, Supplier<? extends net.minecraft.world.item.Item> ingredient, Supplier<? extends net.minecraft.world.item.alchemy.Potion> output)
      Description copied from interface: IPlatformHelper
      Adds a brewing mix.
      Specified by:
      addMix in interface IPlatformHelper
    • addBrewingRecipe

      public void addBrewingRecipe(Supplier<? extends net.minecraft.world.item.crafting.Ingredient> input, Supplier<? extends net.minecraft.world.item.crafting.Ingredient> ingredient, Supplier<? extends net.minecraft.world.item.ItemStack> output)
      Description copied from interface: IPlatformHelper
      Adds a brewing recipe. For brewing that has a non-potion as input or output. Use addMix otherwise.
      Specified by:
      addBrewingRecipe in interface IPlatformHelper
    • addCompostable

      public void addCompostable(Supplier<? extends net.minecraft.world.level.ItemLike> item, float chance)
      Description copied from interface: IPlatformHelper
      Adds an item to the composter.
      Specified by:
      addCompostable in interface IPlatformHelper
      Parameters:
      item - to be composted.
      chance - to produce a layer in the composter.
    • addFurnaceFuel

      public void addFurnaceFuel(Supplier<? extends net.minecraft.world.level.ItemLike> item, int burnTime)
      Description copied from interface: IPlatformHelper
      Adds an item as furnace fuel. Use only when getBurnTime somehow isn't available to override.
      Specified by:
      addFurnaceFuel in interface IPlatformHelper
      Parameters:
      item - to be used as fuel
      burnTime - ticks to burn. A standard furnace recipe takes 200 ticks.
    • registerConfig

      public void registerConfig(net.minecraftforge.common.ForgeConfigSpec spec, net.minecraftforge.fml.config.ModConfig.Type type, String modId)
      Description copied from interface: IPlatformHelper
      Registers a config
      Specified by:
      registerConfig in interface IPlatformHelper
      type - Side that the config applies to
    • addPack

      public void addPack(Registration.PackData pack, String modId)
      Description copied from interface: IPlatformHelper
      Registers an addition resource/data pack
      Specified by:
      addPack in interface IPlatformHelper