-
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
12 changed files
with
69 additions
and
77 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.polyfrost.example | ||
|
||
object ExampleConstants { | ||
|
||
// Sets the variables from `gradle.properties`. Depends on the `bloom` DGT plugin. | ||
const val ID = "@MOD_ID@" | ||
const val NAME = "@MOD_NAME@" | ||
const val VERSION = "@MOD_VERSION@" | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
src/main/kotlin/org/polyfrost/example/client/ExampleClient.kt
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,13 @@ | ||
package org.polyfrost.example.client | ||
|
||
import net.fabricmc.api.ClientModInitializer | ||
import org.polyfrost.oneconfig.api.commands.v1.CommandManager | ||
|
||
object ExampleClient : ClientModInitializer { | ||
|
||
override fun onInitializeClient() { | ||
ExampleConfig.preload() | ||
CommandManager.registerCommand(ExampleCommand) | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/kotlin/org/polyfrost/example/client/ExampleCommand.kt
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,15 @@ | ||
package org.polyfrost.example.client | ||
|
||
import org.polyfrost.example.ExampleConstants | ||
import org.polyfrost.oneconfig.api.commands.v1.factories.annotated.Command | ||
import org.polyfrost.oneconfig.utils.v1.dsl.openUI | ||
|
||
@Command(value = [ExampleConstants.ID], description = "Access the ${ExampleConstants.NAME} GUI.") | ||
object ExampleCommand { | ||
|
||
@Command | ||
private fun main() { | ||
ExampleConfig.openUI() | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/main/kotlin/org/polyfrost/example/client/ExampleConfig.kt
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,22 @@ | ||
package org.polyfrost.example.client | ||
|
||
import org.polyfrost.example.ExampleConstants | ||
import org.polyfrost.oneconfig.api.config.v1.Config | ||
import org.polyfrost.oneconfig.api.config.v1.annotations.Dropdown | ||
import org.polyfrost.oneconfig.api.config.v1.annotations.Slider | ||
import org.polyfrost.oneconfig.api.config.v1.annotations.Switch | ||
|
||
object ExampleConfig : Config("${ExampleConstants.ID}.json", ExampleConstants.NAME, Category.OTHER) { | ||
|
||
@JvmStatic | ||
@Switch(title = "Example Switch") | ||
var exampleSwitch = false // The default value for the boolean Switch | ||
|
||
@JvmStatic | ||
@Slider(title = "Example Slider", min = 0f, max = 100f, step = 10f) | ||
var exampleSlider = 50f // The default value for the float Slider | ||
|
||
@Dropdown(title = "Example Dropdown", options = ["Option 1", "Option 2", "Option 3", "Option 4"]) | ||
var exampleDropdown = 1 // Default option (in this case, "Option 2") | ||
|
||
} |
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,5 @@ | ||
package org.polyfrost.example.client | ||
|
||
// TODO: for nextdayy | ||
object ExampleHud { | ||
} |
21 changes: 0 additions & 21 deletions
21
src/main/kotlin/org/polyfrost/example/command/ExampleCommand.kt
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/main/kotlin/org/polyfrost/example/config/ExampleConfig.kt
This file was deleted.
Oops, something went wrong.
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
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": [ | ||
"MinecraftClientMixin" | ||
"Mixin_MinecraftClient_Example" | ||
], | ||
"verbose": true | ||
} |