Version bump and fixed a bunch of build issues

master
Wynd 2024-01-07 22:30:50 +02:00
parent 7242ef63ec
commit 32c529e391
5 changed files with 9 additions and 8 deletions

View File

@ -9,6 +9,6 @@ plasma_build=22
api_version=1.1.0.1 api_version=1.1.0.1
# Mod Properties # Mod Properties
mod_version = 1.0.0 mod_version = 1.1.0
maven_group = xyz.pixelatedw.finalbeta maven_group = xyz.pixelatedw.finalbeta
archives_base_name = finalbeta archives_base_name = finalbeta

View File

@ -31,10 +31,10 @@ public class WyHelper {
return INSTANCE; return INSTANCE;
} else { } else {
try { try {
Field f = Minecraft.class.getDeclaredField("instance"); Field f = Minecraft.class.getDeclaredFields()[1];
f.setAccessible(true); f.setAccessible(true);
return (Minecraft) f.get(null); return (Minecraft) f.get(null);
} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { } catch (SecurityException | IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace(); e.printStackTrace();
} }
return null; return null;

View File

@ -11,7 +11,7 @@ import xyz.pixelatedw.finalbeta.WyHelper;
@Mixin(Level.class) @Mixin(Level.class)
public class LevelMixin { public class LevelMixin {
@Inject(method = "method_242", at = @At(value = "INVOKE", target = "Lnet/minecraft/level/LevelMonsterSpawner;method_1870")) @Inject(method = "method_242", at = @At(value = "INVOKE", target = "Lnet/minecraft/level/LevelMonsterSpawner;method_1870(Lnet/minecraft/level/Level;ZZ)V"))
public void tick(CallbackInfo ci) { public void tick(CallbackInfo ci) {
WyHelper.playTime++; WyHelper.playTime++;
} }

View File

@ -17,7 +17,7 @@ import xyz.pixelatedw.finalbeta.ModConfig;
@Mixin(Minecraft.class) @Mixin(Minecraft.class)
public class MinecraftMixin { public class MinecraftMixin {
@Redirect(method = "init()V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;create()V")) @Redirect(method = "init()V", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;create()V"), remap = false)
public void createDisplay() throws LWJGLException { public void createDisplay() throws LWJGLException {
// Why the fuck is this even a thing ? What was its intended purpose ? I NEED TO KNOW // Why the fuck is this even a thing ? What was its intended purpose ? I NEED TO KNOW
Minecraft.field_2800 = null; Minecraft.field_2800 = null;

View File

@ -25,16 +25,17 @@ public class OverlayMixin extends DrawableHelper {
method = "render(FZII)V", method = "render(FZII)V",
at = @At( at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lorg/lwjgl/opengl/GL11;glPopMatrix()V" target = "Lorg/lwjgl/opengl/GL11;glPopMatrix()V",
remap = false
), ),
slice = @Slice( slice = @Slice(
from = @At( from = @At(
value = "INVOKE", value = "INVOKE",
target = "drawTextWithShadow(Lnet/minecraft/client/render/TextRenderer;Ljava/lang/String;III)V" target = "Lnet/minecraft/client/gui/Overlay;drawTextWithShadow(Lnet/minecraft/client/render/TextRenderer;Ljava/lang/String;III)V"
), ),
to = @At( to = @At(
value = "FIELD", value = "FIELD",
target = "jukeboxMessageTime:I", target = "Lnet/minecraft/client/gui/Overlay;jukeboxMessageTime:I",
opcode = Opcodes.GETFIELD opcode = Opcodes.GETFIELD
) )
) )