Interface IPlatformHelper
- All Known Implementing Classes:
FabricPlatformHelper
public interface IPlatformHelper
-
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> default net.minecraft.core.Holder<net.minecraft.world.item.Item> registerItem(String id, Supplier<net.minecraft.world.item.Item> obj)
-
Method Details
-
getPlatformName
String getPlatformName()Gets the name of the current platform- Returns:
- The name of the current platform.
-
isModLoaded
Checks if a mod with the given id is loaded.- Parameters:
modId- The mod to check if it is loaded.- Returns:
- True if the mod is loaded, false otherwise.
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment()Check if the game is currently in a development environment.- Returns:
- True if in a development environment, false otherwise.
-
isSideClient
boolean isSideClient() -
getCompostChance
float getCompostChance(net.minecraft.world.item.ItemStack stack) -
registerItem
-
register
-
bonemeal
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)
-