mirror of
https://github.com/JonasunderscoreJones/NotEnoughCursedness.git
synced 2025-10-22 20:19:19 +02:00
not working
I hate mixins
This commit is contained in:
parent
e71fc0caa2
commit
95feb53aa5
4 changed files with 25 additions and 17 deletions
|
@ -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!");
|
||||
}
|
||||
}
|
24
src/main/java/me/jonasjones/nec/mixin/SplashScreenMixin.java
Normal file
24
src/main/java/me/jonasjones/nec/mixin/SplashScreenMixin.java
Normal 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 |
|
@ -6,7 +6,7 @@
|
|||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
"ExampleMixin"
|
||||
"SplashScreenMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue