Package de.cech12.bucketlib.platform
Class FabricPlatformHelper
java.lang.Object
de.cech12.bucketlib.platform.FabricPlatformHelper
- All Implemented Interfaces:
IPlatformHelper
The platform service implementation for Fabric.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetBurnTime(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.crafting.RecipeType<?> recipeType) Gets the burn time of an ItemStack.net.minecraft.world.level.LevelGets the current level.Gets the translation key for milk.Gets the name of the current platformnet.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> Gets the TOOLS_AND_UTILITIES creative tab.booleanCheck if the game is currently in a development environment.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.cech12.bucketlib.platform.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.
-
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.
-
getCurrentLevel
public net.minecraft.world.level.Level getCurrentLevel()Description copied from interface:IPlatformHelperGets the current level.- Specified by:
getCurrentLevelin interfaceIPlatformHelper- Returns:
- the current level.
-
getToolsAndUtilitiesTab
public net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab> getToolsAndUtilitiesTab()Description copied from interface:IPlatformHelperGets the TOOLS_AND_UTILITIES creative tab.- Specified by:
getToolsAndUtilitiesTabin interfaceIPlatformHelper- Returns:
- TOOLS_AND_UTILITIES creative tab.
-
getMilkTranslationKey
Description copied from interface:IPlatformHelperGets the translation key for milk.- Specified by:
getMilkTranslationKeyin interfaceIPlatformHelper- 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:IPlatformHelperGets the burn time of an ItemStack.- Specified by:
getBurnTimein interfaceIPlatformHelper- Returns:
- burn time of an ItemStack
-