Class FabricPlatformHelper
java.lang.Object
com.github.voidleech.oblivion.services.FabricPlatformHelper
- All Implemented Interfaces:
IPlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBrewingRecipe(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) Adds a brewing recipe.voidaddCompostable(Supplier<? extends net.minecraft.world.level.ItemLike> item, float chance) Adds an item to the composter.voidaddFurnaceFuel(Supplier<? extends net.minecraft.world.level.ItemLike> item, int burnTime) Adds an item as furnace fuel.voidaddMix(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) Adds a brewing mix.voidaddPack(Registration.PackData pack, String modId) Registers an addition resource/data packGets the name of the current platformgetResourcePath(String modId, String resource) booleanCheck if the game is currently in a development environment.booleanisModEarlyLoaded(String modId) Checks if a mod with the given id is loaded early.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.<I,T extends I>
Supplier<T>Registers an objectvoidregisterConfig(net.minecraftforge.common.ForgeConfigSpec spec, net.minecraftforge.fml.config.ModConfig.Type type, String modId) Registers a configMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.voidleech.oblivion.services.services.IPlatformHelper
getEnvironmentName
-
Constructor Details
-
FabricPlatformHelper
public FabricPlatformHelper()
-
-
Method Details
-
getPlatformName
Description copied from interface:IPlatformHelperGets the name of the current platform- Specified by:
getPlatformNamein interfaceIPlatformHelper- Returns:
- The name of the current platform.
-
isModLoaded
Description copied from interface:IPlatformHelperChecks if a mod with the given id is loaded.- Specified by:
isModLoadedin interfaceIPlatformHelper- Parameters:
modId- The mod to check if it is loaded.- Returns:
- True if the mod is loaded, false otherwise.
-
isModEarlyLoaded
Description copied from interface:IPlatformHelperChecks if a mod with the given id is loaded early.- Specified by:
isModEarlyLoadedin interfaceIPlatformHelper- Parameters:
modId- The mod to check if it is loaded.- Returns:
- True if the mod is loaded, false otherwise.
-
getResourcePath
- Specified by:
getResourcePathin interfaceIPlatformHelper
-
isDevelopmentEnvironment
public boolean isDevelopmentEnvironment()Description copied from interface:IPlatformHelperCheck if the game is currently in a development environment.- Specified by:
isDevelopmentEnvironmentin interfaceIPlatformHelper- 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:IPlatformHelperRegisters an object- Specified by:
registerin interfaceIPlatformHelper- 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:IPlatformHelperAdds a brewing mix.- Specified by:
addMixin interfaceIPlatformHelper
-
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:IPlatformHelperAdds a brewing recipe. For brewing that has a non-potion as input or output. UseaddMixotherwise.- Specified by:
addBrewingRecipein interfaceIPlatformHelper
-
addCompostable
public void addCompostable(Supplier<? extends net.minecraft.world.level.ItemLike> item, float chance) Description copied from interface:IPlatformHelperAdds an item to the composter.- Specified by:
addCompostablein interfaceIPlatformHelper- 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:IPlatformHelperAdds an item as furnace fuel. Use only when getBurnTime somehow isn't available to override.- Specified by:
addFurnaceFuelin interfaceIPlatformHelper- Parameters:
item- to be used as fuelburnTime- 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:IPlatformHelperRegisters a config- Specified by:
registerConfigin interfaceIPlatformHelpertype- Side that the config applies to
-
addPack
Description copied from interface:IPlatformHelperRegisters an addition resource/data pack- Specified by:
addPackin interfaceIPlatformHelper
-