diff --git a/README.md b/README.md index 5bdf426..a88b892 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,6 @@ -# Quilt Template Mod +# Roses Mod -The official Quilt template mod. You can use it as a template for your own 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.` - - 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/). - - If you use `LICENSE.md`, don't forget to update the buildscript in order to use that file name! - - 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! - -## 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. +## Features: + - Added the old singular roses + - Rose bushes drop a few individual roses + - Roses can be used to craft rose bushes diff --git a/gradle.properties b/gradle.properties index 0f3bd13..24fd873 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.parallel = true # Mod Properties version = 1.0.0 -maven_group = com.example -archives_base_name = example_mod +maven_group = xyz.limepot +archives_base_name = roses_mod # Dependencies are managed at gradle/libs.versions.toml diff --git a/src/main/java/com/example/example_mod/ExampleMod.java b/src/main/java/com/example/example_mod/ExampleMod.java deleted file mode 100644 index b64b63c..0000000 --- a/src/main/java/com/example/example_mod/ExampleMod.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.example.example_mod; - -import org.quiltmc.loader.api.ModContainer; -import org.quiltmc.qsl.base.api.entrypoint.ModInitializer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ExampleMod implements ModInitializer { - // This logger is used to write text to the console and the log file. - // It is considered best practice to use your mod name as the logger's name. - // That way, it's clear which mod wrote info, warnings, and errors. - public static final Logger LOGGER = LoggerFactory.getLogger("Example Mod"); - - @Override - public void onInitialize(ModContainer mod) { - LOGGER.info("Hello Quilt world from {}!", mod.metadata().name()); - } -} diff --git a/src/main/java/xyz/limepot/roses_mod/RosesMod.java b/src/main/java/xyz/limepot/roses_mod/RosesMod.java new file mode 100644 index 0000000..41cb6d7 --- /dev/null +++ b/src/main/java/xyz/limepot/roses_mod/RosesMod.java @@ -0,0 +1,31 @@ +package xyz.limepot.roses_mod; + +import net.minecraft.block.Block; +import net.minecraft.block.Material; +import net.minecraft.item.BlockItem; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; +import org.quiltmc.loader.api.ModContainer; +import org.quiltmc.qsl.base.api.entrypoint.ModInitializer; +import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings; +import org.quiltmc.qsl.item.setting.api.QuiltItemSettings; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RosesMod implements ModInitializer { + public static final String MOD_ID = "roses_mod"; + public static final Logger LOGGER = LoggerFactory.getLogger("Roses Mod"); + + public static final Block ROSE_FLOWER = new Block(QuiltBlockSettings.of(Material.ORGANIC_PRODUCT).strength(0.3f)); + + + @Override + public void onInitialize(ModContainer mod) { + Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "rose_flower"), ROSE_FLOWER); + Registry.register(Registries.ITEM, new Identifier(MOD_ID, "rose_flower"), new BlockItem(ROSE_FLOWER, new QuiltItemSettings())); + + LOGGER.info("Hello Quilt world from {}!", mod.metadata().name()); + } + +} diff --git a/src/main/java/com/example/example_mod/mixin/TitleScreenMixin.java b/src/main/java/xyz/limepot/roses_mod/mixin/TitleScreenMixin.java similarity index 64% rename from src/main/java/com/example/example_mod/mixin/TitleScreenMixin.java rename to src/main/java/xyz/limepot/roses_mod/mixin/TitleScreenMixin.java index 05ea323..71db72b 100644 --- a/src/main/java/com/example/example_mod/mixin/TitleScreenMixin.java +++ b/src/main/java/xyz/limepot/roses_mod/mixin/TitleScreenMixin.java @@ -1,6 +1,6 @@ -package com.example.example_mod.mixin; +package xyz.limepot.roses_mod.mixin; -import com.example.example_mod.ExampleMod; +import xyz.limepot.roses_mod.RosesMod; import net.minecraft.client.gui.screen.TitleScreen; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -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.LOGGER.info("This line is printed by an example mod mixin!"); + public void rosesMod$onInit(CallbackInfo ci) { + RosesMod.LOGGER.info("This line is printed by an example mod mixin!"); } } diff --git a/src/main/resources/assets/example_mod/icon.png b/src/main/resources/assets/example_mod/icon.png deleted file mode 100644 index d42fc1e..0000000 Binary files a/src/main/resources/assets/example_mod/icon.png and /dev/null differ diff --git a/src/main/resources/assets/roses_mod/icon.png b/src/main/resources/assets/roses_mod/icon.png new file mode 100644 index 0000000..28dae85 Binary files /dev/null and b/src/main/resources/assets/roses_mod/icon.png differ diff --git a/src/main/resources/assets/roses_mod/textures/blocks/flower_rose.png b/src/main/resources/assets/roses_mod/textures/blocks/flower_rose.png new file mode 100644 index 0000000..895d78f Binary files /dev/null and b/src/main/resources/assets/roses_mod/textures/blocks/flower_rose.png differ diff --git a/src/main/resources/quilt.mod.json b/src/main/resources/quilt.mod.json index d8fac46..d32f984 100644 --- a/src/main/resources/quilt.mod.json +++ b/src/main/resources/quilt.mod.json @@ -1,25 +1,25 @@ { "schema_version": 1, "quilt_loader": { - "group": "com.example", - "id": "example_mod", + "group": "xyz.limepot", + "id": "roses_mod", "version": "${version}", "metadata": { - "name": "Mod Name", - "description": "A short description of your mod.", + "name": "Roses Mod", + "description": "Reinstates the glorious roses to Minecraft.", "contributors": { - "Your name here": "Owner" + "LimePotato": "Developer" }, "contact": { - "homepage": "https://example.com/", - "issues": "https://github.com/QuiltMC/quilt-template-mod/issues", - "sources": "https://github.com/QuiltMC/quilt-template-mod" + "homepage": "https://limepot.xyz/rosemod", + "issues": "https://github.com/LimePotato/roses-mod/issues", + "sources": "https://github.com/LimePotato/roses-mod/" }, - "icon": "assets/example_mod/icon.png" + "icon": "assets/roses_mod/icon.png" }, "intermediate_mappings": "net.fabricmc:intermediary", "entrypoints": { - "init": "com.example.example_mod.ExampleMod" + "init": "xyz.limepot.roses_mod.RosesMod" }, "depends": [ { @@ -36,5 +36,5 @@ } ] }, - "mixin": "example_mod.mixins.json" + "mixin": "roses_mod.mixins.json" } diff --git a/src/main/resources/example_mod.mixins.json b/src/main/resources/roses_mod.mixins.json similarity index 69% rename from src/main/resources/example_mod.mixins.json rename to src/main/resources/roses_mod.mixins.json index a92cc78..575e112 100644 --- a/src/main/resources/example_mod.mixins.json +++ b/src/main/resources/roses_mod.mixins.json @@ -1,11 +1,11 @@ { "required": true, "minVersion": "0.8", - "package": "com.example.example_mod.mixin", + "package": "xyz.limepot.roses_mod.mixin", "compatibilityLevel": "JAVA_17", "mixins": [], "client": [ - "TitleScreenMixin" + "TitleScreenMixin" ], "injectors": { "defaultRequire": 1