Successfully Registered flower

This commit is contained in:
nelle 2023-01-06 16:29:35 -07:00
parent 4101302a2a
commit 374a06b1a9
10 changed files with 55 additions and 65 deletions

View file

@ -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! ## Features:
- Added the old singular roses
## Usage - Rose bushes drop a few individual roses
- Roses can be used to craft rose bushes
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/).
- 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.

View file

@ -4,7 +4,7 @@ org.gradle.parallel = true
# Mod Properties # Mod Properties
version = 1.0.0 version = 1.0.0
maven_group = com.example maven_group = xyz.limepot
archives_base_name = example_mod archives_base_name = roses_mod
# Dependencies are managed at gradle/libs.versions.toml # Dependencies are managed at gradle/libs.versions.toml

View file

@ -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());
}
}

View file

@ -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());
}
}

View file

@ -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 net.minecraft.client.gui.screen.TitleScreen;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(TitleScreen.class) @Mixin(TitleScreen.class)
public class TitleScreenMixin { public class TitleScreenMixin {
@Inject(method = "init", at = @At("TAIL")) @Inject(method = "init", at = @At("TAIL"))
public void exampleMod$onInit(CallbackInfo ci) { public void rosesMod$onInit(CallbackInfo ci) {
ExampleMod.LOGGER.info("This line is printed by an example mod mixin!"); RosesMod.LOGGER.info("This line is printed by an example mod mixin!");
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

View file

@ -1,25 +1,25 @@
{ {
"schema_version": 1, "schema_version": 1,
"quilt_loader": { "quilt_loader": {
"group": "com.example", "group": "xyz.limepot",
"id": "example_mod", "id": "roses_mod",
"version": "${version}", "version": "${version}",
"metadata": { "metadata": {
"name": "Mod Name", "name": "Roses Mod",
"description": "A short description of your mod.", "description": "Reinstates the glorious roses to Minecraft.",
"contributors": { "contributors": {
"Your name here": "Owner" "LimePotato": "Developer"
}, },
"contact": { "contact": {
"homepage": "https://example.com/", "homepage": "https://limepot.xyz/rosemod",
"issues": "https://github.com/QuiltMC/quilt-template-mod/issues", "issues": "https://github.com/LimePotato/roses-mod/issues",
"sources": "https://github.com/QuiltMC/quilt-template-mod" "sources": "https://github.com/LimePotato/roses-mod/"
}, },
"icon": "assets/example_mod/icon.png" "icon": "assets/roses_mod/icon.png"
}, },
"intermediate_mappings": "net.fabricmc:intermediary", "intermediate_mappings": "net.fabricmc:intermediary",
"entrypoints": { "entrypoints": {
"init": "com.example.example_mod.ExampleMod" "init": "xyz.limepot.roses_mod.RosesMod"
}, },
"depends": [ "depends": [
{ {
@ -36,5 +36,5 @@
} }
] ]
}, },
"mixin": "example_mod.mixins.json" "mixin": "roses_mod.mixins.json"
} }

View file

@ -1,7 +1,7 @@
{ {
"required": true, "required": true,
"minVersion": "0.8", "minVersion": "0.8",
"package": "com.example.example_mod.mixin", "package": "xyz.limepot.roses_mod.mixin",
"compatibilityLevel": "JAVA_17", "compatibilityLevel": "JAVA_17",
"mixins": [], "mixins": [],
"client": [ "client": [