Add blank XpTestMixin test class, add some todo.

This commit is contained in:
kelson8 2024-03-24 02:24:49 -04:00
parent f238c87793
commit 906334f998
Signed by: kelson8
GPG Key ID: 3D738D9DD7239E13
4 changed files with 19 additions and 2 deletions

View File

@ -12,6 +12,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import static net.minecraft.server.command.CommandManager.*; import static net.minecraft.server.command.CommandManager.*;
// Todo Possibly hook into other mods and find some library mods to mess around with.
// Link for library mods: https://github.com/Siphalor/awesome-fabric
public class KelsonCraftTest implements ModInitializer { public class KelsonCraftTest implements ModInitializer {
// Todo Change name of project to something else // Todo Change name of project to something else

View File

@ -1,15 +1,17 @@
package net.kelsoncraft.test.mixin; package net.kelsoncraft.test.mixin;
import net.minecraft.entity.ExperienceOrbEntity;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
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;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
// Todo Fix up a testing mixin, not sure what to hook into yet.
@Mixin(MinecraftServer.class) @Mixin(MinecraftServer.class)
public class ExampleMixin { public class ExampleMixin {
@Inject(at = @At("HEAD"), method = "loadWorld") @Inject(at = @At("HEAD"), method = "loadWorld")
private void init(CallbackInfo info) { private void init(CallbackInfo info) {
// This code is injected into the start of MinecraftServer.loadWorld()V // This code is injected into the start of MinecraftServer.loadWorld()V
} }
} }

View File

@ -0,0 +1,11 @@
package net.kelsoncraft.test.mixin;
import net.minecraft.entity.ExperienceOrbEntity;
import org.spongepowered.asm.mixin.Mixin;
// Todo Setup something related to XP such as storing it or spending it for something.
@Mixin(value = ExperienceOrbEntity.class)
public class XpTestMixin {
}

View File

@ -3,7 +3,8 @@
"package": "net.kelsoncraft.test.mixin", "package": "net.kelsoncraft.test.mixin",
"compatibilityLevel": "JAVA_17", "compatibilityLevel": "JAVA_17",
"mixins": [ "mixins": [
"ExampleMixin" "ExampleMixin",
"XpTestMixin"
], ],
"injectors": { "injectors": {
"defaultRequire": 1 "defaultRequire": 1