-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
39 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
package org.polyfrost.example; | ||
|
||
import net.fabricmc.api.ClientModInitializer; | ||
import org.polyfrost.example.command.ExampleCommand; | ||
import org.polyfrost.example.config.ExampleConfig; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.event.FMLInitializationEvent; | ||
import org.polyfrost.oneconfig.api.commands.v1.CommandManager; | ||
|
||
/** | ||
* The entrypoint of the Example Mod which initializes it. | ||
* This is what is run when the game is started and typically how your mod will set up its functionality. | ||
* | ||
* @see Mod | ||
* @see ClientModInitializer | ||
*/ | ||
@Mod(modid = ExampleMod.ID, name = ExampleMod.NAME, version = ExampleMod.VERSION) | ||
public class ExampleMod { | ||
public class ExampleMod implements ClientModInitializer { | ||
|
||
// Sets the variables from `gradle.properties`. Depends on the `bloom` DGT plugin. | ||
public static final String ID = "@MOD_ID@"; | ||
public static final String NAME = "@MOD_NAME@"; | ||
public static final String VERSION = "@MOD_VERSION@"; | ||
|
||
@Mod.Instance(ID) | ||
public static ExampleMod INSTANCE; // Adds the instance of the mod, so we can access other variables. | ||
|
||
private static ExampleConfig config; | ||
|
||
public ExampleMod() { | ||
INSTANCE = this; | ||
} | ||
|
||
// Register the config and commands. | ||
@Mod.EventHandler | ||
public void onInit(FMLInitializationEvent event) { | ||
@Override | ||
public void onInitializeClient() { | ||
config = new ExampleConfig(); | ||
CommandManager.registerCommand(new ExampleCommand()); | ||
} | ||
|
||
public static ExampleConfig getConfig() { | ||
return config; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "${mod_id}", | ||
"version": "${mod_version}", | ||
"name": "${mod_name}", | ||
"description": "${mod_description}", | ||
"authors": [ | ||
"Polyfrost" | ||
], | ||
"environment": "*", | ||
"entrypoints": { | ||
"client": [ | ||
{ | ||
"value": "org.polyfrost.example.ExampleMod" | ||
} | ||
] | ||
}, | ||
"mixins": [ | ||
"mixins.${mod_id}.json" | ||
], | ||
"depends": { | ||
"minecraft": "~${minor_mc_version}", | ||
"fabricloader": ">=0.15.11" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"maxShiftBy": 5 | ||
}, | ||
"client": [ | ||
"MinecraftMixin" | ||
"MinecraftClientMixin" | ||
], | ||
"verbose": true | ||
} |