Class FabricPlatformHelper
java.lang.Object
net.sashiro.compressedblocks.fabric.platform.FabricPlatformHelper
- All Implemented Interfaces:
IPlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets 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.voidregisterBlock(String name, net.minecraft.world.level.block.Block... blocks) Function for platform-dependent registration of BlocksvoidregisterCrate(String name, net.minecraft.world.level.block.Block... crateBlocks) Function for platform-dependent registration of CratesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sashiro.compressedblocks.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.
-
registerBlock
Description copied from interface:IPlatformHelperFunction for platform-dependent registration of Blocks- Specified by:
registerBlockin interfaceIPlatformHelper- Parameters:
name- the registry name of the Blockblocks- the Blocks to be registered
-
registerCrate
Description copied from interface:IPlatformHelperFunction for platform-dependent registration of Crates- Specified by:
registerCratein interfaceIPlatformHelper- Parameters:
name- the registry name of the BlockcrateBlocks- the Crate Blocks to be registered
-