Class FabricPlatformHelper
-
- All Implemented Interfaces:
-
com.mynamesraph.ensemble.platform.services.PlatformHelper
public final class FabricPlatformHelper implements PlatformHelper
-
-
Constructor Summary
Constructors Constructor Description FabricPlatformHelper()
-
Method Summary
Modifier and Type Method Description StringgetPlatformName()Gets the name of the current platform BooleanisModLoaded(String modId)Checks if a mod with the given id is loaded. BooleanisDevelopmentEnvironment()Check if the game is currently in a development environment. Map<EnsembleKeyMappings, KeyMapping>keyMap()UnitsendClientboundPacket(ServerPlayer player, CustomPacketPayload payload)UnitsendServerboundPacket(CustomPacketPayload payload)-
-
Method Detail
-
getPlatformName
String getPlatformName()
Gets the name of the current platform
- Returns:
The name of the current platform.
-
isModLoaded
Boolean isModLoaded(String modId)
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.
-
keyMap
Map<EnsembleKeyMappings, KeyMapping> keyMap()
-
sendClientboundPacket
Unit sendClientboundPacket(ServerPlayer player, CustomPacketPayload payload)
-
sendServerboundPacket
Unit sendServerboundPacket(CustomPacketPayload payload)
-
-
-
-