G-Man's Wish (init)
This commit is contained in:
parent
563e78b81e
commit
e8e640ce80
9 changed files with 22 additions and 45 deletions
29
README.md
29
README.md
|
@ -1,28 +1,5 @@
|
|||
# Quilt Kotlin Template Mod
|
||||
|
||||
The official Quilt Kotlin template Mod. You can use it as a template for your own kotlin mods!
|
||||
|
||||
## Usage
|
||||
|
||||
In order to use this mod as a template:
|
||||
|
||||
1. Create a new repository from this template with `Use this template`
|
||||
2. Clone the recently-created repo on your PC
|
||||
3. Make the necessary changes in order to make it yours:
|
||||
- Update `gradle.properties` in order to use your Maven group and mod ID
|
||||
- If you don't know which Maven group to use, and you are planning to host the mod's source code on GitHub, use `io.github.<Your_Username_Here>`
|
||||
- Update `quilt.mod.json` in order to reflect your mod's metadata
|
||||
- If you are planning to include (jar-in-jar) a mod, don't forget to declare its dependency on it!
|
||||
- The icon provided here is a placeholder one. If you aren't able to replace it yet, you can delete it and remove the "icon" property
|
||||
- Create a LICENSE file for this mod! If you don't know which license to use, check out [here](https://choosealicense.com/).
|
||||
- In `quilt.mod.json`, don't forget to put the license's [SPDX identifier](https://spdx.org/licenses/) under the `"license"` property in `"metadata"`.
|
||||
- The GPLv3 and AGPLv3 are not valid mod licenses, so you can use almost any license except for those.
|
||||
- Update the Java sub-directory structure so it reflects your Maven group
|
||||
- If the dependencies on `gradle/libs.versions.toml` isn't up-to-date, feel free to update them! The [linked utility](https://lambdaurora.dev/tools/import_quilt.html) should help you in this easy and quick process.
|
||||
4. The mod is now ready to be worked on!
|
||||
# Block-Life
|
||||
Half-Life in Minecraft.
|
||||
|
||||
## License
|
||||
|
||||
This template on the QuiltMC GitHub is licensed under the [Creative Common Zero v1.0 license](./LICENSE_TEMPLATE.md).
|
||||
|
||||
Mods created with this template are not automatically licensed under the CC0, and are not required to give any kind of credit back to QuiltMC for this template.
|
||||
### TODO
|
||||
|
|
|
@ -3,6 +3,6 @@ org.gradle.parallel=true
|
|||
kotlin.incremental=true
|
||||
kotlin.code.style=official
|
||||
|
||||
group=com.example
|
||||
group=xyz.limepot
|
||||
version=1.0.0
|
||||
archives_base_name=quilt-kotlin-template-mod
|
||||
archives_base_name=block-life
|
||||
|
|
|
@ -15,4 +15,4 @@ pluginManagement {
|
|||
}
|
||||
}
|
||||
|
||||
rootProject.name = "quilt-kotlin-template-mod"
|
||||
rootProject.name = "block-life"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.example.example_mod.mixin;
|
||||
package xyz.limepot.block_life.mixin;
|
||||
|
||||
import net.minecraft.client.gui.screen.TitleScreen;
|
||||
import com.example.example_mod.ExampleMod;
|
||||
import xyz.limepot.block_life.BlockLife;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
|
@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
@Mixin(TitleScreen.class)
|
||||
public class TitleScreenMixin {
|
||||
@Inject(method = "init", at = @At("TAIL"))
|
||||
public void exampleMod$onInit(CallbackInfo ci) {
|
||||
ExampleMod.INSTANCE.getLOGGER().info("This line is printed by an example mod mixin!");
|
||||
public void blockLife$onInit(CallbackInfo ci) {
|
||||
BlockLife.INSTANCE.getLOGGER().info(" ");
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.example_mod
|
||||
package xyz.limepot.block_life
|
||||
|
||||
import org.quiltmc.loader.api.ModContainer
|
||||
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer
|
||||
|
@ -6,9 +6,9 @@ import org.slf4j.Logger
|
|||
import org.slf4j.LoggerFactory
|
||||
|
||||
object ExampleMod : ModInitializer {
|
||||
val LOGGER: Logger = LoggerFactory.getLogger("Example Mod")
|
||||
val LOGGER: Logger = LoggerFactory.getLogger("Block-Life")
|
||||
|
||||
override fun onInitialize(mod: ModContainer) {
|
||||
LOGGER.info("Hello Quilt world from {}!", mod.metadata()?.name())
|
||||
LOGGER.info("Howdy Quilt Kotlin world from {}!", mod.metadata()?.name())
|
||||
}
|
||||
}
|
BIN
src/main/resources/assets/block_life/icon.png
Normal file
BIN
src/main/resources/assets/block_life/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 948 B |
Binary file not shown.
Before Width: | Height: | Size: 207 B |
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.example.example_mod.mixin",
|
||||
"package": "xyz.limepot.block_life.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [],
|
||||
"client": [
|
|
@ -1,27 +1,27 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"quilt_loader": {
|
||||
"group": "com.example",
|
||||
"id": "example_mod",
|
||||
"group": "xyz.limepot",
|
||||
"id": "block_life",
|
||||
"version": "${version}",
|
||||
"metadata": {
|
||||
"name": "Mod Name",
|
||||
"description": "A short description of your mod.",
|
||||
"name": "Block-Life",
|
||||
"description": "Half-Life, in Minecraft.",
|
||||
"contributors": {
|
||||
"Your name here": "Owner"
|
||||
"LimePotato": "The Monkey banging a wrench against the source-code"
|
||||
},
|
||||
"contact": {
|
||||
"homepage": "https://example.com/",
|
||||
"issues": "https://github.com/QuiltMC/quilt-kotlin-template-mod/issues",
|
||||
"sources": "https://github.com/QuiltMC/quilt-kotlin-template-mod"
|
||||
},
|
||||
"icon": "assets/example_mod/icon.png"
|
||||
"icon": "assets/block_life/icon.png"
|
||||
},
|
||||
"intermediate_mappings": "net.fabricmc:intermediary",
|
||||
"entrypoints": {
|
||||
"init": {
|
||||
"adapter": "kotlin",
|
||||
"value": "com.example.example_mod.ExampleMod"
|
||||
"value": "xyz.limepot.block_life.BLockLife"
|
||||
}
|
||||
},
|
||||
"depends": [
|
||||
|
@ -43,5 +43,5 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"mixin": "example_mod.mixins.json"
|
||||
"mixin": "block_life.mixins.json"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue