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) net.minecraft.world.item.ItemStackcopyWithSize(net.minecraft.world.item.ItemStack stack, int size) 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.booleanSupplier<net.minecraft.world.item.Item>registerItem(String id, Supplier<net.minecraft.world.item.Item> obj)
-
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
-
registerItem
public Supplier<net.minecraft.world.item.Item> registerItem(String id, Supplier<net.minecraft.world.item.Item> obj) - Specified by:
registerItemin interfaceIPlatformHelper
-
copyWithSize
public net.minecraft.world.item.ItemStack copyWithSize(net.minecraft.world.item.ItemStack stack, int size) - Specified by:
copyWithSizein 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
-
maxBonemeal
- Specified by:
maxBonemealin interfaceIPlatformHelper
-