not working

I hate mixins
This commit is contained in:
Jonas_Jones 2023-04-18 17:45:12 +02:00
parent e71fc0caa2
commit 95feb53aa5
4 changed files with 25 additions and 17 deletions

View file

@ -1,16 +0,0 @@
package me.jonasjones.nec.mixin;
import me.jonasjones.nec.NotEnoughCursedness;
import net.minecraft.client.gui.screens.TitleScreen;
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(TitleScreen.class)
public class ExampleMixin {
@Inject(at = @At("HEAD"), method = "init()V")
private void init(CallbackInfo info) {
//NotEnoughCursedness.LOGGER.info("This line is printed by an example mod mixin!");
}
}

View file

@ -0,0 +1,24 @@
package me.jonasjones.nec.mixin;
import com.sun.jna.platform.RasterRangesUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.LoadingOverlay;
import net.minecraft.resources.ResourceLocation;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.awt.*;
import static me.jonasjones.nec.NotEnoughCursedness.MOD_ID;
@Mixin(LoadingOverlay.class)
public class SplashScreenMixin {
@Inject(method = "<clinit>", at = @At("TAIL"), cancellable = true)
private static void init(CallbackInfo ci) { // Load our custom textures at game start //
static final ResourceLocation MOJANG_STUDIOS_LOGO_LOCATION = new ResourceLocation(MOD_ID, "textures/gui/title/mojangstudios.png");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -6,7 +6,7 @@
"mixins": [
],
"client": [
"ExampleMixin"
"SplashScreenMixin"
],
"injectors": {
"defaultRequire": 1