Package dev.dhyces.compostbag.platform
Class FabricPlatformHelper
java.lang.Object
dev.dhyces.compostbag.platform.FabricPlatformHelper
- All Implemented Interfaces:
IPlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbonemeal(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player) floatgetCompostChance(net.minecraft.world.item.ItemStack stack) Gets the name of the current platformbooleanCheck if the game is currently in a development environment.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.boolean<T> net.minecraft.core.Holder<T> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.dhyces.compostbag.platform.services.IPlatformHelper
registerItem
-
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.
-
isSideClient
public boolean isSideClient()- Specified by:
isSideClientin interfaceIPlatformHelper
-
getCompostChance
public float getCompostChance(net.minecraft.world.item.ItemStack stack) - Specified by:
getCompostChancein interfaceIPlatformHelper
-
register
public <T> net.minecraft.core.Holder<T> register(net.minecraft.core.Registry<T> registry, String id, Supplier<T> obj) - Specified by:
registerin interfaceIPlatformHelper
-
bonemeal
public boolean bonemeal(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player) - Specified by:
bonemealin interfaceIPlatformHelper
-