Class NeoForgePlatformHelper
java.lang.Object
net.sashiro.compressedblocks.neoforge.platform.NeoForgePlatformHelper
- All Implemented Interfaces:
IPlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if compressed blocks are enabledbooleanCheck if crates are enabledGets the name of the current platformbooleanisBlockEnabled(String name) Check if a block is enabledbooleanCheck if the game is currently in a development environment.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.intGet the maximum compression level for blocksintGet the maximum compression level for cratesvoidregisterBlock(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
-
NeoForgePlatformHelper
public NeoForgePlatformHelper()
-
-
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
-
areBlocksEnabled
public boolean areBlocksEnabled()Description copied from interface:IPlatformHelperCheck if compressed blocks are enabled- Specified by:
areBlocksEnabledin interfaceIPlatformHelper- Returns:
- True if compressed blocks are enabled, false otherwise.
-
areCratesEnabled
public boolean areCratesEnabled()Description copied from interface:IPlatformHelperCheck if crates are enabled- Specified by:
areCratesEnabledin interfaceIPlatformHelper- Returns:
- True if crates are enabled, false otherwise.
-
maxCompressionLevel
public int maxCompressionLevel()Description copied from interface:IPlatformHelperGet the maximum compression level for blocks- Specified by:
maxCompressionLevelin interfaceIPlatformHelper- Returns:
- The maximum compression level for blocks
-
maxCrateCompressionLevel
public int maxCrateCompressionLevel()Description copied from interface:IPlatformHelperGet the maximum compression level for crates- Specified by:
maxCrateCompressionLevelin interfaceIPlatformHelper- Returns:
- The maximum compression level for crates
-
isBlockEnabled
Description copied from interface:IPlatformHelperCheck if a block is enabled- Specified by:
isBlockEnabledin interfaceIPlatformHelper- Parameters:
name- The name of the block to check- Returns:
- True if the block is enabled, false otherwise
-