feat: rebuild JustASplash NeoForge 1.21.1 - hotkey Z splash, config screen, welcome, commands, vorbisspi ogg, jarJar

This commit is contained in:
SashegDev
2026-08-27 00:05:11 +03:00
parent 2b4cd71f3f
commit ad0a5d57cb
23 changed files with 897 additions and 35 deletions
@@ -0,0 +1,30 @@
package me.sashegdev.justasplash.mixin;
import com.mojang.blaze3d.audio.Library;
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;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
@Mixin(Library.class)
public class LibraryMixin {
@Inject(method = "init", at = @At("TAIL"))
private void justasplash$unlimitedChannels(String deviceName, boolean hrtf, CallbackInfo ci) {
try {
Class<?> poolClass = Class.forName("com.mojang.blaze3d.audio.Library$CountingChannelPool");
Constructor<?> ctor = poolClass.getDeclaredConstructor(int.class);
ctor.setAccessible(true);
Object pool1 = ctor.newInstance(128);
Object pool2 = ctor.newInstance(128);
Field streaming = Library.class.getDeclaredField("streamingChannels");
streaming.setAccessible(true);
streaming.set(this, pool1);
Field staticCh = Library.class.getDeclaredField("staticChannels");
staticCh.setAccessible(true);
staticCh.set(this, pool2);
} catch (Exception ignored) {}
}
}