Package wtf.choco.veinminer
Class VeinMinerMod
java.lang.Object
wtf.choco.veinminer.VeinMinerMod
- All Implemented Interfaces:
net.fabricmc.api.ClientModInitializer
The Fabric VeinMiner mod entry class.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final net.minecraft.client.KeyMapping
The "activate veinminer" key mapping.static final net.minecraft.client.KeyMapping
The "next pattern" key mapping.static final net.minecraft.client.KeyMapping
The "previous pattern" key mapping. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull FabricServerState
Get theFabricServerState
for this client.static boolean
Check whether or not the client is connected to a server and has a valid server state.void
-
Field Details
-
KEY_MAPPING_ACTIVATE_VEINMINER
public static final net.minecraft.client.KeyMapping KEY_MAPPING_ACTIVATE_VEINMINERThe "activate veinminer" key mapping. Defaults to ~ -
KEY_MAPPING_NEXT_PATTERN
public static final net.minecraft.client.KeyMapping KEY_MAPPING_NEXT_PATTERNThe "next pattern" key mapping. Defaults to ] -
KEY_MAPPING_PREVIOUS_PATTERN
public static final net.minecraft.client.KeyMapping KEY_MAPPING_PREVIOUS_PATTERNThe "previous pattern" key mapping. Defaults to [
-
-
Constructor Details
-
VeinMinerMod
public VeinMinerMod()
-
-
Method Details
-
onInitializeClient
public void onInitializeClient()- Specified by:
onInitializeClient
in interfacenet.fabricmc.api.ClientModInitializer
-
hasServerState
public static boolean hasServerState()Check whether or not the client is connected to a server and has a valid server state.The result of this method should be checked before accessing
getServerState()
.- Returns:
- true if a server state is available, false otherwise
-
getServerState
Get theFabricServerState
for this client.- Returns:
- the server state
- Throws:
IllegalStateException
- if there is no server state
-