Init commit

This commit is contained in:
2024-08-04 09:24:08 +02:00
commit 44ffdeab6d
21 changed files with 1015 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package modern_chunk_detector;
import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ModernChunkDetector 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 id as the logger's name.
// That way, it's clear which mod wrote info, warnings, and errors.
public static final Logger LOGGER = LoggerFactory.getLogger("modern_chunk_detector");
@Override
public void onInitialize() {
// This code runs as soon as Minecraft is in a mod-load-ready state.
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.
LOGGER.info("Hello Fabric world!");
}
}

View File

@ -0,0 +1,15 @@
package modern_chunk_detector.mixin;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class ExampleMixin {
@Inject(at = @At("HEAD"), method = "loadWorld")
private void init(CallbackInfo info) {
// This code is injected into the start of MinecraftServer.loadWorld()V
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,41 @@
{
"schemaVersion": 1,
"id": "modern_chunk_detector",
"version": "${version}",
"name": "Modern Chunk Detector",
"description": "This mod shows you if a chunk is new or old, can be useful on server like 2b2t or 9b9t",
"authors": [
"Ayabusa!"
],
"contact": {
"homepage": "https://ayabusa.dev/",
"sources": "https://github.com/ayabusa"
},
"license": "CC0-1.0",
"icon": "assets/modern_chunk_detector/icon.png",
"environment": "*",
"entrypoints": {
"main": [
"modern_chunk_detector.ModernChunkDetector"
],
"client": [
"modern_chunk_detector.ModernChunkDetectorClient"
]
},
"mixins": [
"modern_chunk_detector.mixins.json",
{
"config": "modern_chunk_detector.client.mixins.json",
"environment": "client"
}
],
"depends": {
"fabricloader": ">=0.15.11",
"minecraft": "~1.20.6",
"java": ">=21",
"fabric-api": "*"
},
"suggests": {
"another-mod": "*"
}
}

View File

@ -0,0 +1,11 @@
{
"required": true,
"package": "modern_chunk_detector.mixin",
"compatibilityLevel": "JAVA_21",
"mixins": [
"ExampleMixin"
],
"injectors": {
"defaultRequire": 1
}
}