Compare commits

...

3 Commits

Author SHA1 Message Date
ix0rai 7236b8ec1a
add validation code 2024-03-25 12:37:11 -05:00
ix0rai d5e3a1a402
Merge branch 'QuiltMC:1.20.2' into patch-1 2024-03-25 12:34:24 -05:00
ix0rai ba9d235849
update QFAPI to 8.0.0-alpha.4+0.91.6-1.20.2 2024-02-27 15:09:49 -06:00
2 changed files with 7 additions and 2 deletions

View File

@ -6,7 +6,7 @@ loom = "1.4.1"
quilt_mappings = "1.20.2+build.3"
quilt_loader = "0.23.1"
quilted_fabric_api = "8.0.0-alpha.3+0.91.2-1.20.2"
quilted_fabric_api = "8.0.0-alpha.4+0.91.6-1.20.2"
[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }

View File

@ -11,11 +11,16 @@ public class ExampleMod implements ModInitializer {
// That way, it's clear which mod wrote info, warnings, and errors.
public static final Logger LOGGER = LoggerFactory.getLogger("Example Mod");
// A central place to house your mod ID.
// A central place to house your mod ID. This should match the ID in your quilt.mod.json file.
public static final String MOD_ID = "example_mod";
@Override
public void onInitialize(ModContainer mod) {
// the following block validates that you've updated both the quilt.mod.json file and MOD_ID field when you change your mod ID. if you're familiar with making mods, feel free to remove this!
if (!mod.metadata().id().equals(MOD_ID)) {
throw new RuntimeException(String.format("Mod IDs in quilt.mod.json and MOD_ID field do not match! (quilt.mod.json: %s; MOD_ID: %s", mod.metadata().id(), MOD_ID));
}
LOGGER.info("Hello Quilt world from {}!", mod.metadata().name());
}
}