Package de.cech12.unlitcampfire.platform
Class ForgePlatformHelper
java.lang.Object
de.cech12.unlitcampfire.platform.ForgePlatformHelper
- All Implemented Interfaces:
IPlatformHelper
The platform service implementation for Forge.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetBurnTimeOf(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack) Gets the burn time of a given item stackGets the name of the current platformnet.minecraft.world.item.ItemStackgetRemainingStackAfterUsage(net.minecraft.world.item.ItemStack usedStack) Gets the item stack that remains after usage of the given item stack.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.unlitcampfire.platform.services.IPlatformHelper
getEnvironmentName
-
Constructor Details
-
ForgePlatformHelper
public ForgePlatformHelper()
-
-
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.
-
getBurnTimeOf
public int getBurnTimeOf(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack) Description copied from interface:IPlatformHelperGets the burn time of a given item stack- Specified by:
getBurnTimeOfin interfaceIPlatformHelper- Parameters:
level- levelstack- item stack- Returns:
- burn time of the given item stack
-
getRemainingStackAfterUsage
public net.minecraft.world.item.ItemStack getRemainingStackAfterUsage(net.minecraft.world.item.ItemStack usedStack) Description copied from interface:IPlatformHelperGets the item stack that remains after usage of the given item stack.- Specified by:
getRemainingStackAfterUsagein interfaceIPlatformHelper- Parameters:
usedStack- used item stack- Returns:
- remaining item stack after usage
-