From 0d95a3fb7260c5ce363350d523673e9c798511e7 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sun, 7 Jan 2024 18:59:49 +0800 Subject: [PATCH 001/130] Prevent mods calling Mixin init --- build.gradle | 2 +- src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d05ae2cf3..393a6321f 100644 --- a/build.gradle +++ b/build.gradle @@ -460,7 +460,7 @@ project(':cleanroom') { installer 'org.openjdk.nashorn:nashorn-core:15.4' // Mixin - installer 'com.cleanroommc:sponge-mixin:0.15.3+mixin.0.8.5' + installer 'com.cleanroommc:sponge-mixin:0.15.4+mixin.0.8.5' installer annotationProcessor('io.github.llamalad7:mixinextras-common:0.3.2') testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0' diff --git a/src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java b/src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java index 78b9dde6c..ea6d9feb2 100644 --- a/src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java +++ b/src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java @@ -21,7 +21,7 @@ public void injectData(Map data) { try { MixinBooterPlugin.LOGGER.info("Initializing Mixins..."); Class clazz = Bouncepad.classLoader.findClass(MixinBootstrap.class.getName()); - Method init = clazz.getMethod("init", new Class[0]); + Method init = clazz.getMethod("realInit", new Class[0]); init.invoke(null, new Object[0]); //MixinBootstrap.realInit(); MixinBooterPlugin.LOGGER.info("Initializing MixinExtras..."); From cf59ba1080dc2bf7eb3f60e4ae5cff82639cb042 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sun, 7 Jan 2024 19:37:29 +0800 Subject: [PATCH 002/130] Update readme --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2849c0c20..6bc05e46a 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,63 @@ # Cleanroom Minecraft -### Components: +## Features +### Implemented + +- 1.12.2 on Java 21 +- LWJGL3 +- A working *mod development template/kit* +- Patches for loading incompatible mods +- Built-in Mixin + +### Planning + +- CleanroomGradle to replace ForgeGradle +- No more Late and Early mixin +- Classfile API +- Scala 3 + Kotlin 2 +- Actually useful APIs (See [here](https://github.com/orgs/CleanroomMC/projects/4/)) +- Optimized +- Compatibility + +## Components: - Minecraft Coder Pack - CleanroomLoader (Continuation + Revamp of ForgeModLoader) - Cleanroom Minecraft (Continuation + Revamp of MinecraftForge) -- Mixin [(Coming Soon)](https://github.com/CleanroomMC/Mixin) +- Mixin [(Coming Soon)](https://github.com/CleanroomMC/CleanMix) - Bytecode Patcher (Coming Soon) \[Inspired by [Bansoukou](https://github.com/LoliKingdom/Bansoukou) and [Bytecode Patcher](https://github.com/jbredwards/Bytecode-Patcher)] -### Build Instructions: +## Build Instructions: 1. Clone this repository 2. Import the `build.gradle` into your IDE (most preferably IntelliJ IDEA) 3. Once the import has finished, run `gradlew setup` 4. Build with `gradlew build` -### Roadmap flow chart +## Development Tips: + +- Only modify `projects/cleanroom/src/` directory if you want to change vanilla +- Run `gradlew genPatches` before commit, or the changes won't exist +- Modifications on `src/` doesn't need generating patches +- [Tips from Forge](https://github.com/MinecraftForge/MinecraftForge/wiki/If-you-want-to-contribute-to-Forge) are still apply, keep the patches clean! +- The current patches is full of useless hunks after we switched to VineFlower, we encourage contributors to manual clean up their patches + +## Mod Development: +There's an unofficial [template](https://github.com/kappa-maintainer/ExampleMod-1.12.2-FG5) exist. Note: You need to build before run. +## Roadmap flow chart ```mermaid graph TD; - A(Mixin integration)-->D(Milestone 1); - B(LWJGL incompat)-->D; - C(Newer Java incompat)-->D; - D-->E(New config system); + A(Mixin integration)-->D(Bouncepad overhaul - we are here); + B(LWJGL compat)-->D; + C(Newer Java compat)-->D; + D-->E(Config any time); D-->G(Minor improvement and fixes) E-->F(Greater improvement needs configs) - X(Cleanroom Gradle)-->Y(MDK or template) - Y-->Z(New APIs can be used by mods) - D-->Z + X(Cleanroom Gradle)-->D + D-->X + D-->Y(Better Mixin Integration) + Y-->D ``` From 69cac1371cb85d3aa7bc615c6072ba2402795d9f Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Tue, 9 Jan 2024 16:31:12 +0800 Subject: [PATCH 003/130] Cleanup FontRenderer, revert certain methods to fix crash with TiC --- .../client/gui/FontRenderer.java.patch | 335 ++---------------- 1 file changed, 27 insertions(+), 308 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch index 322607fc6..69da355db 100644 --- a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch @@ -1,22 +1,20 @@ --- before/net/minecraft/client/gui/FontRenderer.java +++ after/net/minecraft/client/gui/FontRenderer.java -@@ -4,11 +4,11 @@ +@@ -3,6 +3,7 @@ + import com.ibm.icu.text.ArabicShaping; import com.ibm.icu.text.ArabicShapingException; import com.ibm.icu.text.Bidi; ++import com.ibm.icu.text.BreakIterator; import java.awt.image.BufferedImage; -+import java.io.Closeable; import java.io.IOException; --import java.util.Arrays; --import java.util.List; --import java.util.Locale; --import java.util.Random; + import java.util.Arrays; +@@ -25,10 +26,13 @@ + import net.minecraftforge.fml.relauncher.SideOnly; + import org.apache.commons.io.IOUtils; + +import java.util.*; + -+import com.ibm.icu.text.BreakIterator; - import net.minecraft.client.Minecraft; - import net.minecraft.client.renderer.BufferBuilder; - import net.minecraft.client.renderer.GlStateManager; -@@ -29,6 +29,7 @@ + @SideOnly(Side.CLIENT) public class FontRenderer implements IResourceManagerReloadListener { private static final ResourceLocation[] field_111274_c = new ResourceLocation[256]; @@ -24,7 +22,7 @@ protected final int[] field_78286_d = new int[256]; public int field_78288_b = 9; public Random field_78289_c = new Random(); -@@ -56,7 +57,7 @@ +@@ -56,7 +60,7 @@ this.field_111273_g = p_i1035_2_; this.field_78298_i = p_i1035_3_; this.field_78293_l = p_i1035_4_; @@ -33,22 +31,7 @@ for (int i = 0; i < 32; ++i) { -@@ -87,13 +88,12 @@ - i1 /= 4; - } - -- this.field_78285_g[i] = (k & 0xFF) << 16 | (l & 0xFF) << 8 | i1 & 0xFF; -+ this.field_78285_g[i] = (k & 255) << 16 | (l & 255) << 8 | i1 & 255; - } - - this.func_98306_d(); - } - -- @Override - public void func_110549_a(IResourceManager p_110549_1_) - { - this.func_111272_d(); -@@ -107,7 +107,7 @@ +@@ -107,7 +111,7 @@ try { @@ -57,35 +40,7 @@ bufferedimage = TextureUtil.func_177053_a(iresource.func_110527_b()); } catch (IOException ioexception) -@@ -116,7 +116,7 @@ - } - finally - { -- IOUtils.closeQuietly(iresource); -+ IOUtils.closeQuietly((Closeable)iresource); - } - - int lvt_3_2_ = bufferedimage.getWidth(); -@@ -149,7 +149,7 @@ - { - int k2 = (k1 * lvt_7_1_ + j2) * lvt_3_2_; - -- if ((lvt_5_1_[i2 + k2] >> 24 & 0xFF) != 0) -+ if ((lvt_5_1_[i2 + k2] >> 24 & 255) != 0) - { - flag1 = false; - } -@@ -161,7 +161,8 @@ - } - } - -- this.field_78286_d[lvt_10_1_] = (int)(0.5 + (double)((float)(++l1) * lvt_9_1_)) + 1; -+ ++l1; -+ this.field_78286_d[lvt_10_1_] = (int)(0.5D + (double)((float)l1 * lvt_9_1_)) + 1; - } - } - -@@ -171,7 +172,7 @@ +@@ -171,7 +175,7 @@ try { @@ -94,14 +49,7 @@ iresource.func_110527_b().read(this.field_78287_e); } catch (IOException ioexception) -@@ -180,20 +181,20 @@ - } - finally - { -- IOUtils.closeQuietly(iresource); -+ IOUtils.closeQuietly((Closeable)iresource); - } - } +@@ -186,6 +190,7 @@ private float func_181559_a(char p_181559_1_, boolean p_181559_2_) { @@ -109,16 +57,7 @@ if (p_181559_1_ == ' ') { return 4.0F; - } - else - { -- int i = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000" -- .indexOf(p_181559_1_); -+ int i = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000".indexOf(p_181559_1_); - return i != -1 && !this.field_78293_l ? this.func_78266_a(i, p_181559_2_) : this.func_78277_a(p_181559_1_, p_181559_2_); - } - } -@@ -203,7 +204,7 @@ +@@ -203,7 +208,7 @@ int i = p_78266_1_ % 16 * 8; int j = p_78266_1_ / 16 * 8; int k = p_78266_2_ ? 1 : 0; @@ -127,7 +66,7 @@ int l = this.field_78286_d[p_78266_1_]; float f = (float)l - 0.01F; GlStateManager.func_187447_r(5); -@@ -231,7 +232,7 @@ +@@ -231,7 +236,7 @@ private void func_78257_a(int p_78257_1_) { @@ -136,7 +75,7 @@ } protected float func_78277_a(char p_78277_1_, boolean p_78277_2_) -@@ -280,7 +281,7 @@ +@@ -280,7 +285,7 @@ public int func_175065_a(String p_175065_1_, float p_175065_2_, float p_175065_3_, int p_175065_4_, boolean p_175065_5_) { @@ -145,21 +84,7 @@ this.func_78265_b(); int i; -@@ -301,11 +302,11 @@ - { - try - { -- Bidi bidi = new Bidi(new ArabicShaping(8).shape(p_147647_1_), 127); -+ Bidi bidi = new Bidi((new ArabicShaping(8)).shape(p_147647_1_), 127); - bidi.setReorderingMode(0); - return bidi.writeReordered(2); - } -- catch (ArabicShapingException arabicshapingexception) -+ catch (ArabicShapingException var3) - { - return p_147647_1_; - } -@@ -350,7 +351,7 @@ +@@ -350,7 +355,7 @@ int j1 = this.field_78285_g[i1]; this.field_78304_r = j1; @@ -168,7 +93,7 @@ } else if (i1 == 16) { -@@ -379,37 +380,35 @@ +@@ -379,7 +384,7 @@ this.field_78299_w = false; this.field_78300_v = false; this.field_78301_u = false; @@ -177,38 +102,7 @@ } ++i; - } - else - { -- int j = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000" -- .indexOf(c0); -+ int j = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000".indexOf(c0); - - if (this.field_78303_s && j != -1) - { - int k = this.func_78263_a(c0); - char c1; - -- do -+ while (true) - { -- j = this.field_78289_c -- .nextInt( -- "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000" -- .length() -- ); -- c1 = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000" -- .charAt(j); -+ j = this.field_78289_c.nextInt("\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000".length()); -+ c1 = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000".charAt(j); -+ -+ if (k == this.func_78263_a(c1)) -+ { -+ break; -+ } - } -- while (k != this.func_78263_a(c1)); - +@@ -409,7 +414,7 @@ c0 = c1; } @@ -217,7 +111,7 @@ boolean flag = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_; if (flag) -@@ -447,6 +446,15 @@ +@@ -447,6 +452,15 @@ ++f; } @@ -233,91 +127,7 @@ if (this.field_78299_w) { -@@ -454,13 +462,10 @@ - BufferBuilder bufferbuilder = tessellator.func_178180_c(); - GlStateManager.func_179090_x(); - bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181705_e); -- bufferbuilder.func_181662_b((double)this.field_78295_j, (double)(this.field_78296_k + (float)(this.field_78288_b / 2)), 0.0).func_181675_d(); -- bufferbuilder.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)(this.field_78288_b / 2)), 0.0) -- .func_181675_d(); -- bufferbuilder.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)(this.field_78288_b / 2) - 1.0F), 0.0) -- .func_181675_d(); -- bufferbuilder.func_181662_b((double)this.field_78295_j, (double)(this.field_78296_k + (float)(this.field_78288_b / 2) - 1.0F), 0.0) -- .func_181675_d(); -+ bufferbuilder.func_181662_b((double)this.field_78295_j, (double)(this.field_78296_k + (float)(this.field_78288_b / 2)), 0.0D).func_181675_d(); -+ bufferbuilder.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)(this.field_78288_b / 2)), 0.0D).func_181675_d(); -+ bufferbuilder.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)(this.field_78288_b / 2) - 1.0F), 0.0D).func_181675_d(); -+ bufferbuilder.func_181662_b((double)this.field_78295_j, (double)(this.field_78296_k + (float)(this.field_78288_b / 2) - 1.0F), 0.0D).func_181675_d(); - tessellator.func_78381_a(); - GlStateManager.func_179098_w(); - } -@@ -472,13 +477,10 @@ - GlStateManager.func_179090_x(); - bufferbuilder1.func_181668_a(7, DefaultVertexFormats.field_181705_e); - int l = this.field_78300_v ? -1 : 0; -- bufferbuilder1.func_181662_b((double)(this.field_78295_j + (float)l), (double)(this.field_78296_k + (float)this.field_78288_b), 0.0) -- .func_181675_d(); -- bufferbuilder1.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)this.field_78288_b), 0.0).func_181675_d(); -- bufferbuilder1.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)this.field_78288_b - 1.0F), 0.0) -- .func_181675_d(); -- bufferbuilder1.func_181662_b((double)(this.field_78295_j + (float)l), (double)(this.field_78296_k + (float)this.field_78288_b - 1.0F), 0.0) -- .func_181675_d(); -+ bufferbuilder1.func_181662_b((double)(this.field_78295_j + (float)l), (double)(this.field_78296_k + (float)this.field_78288_b), 0.0D).func_181675_d(); -+ bufferbuilder1.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)this.field_78288_b), 0.0D).func_181675_d(); -+ bufferbuilder1.func_181662_b((double)(this.field_78295_j + f), (double)(this.field_78296_k + (float)this.field_78288_b - 1.0F), 0.0D).func_181675_d(); -+ bufferbuilder1.func_181662_b((double)(this.field_78295_j + (float)l), (double)(this.field_78296_k + (float)this.field_78288_b - 1.0F), 0.0D).func_181675_d(); - tessellator1.func_78381_a(); - GlStateManager.func_179098_w(); - } -@@ -519,14 +521,14 @@ - - if (p_180455_5_) - { -- p_180455_4_ = (p_180455_4_ & 16579836) >> 2 | p_180455_4_ & 0xFF000000; -+ p_180455_4_ = (p_180455_4_ & 16579836) >> 2 | p_180455_4_ & -16777216; - } - -- this.field_78291_n = (float)(p_180455_4_ >> 16 & 0xFF) / 255.0F; -- this.field_78292_o = (float)(p_180455_4_ >> 8 & 0xFF) / 255.0F; -- this.field_78306_p = (float)(p_180455_4_ & 0xFF) / 255.0F; -- this.field_78305_q = (float)(p_180455_4_ >> 24 & 0xFF) / 255.0F; -- GlStateManager.func_179131_c(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); -+ this.field_78291_n = (float)(p_180455_4_ >> 16 & 255) / 255.0F; -+ this.field_78292_o = (float)(p_180455_4_ >> 8 & 255) / 255.0F; -+ this.field_78306_p = (float)(p_180455_4_ & 255) / 255.0F; -+ this.field_78305_q = (float)(p_180455_4_ >> 24 & 255) / 255.0F; -+ setColor(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); - this.field_78295_j = p_180455_2_; - this.field_78296_k = p_180455_3_; - this.func_78255_a(p_180455_1_, p_180455_5_); -@@ -552,16 +554,20 @@ - - if (k < 0 && j < p_78256_1_.length() - 1) - { -- c0 = p_78256_1_.charAt(++j); -+ ++j; -+ c0 = p_78256_1_.charAt(j); - -- if (c0 == 'l' || c0 == 'L') -+ if (c0 != 'l' && c0 != 'L') -+ { -+ if (c0 == 'r' || c0 == 'R') -+ { -+ flag = false; -+ } -+ } -+ else - { - flag = true; - } -- else if (c0 == 'r' || c0 == 'R') -- { -- flag = false; -- } - - k = 0; - } -@@ -580,6 +586,7 @@ +@@ -580,6 +594,7 @@ public int func_78263_a(char p_78263_1_) { @@ -325,17 +135,7 @@ if (p_78263_1_ == 167) { return -1; -@@ -590,8 +597,7 @@ - } - else - { -- int i = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000" -- .indexOf(p_78263_1_); -+ int i = "\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3\u00d4\u00d5\u00da\u00df\u00e3\u00f5\u011f\u0130\u0131\u0152\u0153\u015e\u015f\u0174\u0175\u017e\u0207\u0000\u0000\u0000\u0000\u0000\u0000\u0000 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0000\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f8\u00a3\u00d8\u00d7\u0192\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u00ae\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\u03b2\u0393\u03c0\u03a3\u03c3\u03bc\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u2205\u2208\u2229\u2261\u00b1\u2265\u2264\u2320\u2321\u00f7\u2248\u00b0\u2219\u00b7\u221a\u207f\u00b2\u25a0\u0000".indexOf(p_78263_1_); - - if (p_78263_1_ > 0 && i != -1 && !this.field_78293_l) - { -@@ -635,14 +641,17 @@ +@@ -635,14 +650,17 @@ { flag = false; @@ -358,7 +158,7 @@ } else if (i1 < 0) { -@@ -678,7 +687,7 @@ +@@ -678,7 +696,7 @@ private String func_78273_d(String p_78273_1_) { @@ -367,7 +167,7 @@ { p_78273_1_ = p_78273_1_.substring(0, p_78273_1_.length() - 1); } -@@ -725,9 +734,95 @@ +@@ -725,9 +743,95 @@ public List func_78271_c(String p_78271_1_, int p_78271_2_) { @@ -464,96 +264,15 @@ String func_78280_d(String p_78280_1_, int p_78280_2_) { int i = this.func_78259_e(p_78280_1_, p_78280_2_); -@@ -745,54 +840,46 @@ - return s + "\n" + this.func_78280_d(s1, p_78280_2_); +@@ -746,6 +850,7 @@ } } -- + + @Deprecated private int func_78259_e(String p_78259_1_, int p_78259_2_) { int i = p_78259_1_.length(); - int j = 0; - int k = 0; -- int l = -1; -- -- for (boolean flag = false; k < i; ++k) -+ int m = 0; -+ BREAK_ITERATOR.setText(p_78259_1_.replaceAll("\u00a7.", "").replaceAll("\u00a7", "")); -+ for (boolean flag = false; k < i; ++k, ++m) - { - char c0 = p_78259_1_.charAt(k); - -- switch (c0) -- { -- case '\n': -- --k; -- break; -- case ' ': -- l = k; -- default: -+ switch (c0) { -+ case '\n' -> --k; -+ default -> { - j += this.func_78263_a(c0); -- -- if (flag) -- { -+ if (flag) { - ++j; - } -- -- break; -- case '\u00a7': -- -- if (k < i - 1) -- { -- char c1 = p_78259_1_.charAt(++k); -- -- if (c1 == 'l' || c1 == 'L') -- { -+ } -+ case '\u00a7' -> { -+ if (k < i - 1) { -+ ++k; -+ --m; -+ char c1 = p_78259_1_.charAt(k); -+ -+ if (c1 != 'l' && c1 != 'L') { -+ if (c1 == 'r' || c1 == 'R' || func_78272_b(c1)) { -+ flag = false; -+ } -+ } else { - flag = true; - } -- else if (c1 == 'r' || c1 == 'R' || func_78272_b(c1)) -- { -- flag = false; -- } - } -+ } - } - - if (c0 == '\n') - { -- l = ++k; -+ ++k; - break; - } - -@@ -801,8 +888,9 @@ - break; - } - } -- -- return k != i && l != -1 && l < k ? l : k; -+ BREAK_ITERATOR.following(m); -+ int breakLine = BREAK_ITERATOR.previous(); -+ return breakLine < 0 ? k : breakLine; - } - - private static boolean func_78272_b(char p_78272_0_) -@@ -844,6 +932,26 @@ +@@ -844,6 +949,26 @@ public boolean func_78260_a() { return this.field_78294_m; From a40ed1076142c4b2be7cd3a3780e7538ab0577ea Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Tue, 9 Jan 2024 16:31:50 +0800 Subject: [PATCH 004/130] Update oshi --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 393a6321f..d76a285e2 100644 --- a/build.gradle +++ b/build.gradle @@ -439,7 +439,7 @@ project(':cleanroom') { installer 'org.apache.commons:commons-compress:1.24.0' installer 'org.apache.httpcomponents:httpclient:4.5.14' installer 'org.apache.httpcomponents:httpcore:4.4.16' - installer 'com.github.oshi:oshi-core:6.4.6' + installer 'com.github.oshi:oshi-core:6.4.10' installer 'it.unimi.dsi:fastutil:8.5.12' installer 'commons-codec:commons-codec:1.16.0' installer 'commons-io:commons-io:2.15.0' From 32590a92f0b772d77e7565a7937663312492080a Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 11 Jan 2024 07:55:11 +0800 Subject: [PATCH 005/130] exclude lwjgl3 in bouncepad --- gradle.properties | 2 +- src/main/java/com/cleanroommc/hackery/Reflection.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index baab933ee..c87c85e3a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.23-cursed +bouncepad_version = 0.4.24-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. diff --git a/src/main/java/com/cleanroommc/hackery/Reflection.java b/src/main/java/com/cleanroommc/hackery/Reflection.java index f458f8fa2..3d0e5633c 100644 --- a/src/main/java/com/cleanroommc/hackery/Reflection.java +++ b/src/main/java/com/cleanroommc/hackery/Reflection.java @@ -3,7 +3,6 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; -import java.util.Collections; import java.util.Set; public class Reflection { From 1eb052492032dee352dbe0ec4ba1dc0c33eb6b88 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 11 Jan 2024 17:15:31 +0800 Subject: [PATCH 006/130] Should fix TickCentral ... but why? --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c87c85e3a..9e697c56a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.24-cursed +bouncepad_version = 0.4.25-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. From eea0c81e33783a86dd54be01afd5dd1ef26611b6 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Fri, 12 Jan 2024 15:16:23 +0800 Subject: [PATCH 007/130] Fix stupid error in bouncepad --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9e697c56a..1a277eddd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.25-cursed +bouncepad_version = 0.4.26-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. From 012fb3612ea1ee0b55a33c5ba256d09636b94c87 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sat, 13 Jan 2024 20:22:39 +0800 Subject: [PATCH 008/130] Fix ASMUpper mistake in bouncepad --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1a277eddd..b7e6ad2ea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.26-cursed +bouncepad_version = 0.4.27-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. From c9dca4411ae7ea66d1e503547f3f201e7b24457e Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sun, 14 Jan 2024 21:17:50 +0800 Subject: [PATCH 009/130] Andriod support thanks to @ShirosakiMio --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b7e6ad2ea..7269e8857 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.27-cursed +bouncepad_version = 0.4.28-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. From 1e1206f8c4e39531f113552c7e065035f48586c9 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Tue, 16 Jan 2024 19:22:43 +0800 Subject: [PATCH 010/130] Add information about fugue --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6bc05e46a..7542c0bd4 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ - Cleanroom Minecraft (Continuation + Revamp of MinecraftForge) - Mixin [(Coming Soon)](https://github.com/CleanroomMC/CleanMix) - Bytecode Patcher (Coming Soon) \[Inspired by [Bansoukou](https://github.com/LoliKingdom/Bansoukou) and [Bytecode Patcher](https://github.com/jbredwards/Bytecode-Patcher)] +- [Fugue](https://github.com/CleanroomMC/Fugue), a mod patches many incompatibilities. (temporary) ## Build Instructions: From 3b5303dee5bbd2984b7f956050eff56e7fe87fd5 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 18 Jan 2024 08:21:56 +0800 Subject: [PATCH 011/130] Update MixinExtra --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d76a285e2..7db61816a 100644 --- a/build.gradle +++ b/build.gradle @@ -461,7 +461,7 @@ project(':cleanroom') { // Mixin installer 'com.cleanroommc:sponge-mixin:0.15.4+mixin.0.8.5' - installer annotationProcessor('io.github.llamalad7:mixinextras-common:0.3.2') + installer annotationProcessor('io.github.llamalad7:mixinextras-common:0.3.5') testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0' testImplementation 'org.junit.vintage:junit-vintage-engine:5.+' From 159412acb83e44c4229b74b8ea4abf49268e0899 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Fri, 19 Jan 2024 11:00:20 +0800 Subject: [PATCH 012/130] Update lwkglx OpenAL, fix incompat with SoundPhycsic --- src/main/java/org/lwjgl/openal/AL.java | 21 +- src/main/java/org/lwjgl/openal/EFX10.java | 688 +++++++++++++++++++--- 2 files changed, 609 insertions(+), 100 deletions(-) diff --git a/src/main/java/org/lwjgl/openal/AL.java b/src/main/java/org/lwjgl/openal/AL.java index 3b937cd3f..7bb899320 100644 --- a/src/main/java/org/lwjgl/openal/AL.java +++ b/src/main/java/org/lwjgl/openal/AL.java @@ -20,16 +20,16 @@ public class AL { } public static void create() throws LWJGLException { - create(org.lwjgl3.openal.ALC10.alcGetString(0, ALC10.ALC_DEFAULT_DEVICE_SPECIFIER), 44100, 60, false); + create(null, 44100, 60, false); } - public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) - throws LWJGLException { + public static void create(String deviceArguments, int contextFrequency, int contextRefresh, + boolean contextSynchronized) { create(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, true); } - public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice) - throws LWJGLException { + public static void create(String deviceArguments, int contextFrequency, int contextRefresh, + boolean contextSynchronized, boolean openDevice) { IntBuffer attribs = BufferUtils.createIntBuffer(16); attribs.put(org.lwjgl3.openal.ALC10.ALC_FREQUENCY); @@ -40,11 +40,16 @@ public static void create(String deviceArguments, int contextFrequency, int cont attribs.put(org.lwjgl3.openal.ALC10.ALC_SYNC); attribs.put(contextSynchronized ? org.lwjgl3.openal.ALC10.ALC_TRUE : org.lwjgl3.openal.ALC10.ALC_FALSE); + + attribs.put(org.lwjgl3.openal.EXTEfx.ALC_MAX_AUXILIARY_SENDS); + attribs.put(4); attribs.put(0); attribs.flip(); - long deviceHandle = org.lwjgl3.openal.ALC10.alcOpenDevice(deviceArguments); + String defaultDevice = org.lwjgl3.openal.ALC10.alcGetString(0, ALC10.ALC_DEFAULT_DEVICE_SPECIFIER); + + long deviceHandle = org.lwjgl3.openal.ALC10.alcOpenDevice(defaultDevice); alcDevice = new ALCdevice(deviceHandle); @@ -70,6 +75,10 @@ public static void destroy() { created = false; } + public static org.lwjgl.openal.ALCcontext getContext() { + return alcContext; + } + public static ALCdevice getDevice() { return alcDevice; } diff --git a/src/main/java/org/lwjgl/openal/EFX10.java b/src/main/java/org/lwjgl/openal/EFX10.java index c6d91602d..0b351d110 100644 --- a/src/main/java/org/lwjgl/openal/EFX10.java +++ b/src/main/java/org/lwjgl/openal/EFX10.java @@ -1,143 +1,643 @@ package org.lwjgl.openal; -import java.nio.IntBuffer; - import org.lwjgl3.openal.EXTEfx; +@SuppressWarnings("unused") public class EFX10 { - public static final int AL_EFFECT_TYPE = EXTEfx.AL_EFFECT_TYPE; - public static final int AL_EFFECTSLOT_EFFECT = EXTEfx.AL_EFFECTSLOT_EFFECT; - public static final int AL_EFFECT_ECHO = EXTEfx.AL_EFFECT_ECHO; - public static final float AL_ECHO_MIN_DAMPING = EXTEfx.AL_ECHO_MIN_DAMPING; - public static final int AL_ECHO_DAMPING = EXTEfx.AL_ECHO_DAMPING; - public static final float AL_ECHO_MAX_DAMPING = EXTEfx.AL_ECHO_MAX_DAMPING; - public static final float AL_ECHO_MIN_DELAY = EXTEfx.AL_ECHO_MIN_DELAY; - public static final int AL_ECHO_DELAY = EXTEfx.AL_ECHO_DELAY; - public static final float AL_ECHO_MAX_DELAY = EXTEfx.AL_ECHO_MAX_DELAY; - public static final float AL_ECHO_MIN_FEEDBACK = EXTEfx.AL_ECHO_MIN_FEEDBACK; - public static final int AL_ECHO_FEEDBACK = EXTEfx.AL_ECHO_FEEDBACK; - public static final float AL_ECHO_MAX_FEEDBACK = EXTEfx.AL_ECHO_MAX_FEEDBACK; - public static final float AL_ECHO_MIN_LRDELAY = EXTEfx.AL_ECHO_MIN_LRDELAY; - public static final int AL_ECHO_LRDELAY = EXTEfx.AL_ECHO_LRDELAY; - public static final float AL_ECHO_MAX_LRDELAY = EXTEfx.AL_ECHO_MAX_LRDELAY; - public static final float AL_ECHO_MIN_SPREAD = EXTEfx.AL_ECHO_MIN_SPREAD; - public static final int AL_ECHO_SPREAD = EXTEfx.AL_ECHO_SPREAD; - public static final float AL_ECHO_MAX_SPREAD = EXTEfx.AL_ECHO_MAX_SPREAD; - public static final int AL_EFFECT_REVERB = EXTEfx.AL_EFFECT_REVERB; - public static final int AL_RING_MODULATOR_SINUSOID = EXTEfx.AL_RING_MODULATOR_SINUSOID; - public static final int AL_RING_MODULATOR_SAWTOOTH = EXTEfx.AL_RING_MODULATOR_SAWTOOTH; - public static final int AL_RING_MODULATOR_SQUARE = EXTEfx.AL_RING_MODULATOR_SQUARE; - public static final int AL_EFFECT_RING_MODULATOR = EXTEfx.AL_EFFECT_RING_MODULATOR; - public static final float AL_RING_MODULATOR_MAX_FREQUENCY = EXTEfx.AL_RING_MODULATOR_MAX_FREQUENCY; - public static final int AL_RING_MODULATOR_FREQUENCY = EXTEfx.AL_RING_MODULATOR_FREQUENCY; - public static final float AL_RING_MODULATOR_MIN_FREQUENCY = EXTEfx.AL_RING_MODULATOR_MIN_FREQUENCY; - public static final float AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = EXTEfx.AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF; - public static final int AL_RING_MODULATOR_HIGHPASS_CUTOFF = EXTEfx.AL_RING_MODULATOR_HIGHPASS_CUTOFF; - public static final float AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = EXTEfx.AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF; - public static final int AL_RING_MODULATOR_WAVEFORM = EXTEfx.AL_RING_MODULATOR_WAVEFORM; - public static final int AL_FILTER_TYPE = EXTEfx.AL_FILTER_TYPE; - public static final int AL_FILTER_LOWPASS = EXTEfx.AL_FILTER_LOWPASS; - public static final int AL_LOWPASS_GAIN = EXTEfx.AL_LOWPASS_GAIN; - public static final int AL_LOWPASS_GAINHF = EXTEfx.AL_LOWPASS_GAINHF; - public static final int AL_EFFECTSLOT_NULL = EXTEfx.AL_EFFECTSLOT_NULL; - public static final int AL_FILTER_NULL = EXTEfx.AL_FILTER_NULL; - public static final int AL_AUXILIARY_SEND_FILTER = EXTEfx.AL_AUXILIARY_SEND_FILTER; - public static final int AL_DIRECT_FILTER = EXTEfx.AL_DIRECT_FILTER; - public static final int ALC_MAX_AUXILIARY_SENDS = EXTEfx.ALC_MAX_AUXILIARY_SENDS; - public static final int ALC_EFX_MAJOR_VERSION = EXTEfx.ALC_EFX_MAJOR_VERSION; - public static final int AL_REVERB_DECAY_TIME = EXTEfx.AL_REVERB_DECAY_TIME; - public static final int AL_FILTER_HIGHPASS = EXTEfx.AL_FILTER_HIGHPASS; - public static final int AL_FILTER_BANDPASS = EXTEfx.AL_FILTER_BANDPASS; - public static final int AL_EFFECT_NULL = EXTEfx.AL_EFFECT_NULL; - public static final int AL_EFFECT_EAXREVERB = EXTEfx.AL_EFFECT_EAXREVERB; - public static final int AL_EFFECT_CHORUS = EXTEfx.AL_EFFECT_CHORUS; - public static final int AL_EFFECT_DISTORTION = EXTEfx.AL_EFFECT_DISTORTION; - public static final int AL_EFFECT_FLANGER = EXTEfx.AL_EFFECT_FLANGER; - public static final int AL_EFFECT_FREQUENCY_SHIFTER = EXTEfx.AL_EFFECT_FREQUENCY_SHIFTER; - public static final int AL_EFFECT_VOCAL_MORPHER = EXTEfx.AL_EFFECT_VOCAL_MORPHER; - public static final int AL_EFFECT_PITCH_SHIFTER = EXTEfx.AL_EFFECT_PITCH_SHIFTER; - public static final int AL_EFFECT_AUTOWAH = EXTEfx.AL_EFFECT_AUTOWAH; - public static final int AL_EFFECT_COMPRESSOR = EXTEfx.AL_EFFECT_COMPRESSOR; - public static final int AL_EFFECT_EQUALIZER = EXTEfx.AL_EFFECT_EQUALIZER; + public static final int ALC_EFX_MAJOR_VERSION = (int) 131073; + public static final int ALC_EFX_MINOR_VERSION = (int) 131074; + public static final java.lang.String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; + public static final int ALC_MAX_AUXILIARY_SENDS = (int) 131075; + public static final int AL_AIR_ABSORPTION_FACTOR = (int) 131079; + public static final int AL_AUTOWAH_ATTACK_TIME = (int) 1; + public static final float AL_AUTOWAH_DEFAULT_ATTACK_TIME = (float) 0.06F; + public static final float AL_AUTOWAH_DEFAULT_PEAK_GAIN = (float) 11.22F; + public static final float AL_AUTOWAH_DEFAULT_RELEASE_TIME = (float) 0.06F; + public static final float AL_AUTOWAH_DEFAULT_RESONANCE = (float) 1000.0F; + public static final float AL_AUTOWAH_MAX_ATTACK_TIME = (float) 1.0F; + public static final float AL_AUTOWAH_MAX_PEAK_GAIN = (float) 31621.0F; + public static final float AL_AUTOWAH_MAX_RELEASE_TIME = (float) 1.0F; + public static final float AL_AUTOWAH_MAX_RESONANCE = (float) 1000.0F; + public static final float AL_AUTOWAH_MIN_ATTACK_TIME = (float) 1.0E-4F; + public static final float AL_AUTOWAH_MIN_PEAK_GAIN = (float) 3.0E-5F; + public static final float AL_AUTOWAH_MIN_RELEASE_TIME = (float) 1.0E-4F; + public static final float AL_AUTOWAH_MIN_RESONANCE = (float) 2.0F; + public static final int AL_AUTOWAH_PEAK_GAIN = (int) 4; + public static final int AL_AUTOWAH_RELEASE_TIME = (int) 2; + public static final int AL_AUTOWAH_RESONANCE = (int) 3; + public static final int AL_AUXILIARY_SEND_FILTER = (int) 131078; + public static final int AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 131084; + public static final int AL_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 131083; + public static final int AL_BANDPASS_GAIN = (int) 1; + public static final int AL_BANDPASS_GAINHF = (int) 3; + public static final int AL_BANDPASS_GAINLF = (int) 2; + public static final float AL_CHORUS_DEFAULT_DELAY = (float) 0.016F; + public static final float AL_CHORUS_DEFAULT_DEPTH = (float) 0.1F; + public static final float AL_CHORUS_DEFAULT_FEEDBACK = (float) 0.25F; + public static final int AL_CHORUS_DEFAULT_PHASE = (int) 90; + public static final float AL_CHORUS_DEFAULT_RATE = (float) 1.1F; + public static final int AL_CHORUS_DEFAULT_WAVEFORM = (int) 1; + public static final int AL_CHORUS_DELAY = (int) 6; + public static final int AL_CHORUS_DEPTH = (int) 4; + public static final int AL_CHORUS_FEEDBACK = (int) 5; + public static final float AL_CHORUS_MAX_DELAY = (float) 0.016F; + public static final float AL_CHORUS_MAX_DEPTH = (float) 1.0F; + public static final float AL_CHORUS_MAX_FEEDBACK = (float) 1.0F; + public static final int AL_CHORUS_MAX_PHASE = (int) 180; + public static final float AL_CHORUS_MAX_RATE = (float) 10.0F; + public static final int AL_CHORUS_MAX_WAVEFORM = (int) 1; + public static final float AL_CHORUS_MIN_DELAY = (float) 0.0F; + public static final float AL_CHORUS_MIN_DEPTH = (float) 0.0F; + public static final float AL_CHORUS_MIN_FEEDBACK = (float) -1.0F; + public static final int AL_CHORUS_MIN_PHASE = (int) -180; + public static final float AL_CHORUS_MIN_RATE = (float) 0.0F; + public static final int AL_CHORUS_MIN_WAVEFORM = (int) 0; + public static final int AL_CHORUS_PHASE = (int) 2; + public static final int AL_CHORUS_RATE = (int) 3; + public static final int AL_CHORUS_WAVEFORM = (int) 1; + public static final int AL_CHORUS_WAVEFORM_SINUSOID = (int) 0; + public static final int AL_CHORUS_WAVEFORM_TRIANGLE = (int) 1; + public static final int AL_COMPRESSOR_DEFAULT_ONOFF = (int) 1; + public static final int AL_COMPRESSOR_MAX_ONOFF = (int) 1; + public static final int AL_COMPRESSOR_MIN_ONOFF = (int) 0; + public static final int AL_COMPRESSOR_ONOFF = (int) 1; + public static final int AL_CONE_OUTER_GAINHF = (int) 131081; + public static final float AL_DEFAULT_AIR_ABSORPTION_FACTOR = (float) 0.0F; + public static final int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 1; + public static final int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 1; + public static final float AL_DEFAULT_CONE_OUTER_GAINHF = (float) 1.0F; + public static final int AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO = (int) 1; + public static final float AL_DEFAULT_METERS_PER_UNIT = (float) 1.0F; + public static final float AL_DEFAULT_ROOM_ROLLOFF_FACTOR = (float) 0.0F; + public static final int AL_DIRECT_FILTER = (int) 131077; + public static final int AL_DIRECT_FILTER_GAINHF_AUTO = (int) 131082; + public static final float AL_DISTORTION_DEFAULT_EDGE = (float) 0.2F; + public static final float AL_DISTORTION_DEFAULT_EQBANDWIDTH = (float) 3600.0F; + public static final float AL_DISTORTION_DEFAULT_EQCENTER = (float) 3600.0F; + public static final float AL_DISTORTION_DEFAULT_GAIN = (float) 0.05F; + public static final float AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF = (float) 8000.0F; + public static final int AL_DISTORTION_EDGE = (int) 1; + public static final int AL_DISTORTION_EQBANDWIDTH = (int) 5; + public static final int AL_DISTORTION_EQCENTER = (int) 4; + public static final int AL_DISTORTION_GAIN = (int) 2; + public static final int AL_DISTORTION_LOWPASS_CUTOFF = (int) 3; + public static final float AL_DISTORTION_MAX_EDGE = (float) 1.0F; + public static final float AL_DISTORTION_MAX_EQBANDWIDTH = (float) 24000.0F; + public static final float AL_DISTORTION_MAX_EQCENTER = (float) 24000.0F; + public static final float AL_DISTORTION_MAX_GAIN = (float) 1.0F; + public static final float AL_DISTORTION_MAX_LOWPASS_CUTOFF = (float) 24000.0F; + public static final float AL_DISTORTION_MIN_EDGE = (float) 0.0F; + public static final float AL_DISTORTION_MIN_EQBANDWIDTH = (float) 80.0F; + public static final float AL_DISTORTION_MIN_EQCENTER = (float) 80.0F; + public static final float AL_DISTORTION_MIN_GAIN = (float) 0.01F; + public static final float AL_DISTORTION_MIN_LOWPASS_CUTOFF = (float) 80.0F; + public static final int AL_EAXREVERB_AIR_ABSORPTION_GAINHF = (int) 19; + public static final int AL_EAXREVERB_DECAY_HFLIMIT = (int) 23; + public static final int AL_EAXREVERB_DECAY_HFRATIO = (int) 7; + public static final int AL_EAXREVERB_DECAY_LFRATIO = (int) 8; + public static final int AL_EAXREVERB_DECAY_TIME = (int) 6; + public static final float AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF = (float) 0.994F; + public static final int AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT = (int) 1; + public static final float AL_EAXREVERB_DEFAULT_DECAY_HFRATIO = (float) 0.83F; + public static final float AL_EAXREVERB_DEFAULT_DECAY_LFRATIO = (float) 1.0F; + public static final float AL_EAXREVERB_DEFAULT_DECAY_TIME = (float) 1.49F; + public static final float AL_EAXREVERB_DEFAULT_DENSITY = (float) 1.0F; + public static final float AL_EAXREVERB_DEFAULT_DIFFUSION = (float) 1.0F; + public static final float AL_EAXREVERB_DEFAULT_ECHO_DEPTH = (float) 0.0F; + public static final float AL_EAXREVERB_DEFAULT_ECHO_TIME = (float) 0.25F; + public static final float AL_EAXREVERB_DEFAULT_GAIN = (float) 0.32F; + public static final float AL_EAXREVERB_DEFAULT_GAINHF = (float) 0.89F; + public static final float AL_EAXREVERB_DEFAULT_GAINLF = (float) 1.0F; + public static final float AL_EAXREVERB_DEFAULT_HFREFERENCE = (float) 5000.0F; + public static final float AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY = (float) 0.011F; + public static final float AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN = (float) 1.26F; + public static final float AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ = (float) 0.0F; + public static final float AL_EAXREVERB_DEFAULT_LFREFERENCE = (float) 250.0F; + public static final float AL_EAXREVERB_DEFAULT_MODULATION_DEPTH = (float) 0.0F; + public static final float AL_EAXREVERB_DEFAULT_MODULATION_TIME = (float) 0.25F; + public static final float AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY = (float) 0.007F; + public static final float AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN = (float) 0.05F; + public static final float AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ = (float) 0.0F; + public static final float AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = (float) 0.0F; + public static final int AL_EAXREVERB_DENSITY = (int) 1; + public static final int AL_EAXREVERB_DIFFUSION = (int) 2; + public static final int AL_EAXREVERB_ECHO_DEPTH = (int) 16; + public static final int AL_EAXREVERB_ECHO_TIME = (int) 15; + public static final int AL_EAXREVERB_GAIN = (int) 3; + public static final int AL_EAXREVERB_GAINHF = (int) 4; + public static final int AL_EAXREVERB_GAINLF = (int) 5; + public static final int AL_EAXREVERB_HFREFERENCE = (int) 20; + public static final int AL_EAXREVERB_LATE_REVERB_DELAY = (int) 13; + public static final int AL_EAXREVERB_LATE_REVERB_GAIN = (int) 12; + public static final int AL_EAXREVERB_LATE_REVERB_PAN = (int) 14; + public static final int AL_EAXREVERB_LFREFERENCE = (int) 21; + public static final float AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF = (float) 1.0F; + public static final int AL_EAXREVERB_MAX_DECAY_HFLIMIT = (int) 1; + public static final float AL_EAXREVERB_MAX_DECAY_HFRATIO = (float) 2.0F; + public static final float AL_EAXREVERB_MAX_DECAY_LFRATIO = (float) 2.0F; + public static final float AL_EAXREVERB_MAX_DECAY_TIME = (float) 20.0F; + public static final float AL_EAXREVERB_MAX_DENSITY = (float) 1.0F; + public static final float AL_EAXREVERB_MAX_DIFFUSION = (float) 1.0F; + public static final float AL_EAXREVERB_MAX_ECHO_DEPTH = (float) 1.0F; + public static final float AL_EAXREVERB_MAX_ECHO_TIME = (float) 0.25F; + public static final float AL_EAXREVERB_MAX_GAIN = (float) 1.0F; + public static final float AL_EAXREVERB_MAX_GAINHF = (float) 1.0F; + public static final float AL_EAXREVERB_MAX_GAINLF = (float) 1.0F; + public static final float AL_EAXREVERB_MAX_HFREFERENCE = (float) 20000.0F; + public static final float AL_EAXREVERB_MAX_LATE_REVERB_DELAY = (float) 0.1F; + public static final float AL_EAXREVERB_MAX_LATE_REVERB_GAIN = (float) 10.0F; + public static final float AL_EAXREVERB_MAX_LFREFERENCE = (float) 1000.0F; + public static final float AL_EAXREVERB_MAX_MODULATION_DEPTH = (float) 1.0F; + public static final float AL_EAXREVERB_MAX_MODULATION_TIME = (float) 4.0F; + public static final float AL_EAXREVERB_MAX_REFLECTIONS_DELAY = (float) 0.3F; + public static final float AL_EAXREVERB_MAX_REFLECTIONS_GAIN = (float) 3.16F; + public static final float AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR = (float) 10.0F; + public static final float AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF = (float) 0.892F; + public static final int AL_EAXREVERB_MIN_DECAY_HFLIMIT = (int) 0; + public static final float AL_EAXREVERB_MIN_DECAY_HFRATIO = (float) 0.1F; + public static final float AL_EAXREVERB_MIN_DECAY_LFRATIO = (float) 0.1F; + public static final float AL_EAXREVERB_MIN_DECAY_TIME = (float) 0.1F; + public static final float AL_EAXREVERB_MIN_DENSITY = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_DIFFUSION = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_ECHO_DEPTH = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_ECHO_TIME = (float) 0.075F; + public static final float AL_EAXREVERB_MIN_GAIN = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_GAINHF = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_GAINLF = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_HFREFERENCE = (float) 1000.0F; + public static final float AL_EAXREVERB_MIN_LATE_REVERB_DELAY = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_LATE_REVERB_GAIN = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_LFREFERENCE = (float) 20.0F; + public static final float AL_EAXREVERB_MIN_MODULATION_DEPTH = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_MODULATION_TIME = (float) 0.04F; + public static final float AL_EAXREVERB_MIN_REFLECTIONS_DELAY = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_REFLECTIONS_GAIN = (float) 0.0F; + public static final float AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR = (float) 0.0F; + public static final int AL_EAXREVERB_MODULATION_DEPTH = (int) 18; + public static final int AL_EAXREVERB_MODULATION_TIME = (int) 17; + public static final int AL_EAXREVERB_REFLECTIONS_DELAY = (int) 10; + public static final int AL_EAXREVERB_REFLECTIONS_GAIN = (int) 9; + public static final int AL_EAXREVERB_REFLECTIONS_PAN = (int) 11; + public static final int AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = (int) 22; + public static final int AL_ECHO_DAMPING = (int) 3; + public static final float AL_ECHO_DEFAULT_DAMPING = (float) 0.5F; + public static final float AL_ECHO_DEFAULT_DELAY = (float) 0.1F; + public static final float AL_ECHO_DEFAULT_FEEDBACK = (float) 0.5F; + public static final float AL_ECHO_DEFAULT_LRDELAY = (float) 0.1F; + public static final float AL_ECHO_DEFAULT_SPREAD = (float) -1.0F; + public static final int AL_ECHO_DELAY = (int) 1; + public static final int AL_ECHO_FEEDBACK = (int) 4; + public static final int AL_ECHO_LRDELAY = (int) 2; + public static final float AL_ECHO_MAX_DAMPING = (float) 0.99F; + public static final float AL_ECHO_MAX_DELAY = (float) 0.207F; + public static final float AL_ECHO_MAX_FEEDBACK = (float) 1.0F; + public static final float AL_ECHO_MAX_LRDELAY = (float) 0.404F; + public static final float AL_ECHO_MAX_SPREAD = (float) 1.0F; + public static final float AL_ECHO_MIN_DAMPING = (float) 0.0F; + public static final float AL_ECHO_MIN_DELAY = (float) 0.0F; + public static final float AL_ECHO_MIN_FEEDBACK = (float) 0.0F; + public static final float AL_ECHO_MIN_LRDELAY = (float) 0.0F; + public static final float AL_ECHO_MIN_SPREAD = (float) -1.0F; + public static final int AL_ECHO_SPREAD = (int) 5; + public static final int AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = (int) 3; + public static final int AL_EFFECTSLOT_EFFECT = (int) 1; + public static final int AL_EFFECTSLOT_GAIN = (int) 2; + public static final int AL_EFFECTSLOT_NULL = (int) 0; + public static final int AL_EFFECT_AUTOWAH = (int) 10; + public static final int AL_EFFECT_CHORUS = (int) 2; + public static final int AL_EFFECT_COMPRESSOR = (int) 11; + public static final int AL_EFFECT_DISTORTION = (int) 3; + public static final int AL_EFFECT_EAXREVERB = (int) 32768; + public static final int AL_EFFECT_ECHO = (int) 4; + public static final int AL_EFFECT_EQUALIZER = (int) 12; + public static final int AL_EFFECT_FIRST_PARAMETER = (int) 0; + public static final int AL_EFFECT_FLANGER = (int) 5; + public static final int AL_EFFECT_FREQUENCY_SHIFTER = (int) 6; + public static final int AL_EFFECT_LAST_PARAMETER = (int) 32768; + public static final int AL_EFFECT_NULL = (int) 0; + public static final int AL_EFFECT_PITCH_SHIFTER = (int) 8; + public static final int AL_EFFECT_REVERB = (int) 1; + public static final int AL_EFFECT_RING_MODULATOR = (int) 9; + public static final int AL_EFFECT_TYPE = (int) 32769; + public static final int AL_EFFECT_VOCAL_MORPHER = (int) 7; + public static final float AL_EQUALIZER_DEFAULT_HIGH_CUTOFF = (float) 6000.0F; + public static final float AL_EQUALIZER_DEFAULT_HIGH_GAIN = (float) 1.0F; + public static final float AL_EQUALIZER_DEFAULT_LOW_CUTOFF = (float) 200.0F; + public static final float AL_EQUALIZER_DEFAULT_LOW_GAIN = (float) 1.0F; + public static final float AL_EQUALIZER_DEFAULT_MID1_CENTER = (float) 500.0F; + public static final float AL_EQUALIZER_DEFAULT_MID1_GAIN = (float) 1.0F; + public static final float AL_EQUALIZER_DEFAULT_MID1_WIDTH = (float) 1.0F; + public static final float AL_EQUALIZER_DEFAULT_MID2_CENTER = (float) 3000.0F; + public static final float AL_EQUALIZER_DEFAULT_MID2_GAIN = (float) 1.0F; + public static final float AL_EQUALIZER_DEFAULT_MID2_WIDTH = (float) 1.0F; + public static final int AL_EQUALIZER_HIGH_CUTOFF = (int) 10; + public static final int AL_EQUALIZER_HIGH_GAIN = (int) 9; + public static final int AL_EQUALIZER_LOW_CUTOFF = (int) 2; + public static final int AL_EQUALIZER_LOW_GAIN = (int) 1; + public static final float AL_EQUALIZER_MAX_HIGH_CUTOFF = (float) 16000.0F; + public static final float AL_EQUALIZER_MAX_HIGH_GAIN = (float) 7.943F; + public static final float AL_EQUALIZER_MAX_LOW_CUTOFF = (float) 800.0F; + public static final float AL_EQUALIZER_MAX_LOW_GAIN = (float) 7.943F; + public static final float AL_EQUALIZER_MAX_MID1_CENTER = (float) 3000.0F; + public static final float AL_EQUALIZER_MAX_MID1_GAIN = (float) 7.943F; + public static final float AL_EQUALIZER_MAX_MID1_WIDTH = (float) 1.0F; + public static final float AL_EQUALIZER_MAX_MID2_CENTER = (float) 8000.0F; + public static final float AL_EQUALIZER_MAX_MID2_GAIN = (float) 7.943F; + public static final float AL_EQUALIZER_MAX_MID2_WIDTH = (float) 1.0F; + public static final int AL_EQUALIZER_MID1_CENTER = (int) 4; + public static final int AL_EQUALIZER_MID1_GAIN = (int) 3; + public static final int AL_EQUALIZER_MID1_WIDTH = (int) 5; + public static final int AL_EQUALIZER_MID2_CENTER = (int) 7; + public static final int AL_EQUALIZER_MID2_GAIN = (int) 6; + public static final int AL_EQUALIZER_MID2_WIDTH = (int) 8; + public static final float AL_EQUALIZER_MIN_HIGH_CUTOFF = (float) 4000.0F; + public static final float AL_EQUALIZER_MIN_HIGH_GAIN = (float) 0.126F; + public static final float AL_EQUALIZER_MIN_LOW_CUTOFF = (float) 50.0F; + public static final float AL_EQUALIZER_MIN_LOW_GAIN = (float) 0.126F; + public static final float AL_EQUALIZER_MIN_MID1_CENTER = (float) 200.0F; + public static final float AL_EQUALIZER_MIN_MID1_GAIN = (float) 0.126F; + public static final float AL_EQUALIZER_MIN_MID1_WIDTH = (float) 0.01F; + public static final float AL_EQUALIZER_MIN_MID2_CENTER = (float) 1000.0F; + public static final float AL_EQUALIZER_MIN_MID2_GAIN = (float) 0.126F; + public static final float AL_EQUALIZER_MIN_MID2_WIDTH = (float) 0.01F; + public static final int AL_FILTER_BANDPASS = (int) 3; + public static final int AL_FILTER_FIRST_PARAMETER = (int) 0; + public static final int AL_FILTER_HIGHPASS = (int) 2; + public static final int AL_FILTER_LAST_PARAMETER = (int) 32768; + public static final int AL_FILTER_LOWPASS = (int) 1; + public static final int AL_FILTER_NULL = (int) 0; + public static final int AL_FILTER_TYPE = (int) 32769; + public static final float AL_FLANGER_DEFAULT_DELAY = (float) 0.002F; + public static final float AL_FLANGER_DEFAULT_DEPTH = (float) 1.0F; + public static final float AL_FLANGER_DEFAULT_FEEDBACK = (float) -0.5F; + public static final int AL_FLANGER_DEFAULT_PHASE = (int) 0; + public static final float AL_FLANGER_DEFAULT_RATE = (float) 0.27F; + public static final int AL_FLANGER_DEFAULT_WAVEFORM = (int) 1; + public static final int AL_FLANGER_DELAY = (int) 6; + public static final int AL_FLANGER_DEPTH = (int) 4; + public static final int AL_FLANGER_FEEDBACK = (int) 5; + public static final float AL_FLANGER_MAX_DELAY = (float) 0.004F; + public static final float AL_FLANGER_MAX_DEPTH = (float) 1.0F; + public static final float AL_FLANGER_MAX_FEEDBACK = (float) 1.0F; + public static final int AL_FLANGER_MAX_PHASE = (int) 180; + public static final float AL_FLANGER_MAX_RATE = (float) 10.0F; + public static final int AL_FLANGER_MAX_WAVEFORM = (int) 1; + public static final float AL_FLANGER_MIN_DELAY = (float) 0.0F; + public static final float AL_FLANGER_MIN_DEPTH = (float) 0.0F; + public static final float AL_FLANGER_MIN_FEEDBACK = (float) -1.0F; + public static final int AL_FLANGER_MIN_PHASE = (int) -180; + public static final float AL_FLANGER_MIN_RATE = (float) 0.0F; + public static final int AL_FLANGER_MIN_WAVEFORM = (int) 0; + public static final int AL_FLANGER_PHASE = (int) 2; + public static final int AL_FLANGER_RATE = (int) 3; + public static final int AL_FLANGER_WAVEFORM = (int) 1; + public static final int AL_FLANGER_WAVEFORM_SINUSOID = (int) 0; + public static final int AL_FLANGER_WAVEFORM_TRIANGLE = (int) 1; + public static final float AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY = (float) 0.0F; + public static final int AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION = (int) 0; + public static final int AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION = (int) 0; + public static final int AL_FREQUENCY_SHIFTER_DIRECTION_DOWN = (int) 0; + public static final int AL_FREQUENCY_SHIFTER_DIRECTION_OFF = (int) 2; + public static final int AL_FREQUENCY_SHIFTER_DIRECTION_UP = (int) 1; + public static final int AL_FREQUENCY_SHIFTER_FREQUENCY = (int) 1; + public static final int AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = (int) 2; + public static final float AL_FREQUENCY_SHIFTER_MAX_FREQUENCY = (float) 24000.0F; + public static final int AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION = (int) 2; + public static final int AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION = (int) 2; + public static final float AL_FREQUENCY_SHIFTER_MIN_FREQUENCY = (float) 0.0F; + public static final int AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION = (int) 0; + public static final int AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION = (int) 0; + public static final int AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = (int) 3; + public static final int AL_HIGHPASS_GAIN = (int) 1; + public static final int AL_HIGHPASS_GAINLF = (int) 2; + public static final int AL_LOWPASS_GAIN = (int) 1; + public static final int AL_LOWPASS_GAINHF = (int) 2; + public static final float AL_MAX_AIR_ABSORPTION_FACTOR = (float) 10.0F; + public static final int AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 1; + public static final int AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 1; + public static final float AL_MAX_CONE_OUTER_GAINHF = (float) 1.0F; + public static final int AL_MAX_DIRECT_FILTER_GAINHF_AUTO = (int) 1; + public static final float AL_MAX_METERS_PER_UNIT = (float) 3.4028235E38F; + public static final float AL_MAX_ROOM_ROLLOFF_FACTOR = (float) 10.0F; + public static final int AL_METERS_PER_UNIT = (int) 131076; + public static final float AL_MIN_AIR_ABSORPTION_FACTOR = (float) 0.0F; + public static final int AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO = (int) 0; + public static final int AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO = (int) 0; + public static final float AL_MIN_CONE_OUTER_GAINHF = (float) 0.0F; + public static final int AL_MIN_DIRECT_FILTER_GAINHF_AUTO = (int) 0; + public static final float AL_MIN_METERS_PER_UNIT = (float) 1.4E-45F; + public static final float AL_MIN_ROOM_ROLLOFF_FACTOR = (float) 0.0F; + public static final int AL_PITCH_SHIFTER_COARSE_TUNE = (int) 1; + public static final int AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE = (int) 12; + public static final int AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE = (int) 0; + public static final int AL_PITCH_SHIFTER_FINE_TUNE = (int) 2; + public static final int AL_PITCH_SHIFTER_MAX_COARSE_TUNE = (int) 12; + public static final int AL_PITCH_SHIFTER_MAX_FINE_TUNE = (int) 50; + public static final int AL_PITCH_SHIFTER_MIN_COARSE_TUNE = (int) -12; + public static final int AL_PITCH_SHIFTER_MIN_FINE_TUNE = (int) -50; + public static final int AL_REVERB_AIR_ABSORPTION_GAINHF = (int) 11; + public static final int AL_REVERB_DECAY_HFLIMIT = (int) 13; + public static final int AL_REVERB_DECAY_HFRATIO = (int) 6; + public static final int AL_REVERB_DECAY_TIME = (int) 5; + public static final float AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF = (float) 0.994F; + public static final int AL_REVERB_DEFAULT_DECAY_HFLIMIT = (int) 1; + public static final float AL_REVERB_DEFAULT_DECAY_HFRATIO = (float) 0.83F; + public static final float AL_REVERB_DEFAULT_DECAY_TIME = (float) 1.49F; + public static final float AL_REVERB_DEFAULT_DENSITY = (float) 1.0F; + public static final float AL_REVERB_DEFAULT_DIFFUSION = (float) 1.0F; + public static final float AL_REVERB_DEFAULT_GAIN = (float) 0.32F; + public static final float AL_REVERB_DEFAULT_GAINHF = (float) 0.89F; + public static final float AL_REVERB_DEFAULT_LATE_REVERB_DELAY = (float) 0.011F; + public static final float AL_REVERB_DEFAULT_LATE_REVERB_GAIN = (float) 1.26F; + public static final float AL_REVERB_DEFAULT_REFLECTIONS_DELAY = (float) 0.007F; + public static final float AL_REVERB_DEFAULT_REFLECTIONS_GAIN = (float) 0.05F; + public static final float AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = (float) 0.0F; + public static final int AL_REVERB_DENSITY = (int) 1; + public static final int AL_REVERB_DIFFUSION = (int) 2; + public static final int AL_REVERB_GAIN = (int) 3; + public static final int AL_REVERB_GAINHF = (int) 4; + public static final int AL_REVERB_LATE_REVERB_DELAY = (int) 10; + public static final int AL_REVERB_LATE_REVERB_GAIN = (int) 9; + public static final float AL_REVERB_MAX_AIR_ABSORPTION_GAINHF = (float) 1.0F; + public static final int AL_REVERB_MAX_DECAY_HFLIMIT = (int) 1; + public static final float AL_REVERB_MAX_DECAY_HFRATIO = (float) 2.0F; + public static final float AL_REVERB_MAX_DECAY_TIME = (float) 20.0F; + public static final float AL_REVERB_MAX_DENSITY = (float) 1.0F; + public static final float AL_REVERB_MAX_DIFFUSION = (float) 1.0F; + public static final float AL_REVERB_MAX_GAIN = (float) 1.0F; + public static final float AL_REVERB_MAX_GAINHF = (float) 1.0F; + public static final float AL_REVERB_MAX_LATE_REVERB_DELAY = (float) 0.1F; + public static final float AL_REVERB_MAX_LATE_REVERB_GAIN = (float) 10.0F; + public static final float AL_REVERB_MAX_REFLECTIONS_DELAY = (float) 0.3F; + public static final float AL_REVERB_MAX_REFLECTIONS_GAIN = (float) 3.16F; + public static final float AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR = (float) 10.0F; + public static final float AL_REVERB_MIN_AIR_ABSORPTION_GAINHF = (float) 0.892F; + public static final int AL_REVERB_MIN_DECAY_HFLIMIT = (int) 0; + public static final float AL_REVERB_MIN_DECAY_HFRATIO = (float) 0.1F; + public static final float AL_REVERB_MIN_DECAY_TIME = (float) 0.1F; + public static final float AL_REVERB_MIN_DENSITY = (float) 0.0F; + public static final float AL_REVERB_MIN_DIFFUSION = (float) 0.0F; + public static final float AL_REVERB_MIN_GAIN = (float) 0.0F; + public static final float AL_REVERB_MIN_GAINHF = (float) 0.0F; + public static final float AL_REVERB_MIN_LATE_REVERB_DELAY = (float) 0.0F; + public static final float AL_REVERB_MIN_LATE_REVERB_GAIN = (float) 0.0F; + public static final float AL_REVERB_MIN_REFLECTIONS_DELAY = (float) 0.0F; + public static final float AL_REVERB_MIN_REFLECTIONS_GAIN = (float) 0.0F; + public static final float AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR = (float) 0.0F; + public static final int AL_REVERB_REFLECTIONS_DELAY = (int) 8; + public static final int AL_REVERB_REFLECTIONS_GAIN = (int) 7; + public static final int AL_REVERB_ROOM_ROLLOFF_FACTOR = (int) 12; + public static final float AL_RING_MODULATOR_DEFAULT_FREQUENCY = (float) 440.0F; + public static final float AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF = (float) 800.0F; + public static final int AL_RING_MODULATOR_DEFAULT_WAVEFORM = (int) 0; + public static final int AL_RING_MODULATOR_FREQUENCY = (int) 1; + public static final int AL_RING_MODULATOR_HIGHPASS_CUTOFF = (int) 2; + public static final float AL_RING_MODULATOR_MAX_FREQUENCY = (float) 8000.0F; + public static final float AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = (float) 24000.0F; + public static final int AL_RING_MODULATOR_MAX_WAVEFORM = (int) 2; + public static final float AL_RING_MODULATOR_MIN_FREQUENCY = (float) 0.0F; + public static final float AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = (float) 0.0F; + public static final int AL_RING_MODULATOR_MIN_WAVEFORM = (int) 0; + public static final int AL_RING_MODULATOR_SAWTOOTH = (int) 1; + public static final int AL_RING_MODULATOR_SINUSOID = (int) 0; + public static final int AL_RING_MODULATOR_SQUARE = (int) 2; + public static final int AL_RING_MODULATOR_WAVEFORM = (int) 3; + public static final int AL_ROOM_ROLLOFF_FACTOR = (int) 131080; + public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA = (int) 0; + public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING = (int) 0; + public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB = (int) 10; + public static final int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING = (int) 0; + public static final float AL_VOCAL_MORPHER_DEFAULT_RATE = (float) 1.41F; + public static final int AL_VOCAL_MORPHER_DEFAULT_WAVEFORM = (int) 0; + public static final int AL_VOCAL_MORPHER_MAX_PHONEMEA = (int) 29; + public static final int AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING = (int) 24; + public static final int AL_VOCAL_MORPHER_MAX_PHONEMEB = (int) 29; + public static final int AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING = (int) 24; + public static final float AL_VOCAL_MORPHER_MAX_RATE = (float) 10.0F; + public static final int AL_VOCAL_MORPHER_MAX_WAVEFORM = (int) 2; + public static final int AL_VOCAL_MORPHER_MIN_PHONEMEA = (int) 0; + public static final int AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING = (int) -24; + public static final int AL_VOCAL_MORPHER_MIN_PHONEMEB = (int) 0; + public static final int AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING = (int) -24; + public static final float AL_VOCAL_MORPHER_MIN_RATE = (float) 0.0F; + public static final int AL_VOCAL_MORPHER_MIN_WAVEFORM = (int) 0; + public static final int AL_VOCAL_MORPHER_PHONEMEA = (int) 1; + public static final int AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = (int) 2; + public static final int AL_VOCAL_MORPHER_PHONEMEB = (int) 3; + public static final int AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = (int) 4; + public static final int AL_VOCAL_MORPHER_PHONEME_A = (int) 0; + public static final int AL_VOCAL_MORPHER_PHONEME_AA = (int) 5; + public static final int AL_VOCAL_MORPHER_PHONEME_AE = (int) 6; + public static final int AL_VOCAL_MORPHER_PHONEME_AH = (int) 7; + public static final int AL_VOCAL_MORPHER_PHONEME_AO = (int) 8; + public static final int AL_VOCAL_MORPHER_PHONEME_B = (int) 15; + public static final int AL_VOCAL_MORPHER_PHONEME_D = (int) 16; + public static final int AL_VOCAL_MORPHER_PHONEME_E = (int) 1; + public static final int AL_VOCAL_MORPHER_PHONEME_EH = (int) 9; + public static final int AL_VOCAL_MORPHER_PHONEME_ER = (int) 10; + public static final int AL_VOCAL_MORPHER_PHONEME_F = (int) 17; + public static final int AL_VOCAL_MORPHER_PHONEME_G = (int) 18; + public static final int AL_VOCAL_MORPHER_PHONEME_I = (int) 2; + public static final int AL_VOCAL_MORPHER_PHONEME_IH = (int) 11; + public static final int AL_VOCAL_MORPHER_PHONEME_IY = (int) 12; + public static final int AL_VOCAL_MORPHER_PHONEME_J = (int) 19; + public static final int AL_VOCAL_MORPHER_PHONEME_K = (int) 20; + public static final int AL_VOCAL_MORPHER_PHONEME_L = (int) 21; + public static final int AL_VOCAL_MORPHER_PHONEME_M = (int) 22; + public static final int AL_VOCAL_MORPHER_PHONEME_N = (int) 23; + public static final int AL_VOCAL_MORPHER_PHONEME_O = (int) 3; + public static final int AL_VOCAL_MORPHER_PHONEME_P = (int) 24; + public static final int AL_VOCAL_MORPHER_PHONEME_R = (int) 25; + public static final int AL_VOCAL_MORPHER_PHONEME_S = (int) 26; + public static final int AL_VOCAL_MORPHER_PHONEME_T = (int) 27; + public static final int AL_VOCAL_MORPHER_PHONEME_U = (int) 4; + public static final int AL_VOCAL_MORPHER_PHONEME_UH = (int) 13; + public static final int AL_VOCAL_MORPHER_PHONEME_UW = (int) 14; + public static final int AL_VOCAL_MORPHER_PHONEME_V = (int) 28; + public static final int AL_VOCAL_MORPHER_PHONEME_Z = (int) 29; + public static final int AL_VOCAL_MORPHER_RATE = (int) 6; + public static final int AL_VOCAL_MORPHER_WAVEFORM = (int) 5; + public static final int AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH = (int) 2; + public static final int AL_VOCAL_MORPHER_WAVEFORM_SINUSOID = (int) 0; + public static final int AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE = (int) 1; + public static final float BANDPASS_DEFAULT_GAIN = (float) 1.0F; + public static final float BANDPASS_DEFAULT_GAINHF = (float) 1.0F; + public static final float BANDPASS_DEFAULT_GAINLF = (float) 1.0F; + public static final float BANDPASS_MAX_GAIN = (float) 1.0F; + public static final float BANDPASS_MAX_GAINHF = (float) 1.0F; + public static final float BANDPASS_MAX_GAINLF = (float) 1.0F; + public static final float BANDPASS_MIN_GAIN = (float) 0.0F; + public static final float BANDPASS_MIN_GAINHF = (float) 0.0F; + public static final float BANDPASS_MIN_GAINLF = (float) 0.0F; + public static final float HIGHPASS_DEFAULT_GAIN = (float) 1.0F; + public static final float HIGHPASS_DEFAULT_GAINLF = (float) 1.0F; + public static final float HIGHPASS_MAX_GAIN = (float) 1.0F; + public static final float HIGHPASS_MAX_GAINLF = (float) 1.0F; + public static final float HIGHPASS_MIN_GAIN = (float) 0.0F; + public static final float HIGHPASS_MIN_GAINLF = (float) 0.0F; + public static final float LOWPASS_DEFAULT_GAIN = (float) 1.0F; + public static final float LOWPASS_DEFAULT_GAINHF = (float) 1.0F; + public static final float LOWPASS_MAX_GAIN = (float) 1.0F; + public static final float LOWPASS_MAX_GAINHF = (float) 1.0F; + public static final float LOWPASS_MIN_GAIN = (float) 0.0F; + public static final float LOWPASS_MIN_GAINHF = (float) 0.0F; - public static int alGenAuxiliaryEffectSlots() { - return EXTEfx.alGenAuxiliaryEffectSlots(); + public static void alAuxiliaryEffectSlot(int arg0, int arg1, java.nio.FloatBuffer arg2) { + EXTEfx.alAuxiliaryEffectSlotfv(arg0, arg1, arg2); } - public static int alGenFilters() { - return EXTEfx.alGenFilters(); + public static void alAuxiliaryEffectSlot(int arg0, int arg1, java.nio.IntBuffer arg2) { + EXTEfx.alAuxiliaryEffectSlotiv(arg0, arg1, arg2); + } + + public static void alAuxiliaryEffectSlotf(int arg0, int arg1, float arg2) { + EXTEfx.alAuxiliaryEffectSlotf(arg0, arg1, arg2); + } + + public static void alAuxiliaryEffectSloti(int arg0, int arg1, int arg2) { + EXTEfx.alAuxiliaryEffectSloti(arg0, arg1, arg2); + } + + public static void alDeleteAuxiliaryEffectSlots(int arg0) { + EXTEfx.alDeleteAuxiliaryEffectSlots(arg0); + } + + public static void alDeleteAuxiliaryEffectSlots(java.nio.IntBuffer arg0) { + EXTEfx.alDeleteAuxiliaryEffectSlots(arg0); + } + + public static void alDeleteEffects(int arg0) { + EXTEfx.alDeleteEffects(arg0); + } + + public static void alDeleteEffects(java.nio.IntBuffer arg0) { + EXTEfx.alDeleteEffects(arg0); + } + + public static void alDeleteFilters(int arg0) { + EXTEfx.alDeleteFilters(arg0); + } + + public static void alDeleteFilters(java.nio.IntBuffer arg0) { + EXTEfx.alDeleteFilters(arg0); + } + + public static void alEffect(int arg0, int arg1, java.nio.FloatBuffer arg2) { + EXTEfx.alEffectfv(arg0, arg1, arg2); + } + + public static void alEffect(int arg0, int arg1, java.nio.IntBuffer arg2) { + EXTEfx.alEffectiv(arg0, arg1, arg2); + } + + public static void alEffectf(int arg0, int arg1, float arg2) { + EXTEfx.alEffectf(arg0, arg1, arg2); + } + + public static void alEffecti(int arg0, int arg1, int arg2) { + EXTEfx.alEffecti(arg0, arg1, arg2); + } + + // HERE + public static void alFilter(int arg0, int arg1, java.nio.FloatBuffer arg2) { + EXTEfx.alFilterfv(arg0, arg1, arg2); + } + + public static void alFilter(int arg0, int arg1, java.nio.IntBuffer arg2) { + EXTEfx.alFilteriv(arg0, arg1, arg2); } - public static void alDeleteFilters(int filter) { - EXTEfx.alDeleteFilters(filter); + public static void alFilterf(int arg0, int arg1, float arg2) { + EXTEfx.alFilterf(arg0, arg1, arg2); } - public static void alFilteri(int filter, int param, int value) { - EXTEfx.alFilteri(filter, param, value); + public static void alFilteri(int arg0, int arg1, int arg2) { + EXTEfx.alFilteri(arg0, arg1, arg2); } - public static void alFilterf(int filter, int param, float value) { - EXTEfx.alFilterf(filter, param, value); + public static int alGenAuxiliaryEffectSlots() { + return EXTEfx.alGenAuxiliaryEffectSlots(); } - public static float alGetFilterf(int filter, int param) { - return EXTEfx.alGetFilterf(filter, param); + public static void alGenAuxiliaryEffectSlots(java.nio.IntBuffer arg0) { + EXTEfx.alGenAuxiliaryEffectSlots(arg0); } public static int alGenEffects() { return EXTEfx.alGenEffects(); } - public static void alDeleteEffects(int effect) { - EXTEfx.alDeleteAuxiliaryEffectSlots(effect); + public static void alGenEffects(java.nio.IntBuffer arg0) { + EXTEfx.alGenEffects(arg0); + } + + public static int alGenFilters() { + return EXTEfx.alGenFilters(); + } + + public static void alGenFilters(java.nio.IntBuffer arg0) { + EXTEfx.alGenFilters(arg0); + } + + public static void alGetAuxiliaryEffectSlot(int arg0, int arg1, java.nio.FloatBuffer arg2) { + EXTEfx.alGetAuxiliaryEffectSlotfv(arg0, arg1, arg2); + } + + public static void alGetAuxiliaryEffectSlot(int arg0, int arg1, java.nio.IntBuffer arg2) { + EXTEfx.alGetAuxiliaryEffectSlotiv(arg0, arg1, arg2); } - public static void alDeleteAuxiliaryEffectSlots(int effectSlot) { - EXTEfx.alDeleteAuxiliaryEffectSlots(effectSlot); + public static float alGetAuxiliaryEffectSlotf(int arg0, int arg1) { + return EXTEfx.alGetAuxiliaryEffectSlotf(arg0, arg1); } - public static void alEffecti(int effect, int param, int value) { - EXTEfx.alEffecti(effect, param, value); + public static int alGetAuxiliaryEffectSloti(int arg0, int arg1) { + return EXTEfx.alGetAuxiliaryEffectSloti(arg0, arg1); } - public static float alGetEffectf(int effect, int param) { - return EXTEfx.alGetEffectf(effect, param); + public static void alGetEffect(int arg0, int arg1, java.nio.FloatBuffer arg2) { + EXTEfx.alGetEffectfv(arg0, arg1, arg2); } - public static int alGetEffecti(int effect, int param) { - return EXTEfx.alGetEffecti(effect, param); + public static void alGetEffect(int arg0, int arg1, java.nio.IntBuffer arg2) { + EXTEfx.alGetEffectiv(arg0, arg1, arg2); } - public static void alEffectf(int effect, int param, float value) { - EXTEfx.alEffectf(effect, param, value); + public static float alGetEffectf(int arg0, int arg1) { + return EXTEfx.alGetEffectf(arg0, arg1); } - public static void alAuxiliaryEffectSloti(int effectSlot, int param, int value) { - EXTEfx.alAuxiliaryEffectSloti(effectSlot, param, value); + public static int alGetEffecti(int arg0, int arg1) { + return EXTEfx.alGetEffecti(arg0, arg1); } - public static void alGenAuxiliaryEffectSlots(IntBuffer effectSlots) { - EXTEfx.alGenAuxiliaryEffectSlots(effectSlots); + public static void alGetFilter(int arg0, int arg1, java.nio.FloatBuffer arg2) { + EXTEfx.alGetFilterfv(arg0, arg1, arg2); } - public static void alGenEffects(IntBuffer effects) { - EXTEfx.alGenEffects(effects); + public static void alGetFilter(int arg0, int arg1, java.nio.IntBuffer arg2) { + EXTEfx.alGetFilteriv(arg0, arg1, arg2); } - public static void alDeleteEffects(IntBuffer effects) { - EXTEfx.alDeleteEffects(effects); + public static float alGetFilterf(int arg0, int arg1) { + return EXTEfx.alGetFilterf(arg0, arg1); } - public static void alDeleteAuxiliaryEffectSlots(IntBuffer effectSlots) { - EXTEfx.alDeleteAuxiliaryEffectSlots(effectSlots); + public static int alGetFilteri(int arg0, int arg1) { + return EXTEfx.alGetFilteri(arg0, arg1); } - public static void alGenFilters(IntBuffer filters) { - EXTEfx.alGenFilters(filters); + public static boolean alIsAuxiliaryEffectSlot(int arg0) { + return EXTEfx.alIsAuxiliaryEffectSlot(arg0); } - public static void alDeleteFilters(IntBuffer filters) { - EXTEfx.alDeleteFilters(filters); + public static boolean alIsEffect(int arg0) { + return EXTEfx.alIsEffect(arg0); } + + public static boolean alIsFilter(int arg0) { + return EXTEfx.alIsFilter(arg0); + } + } From 7bb4745a7336514b9b93d7485b4f652b6b04ed5a Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Fri, 19 Jan 2024 11:18:45 +0800 Subject: [PATCH 013/130] Update a lot libraries. Always newer! --- build.gradle | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 7db61816a..df95fabea 100644 --- a/build.gradle +++ b/build.gradle @@ -413,9 +413,9 @@ project(':cleanroom') { installer "com.cleanroommc:bouncepad:$props.bouncepad_version" - installer 'com.ibm.icu:icu4j:74.1' + installer 'com.ibm.icu:icu4j:74.2' - installer 'org.jline:jline:3.24.1' + installer 'org.jline:jline:3.25.0' installer 'com.typesafe.akka:akka-actor_2.12:2.8.5' installer 'com.typesafe:config:1.4.3' // TODO: Move scala away from being defaulted when installing (download on-demand?) @@ -442,16 +442,16 @@ project(':cleanroom') { installer 'com.github.oshi:oshi-core:6.4.10' installer 'it.unimi.dsi:fastutil:8.5.12' installer 'commons-codec:commons-codec:1.16.0' - installer 'commons-io:commons-io:2.15.0' - installer 'commons-logging:commons-logging:1.2' + installer 'commons-io:commons-io:2.15.1' + installer 'commons-logging:commons-logging:1.3.0' installer 'com.google.guava:guava:33.0.0-jre' installer 'com.google.guava:failureaccess:1.0.2' installer 'com.google.code.gson:gson:2.10.1' installer 'com.google.code.findbugs:jsr305:3.0.2' // TODO: Unpin in 1.18.1 or when Mojang bumps the Log4J version - installer 'org.apache.logging.log4j:log4j-api:2.22.0' - installer 'org.apache.logging.log4j:log4j-core:2.22.0' + installer 'org.apache.logging.log4j:log4j-api:2.22.1' + installer 'org.apache.logging.log4j:log4j-core:2.22.1' installer 'jakarta.annotation:jakarta.annotation-api:2.1.1' installer 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' installer 'jakarta.xml.ws:jakarta.xml.ws-api:4.0.1' @@ -463,10 +463,10 @@ project(':cleanroom') { installer 'com.cleanroommc:sponge-mixin:0.15.4+mixin.0.8.5' installer annotationProcessor('io.github.llamalad7:mixinextras-common:0.3.5') - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0' - testImplementation 'org.junit.vintage:junit-vintage-engine:5.+' - testImplementation 'org.opentest4j:opentest4j:1.0.0' // Needed for junit 5 - testImplementation 'org.hamcrest:hamcrest-all:1.3' // Needs advanced matching for list order + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1' + testImplementation 'org.junit.vintage:junit-vintage-engine:5.10.1' + testImplementation 'org.opentest4j:opentest4j:1.3.0' // Needed for junit 5 + testImplementation 'org.hamcrest:hamcrest:2.2' // Needs advanced matching for list order /* forgeGradleMcDeps From 634468d14d8b306c129a1c2cfcb6bc2b6ddd4d4d Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Fri, 19 Jan 2024 11:19:45 +0800 Subject: [PATCH 014/130] Update to experimental ModifyArgs fixed Mixin --- build.gradle | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index df95fabea..fafe419f4 100644 --- a/build.gradle +++ b/build.gradle @@ -460,7 +460,7 @@ project(':cleanroom') { installer 'org.openjdk.nashorn:nashorn-core:15.4' // Mixin - installer 'com.cleanroommc:sponge-mixin:0.15.4+mixin.0.8.5' + installer 'com.cleanroommc:sponge-mixin:0.16.0+mixin.0.8.5' installer annotationProcessor('io.github.llamalad7:mixinextras-common:0.3.5') testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1' diff --git a/gradle.properties b/gradle.properties index 7269e8857..7fb8a12f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ patch_version = 0 # MAJOR.SPEC_MAJOR.SPEC_MINOR.BUILD last_forge_version = 14.23.5.2860 -new_forge_version = 15.24.0.3026 +new_forge_version = 15.24.0.3027 # Minecraft & Mappings mapping_channel = stable From 2ab121900a61bbe196075cb1f69380eda33ebec4 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Fri, 19 Jan 2024 11:21:17 +0800 Subject: [PATCH 015/130] We don't need to test Windows now, that's a waste of action time --- .github/workflows/WindowsTest.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/WindowsTest.yml b/.github/workflows/WindowsTest.yml index 6a34b9de0..844f8823a 100644 --- a/.github/workflows/WindowsTest.yml +++ b/.github/workflows/WindowsTest.yml @@ -8,8 +8,6 @@ name: Test setup under Windows on: - push: - pull_request: workflow_dispatch: permissions: From eb42f0d043a61fecb8045efe5e734b364c5445aa Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sat, 20 Jan 2024 13:51:23 +0800 Subject: [PATCH 016/130] Bump version for Fugue --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 7fb8a12f5..82129afc4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ patch_version = 0 # MAJOR.SPEC_MAJOR.SPEC_MINOR.BUILD last_forge_version = 14.23.5.2860 -new_forge_version = 15.24.0.3027 +new_forge_version = 15.24.0.3028 # Minecraft & Mappings mapping_channel = stable @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.28-cursed +bouncepad_version = 0.4.30-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. From e772f7f2e93bdb097b81a219c90d1287521aa87f Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sun, 21 Jan 2024 14:20:02 +0800 Subject: [PATCH 017/130] Update caches when adding Enum --- .../cleanroommc/hackery/enums/EnumHackery.java | 17 +++++++++++++++-- .../com/cleanroommc/test/EnumHackeryTest.java | 6 ++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cleanroommc/hackery/enums/EnumHackery.java b/src/main/java/com/cleanroommc/hackery/enums/EnumHackery.java index 102d9a370..8e4cfe065 100644 --- a/src/main/java/com/cleanroommc/hackery/enums/EnumHackery.java +++ b/src/main/java/com/cleanroommc/hackery/enums/EnumHackery.java @@ -2,6 +2,7 @@ import com.cleanroommc.hackery.ReflectionHackery; import jdk.internal.reflect.ReflectionFactory; +import net.minecraftforge.fml.common.FMLLog; import org.apache.commons.lang3.ArrayUtils; import org.lwjgl.lwjgl3ify.UnsafeHacks; @@ -11,13 +12,14 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Arrays; +import java.util.Map; public final class EnumHackery { public static final ReflectionFactory factory = ReflectionFactory.getReflectionFactory(); private static final Field class$enumConstants, class$enumConstantDirectory, class$enumVars; - private static final Method constructorAccessor$newInstance; + private static final Method constructorAccessor$newInstance, class$enumConstantDirectory_method; private static final Class[] prefix = {String.class, int.class}; @@ -26,6 +28,7 @@ public final class EnumHackery { Field enumConstants; Field enumConstantDirectory; Method newInstance; + Method enumConstantDirectoryMethod; try { constructorAccessor = ReflectionHackery.deepSearchForField(Constructor.class, field -> "constructorAccessor".equals(field.getName()), true); @@ -36,6 +39,9 @@ public final class EnumHackery { enumConstantDirectory.setAccessible(true); newInstance = constructorAccessor.getType().getMethod("newInstance", Object[].class); + + enumConstantDirectoryMethod = Class.class.getDeclaredMethod("enumConstantDirectory"); + enumConstantDirectoryMethod.setAccessible(true); } catch (ReflectiveOperationException e) { throw new RuntimeException(e); } @@ -49,6 +55,7 @@ public final class EnumHackery { class$enumConstantDirectory = enumConstantDirectory; class$enumVars = enumVars; constructorAccessor$newInstance = newInstance; + class$enumConstantDirectory_method = enumConstantDirectoryMethod; } public static > T addEnumEntry(Class enumClass, String enumName) { @@ -102,6 +109,12 @@ public static > T addEnumEntry(Class enumClass, String enum T[] newValues = Arrays.copyOf(values, values.length + 1); newValues[newValues.length - 1] = instance; UnsafeHacks.setField(valuesField, null, newValues); + // Add new enum to cache + UnsafeHacks.setField(class$enumConstants, enumClass, newValues); + // Ensure the cache exists + Map directory = (Map) class$enumConstantDirectory_method.invoke(enumClass); + // Add new enum to cache + directory.put(enumName, instance); int ordinal = newValues.length - 1; ordinalField.set(instance, ordinal); @@ -109,7 +122,7 @@ public static > T addEnumEntry(Class enumClass, String enum return instance; } catch (Throwable e) { - System.out.println(e); + FMLLog.log.error(e); throw new RuntimeException(e); } diff --git a/src/test/java/com/cleanroommc/test/EnumHackeryTest.java b/src/test/java/com/cleanroommc/test/EnumHackeryTest.java index e9320e6bd..d5d23de1f 100644 --- a/src/test/java/com/cleanroommc/test/EnumHackeryTest.java +++ b/src/test/java/com/cleanroommc/test/EnumHackeryTest.java @@ -72,12 +72,18 @@ public void testAddEnumEntryWithoutParameters() { public void testAddEnumEntryWithParameters() { CtorTestEnum[] oldValues = CtorTestEnum.values(); CtorTestEnum three = EnumHackery.addEnumEntry(CtorTestEnum.class, "THREE", new Class[] { String.class }, new Object[] { "three" }); + CtorTestEnum four = EnumHackery.addEnumEntry(CtorTestEnum.class, "FOUR", new Class[] { String.class }, new Object[] { "four" }); CtorTestEnum[] newValues = CtorTestEnum.values(); Assert.assertNotNull(Enum.valueOf(CtorTestEnum.class, "THREE")); Assert.assertEquals(Enum.valueOf(CtorTestEnum.class, "THREE"), three); + Assert.assertNotNull(Enum.valueOf(CtorTestEnum.class, "FOUR")); + Assert.assertEquals(Enum.valueOf(CtorTestEnum.class, "FOUR"), four); Assert.assertNotNull(CtorTestEnum.valueOf("THREE")); Assert.assertEquals(CtorTestEnum.valueOf("THREE"), three); + Assert.assertNotNull(CtorTestEnum.valueOf("FOUR")); + Assert.assertEquals(CtorTestEnum.valueOf("FOUR"), four); Assert.assertNotEquals(oldValues, newValues); + Assert.assertEquals(2, newValues.length - oldValues.length); } @Test From 8cd42e3cc683b84532d6ccfeefeae87a3f262903 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sun, 21 Jan 2024 14:21:03 +0800 Subject: [PATCH 018/130] Update bouncepad and use super transformer --- gradle.properties | 2 +- .../net/minecraftforge/fml/relauncher/FMLCorePlugin.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 82129afc4..94524b600 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.30-cursed +bouncepad_version = 0.4.32-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. diff --git a/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java b/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java index 320163168..83eb7b59a 100644 --- a/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java +++ b/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java @@ -19,6 +19,8 @@ package net.minecraftforge.fml.relauncher; +import net.minecraft.launchwrapper.Launch; + import java.util.Map; public class FMLCorePlugin implements IFMLLoadingPlugin @@ -26,6 +28,7 @@ public class FMLCorePlugin implements IFMLLoadingPlugin @Override public String[] getASMTransformerClass() { + Launch.classLoader.registerSuperTransformer("net.minecraftforge.fml.common.asm.transformers.ReflectionFieldTransformer"); //For Botania Tweaks return new String[] { "net.minecraftforge.fml.common.asm.transformers.SideTransformer", "net.minecraftforge.fml.common.asm.transformers.EventSubscriptionTransformer", @@ -33,7 +36,7 @@ public String[] getASMTransformerClass() "net.minecraftforge.fml.common.asm.transformers.SoundEngineFixTransformer", "net.minecraftforge.fml.common.asm.transformers.JavaxTransformer", "net.minecraftforge.fml.common.asm.transformers.MalformedUUIDTransformer", - "net.minecraftforge.fml.common.asm.transformers.ReflectionFieldTransformer", + //"net.minecraftforge.fml.common.asm.transformers.ReflectionFieldTransformer", "net.minecraftforge.fml.common.asm.transformers.ScriptEngineTransformer", "net.minecraftforge.fml.common.asm.transformers.URLClassLoaderTransformer" }; From 38947b18d64c24e2135de88b16991d493b4f61eb Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Sun, 21 Jan 2024 20:29:45 +0800 Subject: [PATCH 019/130] Fix wrong super transformer --- .../net/minecraftforge/fml/relauncher/FMLCorePlugin.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java b/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java index 83eb7b59a..64a9d94ab 100644 --- a/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java +++ b/src/main/java/net/minecraftforge/fml/relauncher/FMLCorePlugin.java @@ -28,13 +28,14 @@ public class FMLCorePlugin implements IFMLLoadingPlugin @Override public String[] getASMTransformerClass() { - Launch.classLoader.registerSuperTransformer("net.minecraftforge.fml.common.asm.transformers.ReflectionFieldTransformer"); //For Botania Tweaks + Launch.classLoader.registerSuperTransformer("net.minecraftforge.fml.common.asm.transformers.ReflectionFieldTransformer");// For reflection in exclusion + Launch.classLoader.registerSuperTransformer("net.minecraftforge.fml.common.asm.transformers.JavaxTransformer"); // For Botania Tweaks return new String[] { "net.minecraftforge.fml.common.asm.transformers.SideTransformer", "net.minecraftforge.fml.common.asm.transformers.EventSubscriptionTransformer", "net.minecraftforge.fml.common.asm.transformers.EventSubscriberTransformer", "net.minecraftforge.fml.common.asm.transformers.SoundEngineFixTransformer", - "net.minecraftforge.fml.common.asm.transformers.JavaxTransformer", + //"net.minecraftforge.fml.common.asm.transformers.JavaxTransformer", "net.minecraftforge.fml.common.asm.transformers.MalformedUUIDTransformer", //"net.minecraftforge.fml.common.asm.transformers.ReflectionFieldTransformer", "net.minecraftforge.fml.common.asm.transformers.ScriptEngineTransformer", From 1f4f7f757cb2b837cb54dab5b6b408ae8a44b510 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Wed, 24 Jan 2024 17:20:37 +0800 Subject: [PATCH 020/130] Update bouncepad exclusion --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 94524b600..27a4e6045 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ installer_tools_version = 1.3.0 # Libraries asm_version = 9.6 asm_deprecated = 7.1 -bouncepad_version = 0.4.32-cursed +bouncepad_version = 0.4.33-cursed lwjgl_version = 3.3.4-27-CLEANROOM # Sets default memory used for Gradle commands. Can be overridden by user or command line properties. From 8860cd0c0d6dd634f877458ed48ea431747153da Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 25 Jan 2024 11:26:45 +0800 Subject: [PATCH 021/130] Add alcCloseDevice to ALC10 --- src/main/java/org/lwjgl/openal/ALC10.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/lwjgl/openal/ALC10.java b/src/main/java/org/lwjgl/openal/ALC10.java index 818197264..df05a480e 100644 --- a/src/main/java/org/lwjgl/openal/ALC10.java +++ b/src/main/java/org/lwjgl/openal/ALC10.java @@ -53,6 +53,10 @@ public static ALCcontext alcCreateContext(ALCdevice device, java.nio.IntBuffer a return alcContext; } + public static void alcCloseDevice(ALCdevice alCdevice) { + org.lwjgl3.openal.ALC10.alcCloseDevice(alCdevice.device); + } + public static ALCcontext alcGetCurrentContext() { return alcContext; } From 9e04899e84229473a3f6cf9a85392c636b94ab66 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 25 Jan 2024 12:43:00 +0800 Subject: [PATCH 022/130] Fix return type of alcCloseDevice --- src/main/java/org/lwjgl/openal/ALC10.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/lwjgl/openal/ALC10.java b/src/main/java/org/lwjgl/openal/ALC10.java index df05a480e..df4562008 100644 --- a/src/main/java/org/lwjgl/openal/ALC10.java +++ b/src/main/java/org/lwjgl/openal/ALC10.java @@ -53,8 +53,8 @@ public static ALCcontext alcCreateContext(ALCdevice device, java.nio.IntBuffer a return alcContext; } - public static void alcCloseDevice(ALCdevice alCdevice) { - org.lwjgl3.openal.ALC10.alcCloseDevice(alCdevice.device); + public static boolean alcCloseDevice(ALCdevice alCdevice) { + return org.lwjgl3.openal.ALC10.alcCloseDevice(alCdevice.device); } public static ALCcontext alcGetCurrentContext() { From 23e9d2e6a8fb0142d01c635abf592599108a7c2f Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 25 Jan 2024 13:28:36 +0800 Subject: [PATCH 023/130] Add jinput manually --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index fafe419f4..e404e9e58 100644 --- a/build.gradle +++ b/build.gradle @@ -458,6 +458,7 @@ project(':cleanroom') { installer 'jakarta.activation:jakarta.activation-api:2.1.2' installer 'org.glassfish.corba:glassfish-corba-omgapi:4.2.5' installer 'org.openjdk.nashorn:nashorn-core:15.4' + installer 'net.java.jinput:jinput:2.0.9' // Mixin installer 'com.cleanroommc:sponge-mixin:0.16.0+mixin.0.8.5' From d9f21d08d9550de6a259a5302b610d473df1a2c7 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 25 Jan 2024 15:38:14 +0800 Subject: [PATCH 024/130] Add jinput natives --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index e404e9e58..2ff3e56fa 100644 --- a/build.gradle +++ b/build.gradle @@ -459,6 +459,7 @@ project(':cleanroom') { installer 'org.glassfish.corba:glassfish-corba-omgapi:4.2.5' installer 'org.openjdk.nashorn:nashorn-core:15.4' installer 'net.java.jinput:jinput:2.0.9' + installer 'net.java.jinput:jinput-platform:2.0.7' // Mixin installer 'com.cleanroommc:sponge-mixin:0.16.0+mixin.0.8.5' From e385179e28b3bf90c6662e5ea94894dbff7015a5 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 25 Jan 2024 16:01:54 +0800 Subject: [PATCH 025/130] Add jinput natives correctly. That's a bad idea --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2ff3e56fa..b0799847b 100644 --- a/build.gradle +++ b/build.gradle @@ -459,7 +459,9 @@ project(':cleanroom') { installer 'org.glassfish.corba:glassfish-corba-omgapi:4.2.5' installer 'org.openjdk.nashorn:nashorn-core:15.4' installer 'net.java.jinput:jinput:2.0.9' - installer 'net.java.jinput:jinput-platform:2.0.7' + installer 'net.java.jinput:jinput-platform:2.0.7:natives-windows' + installer 'net.java.jinput:jinput-platform:2.0.7:natives-linux' + installer 'net.java.jinput:jinput-platform:2.0.7:natives-osx' // Mixin installer 'com.cleanroommc:sponge-mixin:0.16.0+mixin.0.8.5' From 09ee654ffc756ff7ad7d0fc4494199b6410332d3 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 25 Jan 2024 18:32:03 +0800 Subject: [PATCH 026/130] Experimental raw input from lwjgl3 --- src/main/java/org/lwjgl/opengl/Display.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/lwjgl/opengl/Display.java b/src/main/java/org/lwjgl/opengl/Display.java index 92230e28c..0a92e7ef9 100644 --- a/src/main/java/org/lwjgl/opengl/Display.java +++ b/src/main/java/org/lwjgl/opengl/Display.java @@ -134,6 +134,9 @@ public static void create() { if (Window.handle == 0L) { throw new IllegalStateException("Failed to create Display window"); } + if (org.lwjgl3.glfw.GLFW.glfwRawMouseMotionSupported()) { + GLFW.glfwSetInputMode(Window.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE); + } Window.keyCallback = new GLFWKeyCallback() { From 16a16d6d1c731f988426d088480daebd74d9afad Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Fri, 26 Jan 2024 11:03:27 +0800 Subject: [PATCH 027/130] Remove jinput dependency --- build.gradle | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.gradle b/build.gradle index b0799847b..fafe419f4 100644 --- a/build.gradle +++ b/build.gradle @@ -458,10 +458,6 @@ project(':cleanroom') { installer 'jakarta.activation:jakarta.activation-api:2.1.2' installer 'org.glassfish.corba:glassfish-corba-omgapi:4.2.5' installer 'org.openjdk.nashorn:nashorn-core:15.4' - installer 'net.java.jinput:jinput:2.0.9' - installer 'net.java.jinput:jinput-platform:2.0.7:natives-windows' - installer 'net.java.jinput:jinput-platform:2.0.7:natives-linux' - installer 'net.java.jinput:jinput-platform:2.0.7:natives-osx' // Mixin installer 'com.cleanroommc:sponge-mixin:0.16.0+mixin.0.8.5' From 4d525dc9ebaa898e54e3c92adc8cdb410c92a0e8 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Fri, 26 Jan 2024 12:24:09 +0800 Subject: [PATCH 028/130] Experimentally rewrote text wrapping --- .../client/gui/FontRenderer.java.patch | 201 ++++++++++-------- .../gui/GuiUtilRenderComponents.java.patch | 175 +++++++++++++-- 2 files changed, 266 insertions(+), 110 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch index 69da355db..d78897a6f 100644 --- a/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch @@ -8,12 +8,14 @@ import java.awt.image.BufferedImage; import java.io.IOException; import java.util.Arrays; -@@ -25,10 +26,13 @@ +@@ -24,11 +25,15 @@ + import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.commons.io.IOUtils; - -+import java.util.*; ++import org.apache.commons.lang3.tuple.Pair; + ++import java.util.*; + @SideOnly(Side.CLIENT) public class FontRenderer implements IResourceManagerReloadListener { @@ -22,7 +24,7 @@ protected final int[] field_78286_d = new int[256]; public int field_78288_b = 9; public Random field_78289_c = new Random(); -@@ -56,7 +60,7 @@ +@@ -56,7 +61,7 @@ this.field_111273_g = p_i1035_2_; this.field_78298_i = p_i1035_3_; this.field_78293_l = p_i1035_4_; @@ -31,7 +33,7 @@ for (int i = 0; i < 32; ++i) { -@@ -107,7 +111,7 @@ +@@ -107,7 +112,7 @@ try { @@ -40,7 +42,7 @@ bufferedimage = TextureUtil.func_177053_a(iresource.func_110527_b()); } catch (IOException ioexception) -@@ -171,7 +175,7 @@ +@@ -171,7 +176,7 @@ try { @@ -49,7 +51,7 @@ iresource.func_110527_b().read(this.field_78287_e); } catch (IOException ioexception) -@@ -186,6 +190,7 @@ +@@ -186,6 +191,7 @@ private float func_181559_a(char p_181559_1_, boolean p_181559_2_) { @@ -57,7 +59,7 @@ if (p_181559_1_ == ' ') { return 4.0F; -@@ -203,7 +208,7 @@ +@@ -203,7 +209,7 @@ int i = p_78266_1_ % 16 * 8; int j = p_78266_1_ / 16 * 8; int k = p_78266_2_ ? 1 : 0; @@ -66,7 +68,7 @@ int l = this.field_78286_d[p_78266_1_]; float f = (float)l - 0.01F; GlStateManager.func_187447_r(5); -@@ -231,7 +236,7 @@ +@@ -231,7 +237,7 @@ private void func_78257_a(int p_78257_1_) { @@ -75,7 +77,7 @@ } protected float func_78277_a(char p_78277_1_, boolean p_78277_2_) -@@ -280,7 +285,7 @@ +@@ -280,7 +286,7 @@ public int func_175065_a(String p_175065_1_, float p_175065_2_, float p_175065_3_, int p_175065_4_, boolean p_175065_5_) { @@ -84,7 +86,23 @@ this.func_78265_b(); int i; -@@ -350,7 +355,7 @@ +@@ -328,9 +334,13 @@ + + if (c0 == 167 && i + 1 < p_78255_1_.length()) + { +- int i1 = "0123456789abcdefklmnor".indexOf(String.valueOf(p_78255_1_.charAt(i + 1)).toLowerCase(Locale.ROOT).charAt(0)); ++ int i1 = "0123456789abcdefklmnor§".indexOf(String.valueOf(p_78255_1_.charAt(i + 1)).toLowerCase(Locale.ROOT).charAt(0)); + +- if (i1 < 16) ++ if (i1 < 0) ++ { ++ continue; ++ } ++ else if (i1 < 16) + { + this.field_78303_s = false; + this.field_78302_t = false; +@@ -350,7 +360,7 @@ int j1 = this.field_78285_g[i1]; this.field_78304_r = j1; @@ -93,16 +111,20 @@ } else if (i1 == 16) { -@@ -379,7 +384,7 @@ +@@ -379,7 +389,11 @@ this.field_78299_w = false; this.field_78300_v = false; this.field_78301_u = false; - GlStateManager.func_179131_c(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); + setColor(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); ++ } ++ else ++ { ++ i--; } ++i; -@@ -409,7 +414,7 @@ +@@ -409,7 +423,7 @@ c0 = c1; } @@ -111,7 +133,7 @@ boolean flag = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_; if (flag) -@@ -447,6 +452,15 @@ +@@ -447,6 +461,15 @@ ++f; } @@ -127,7 +149,7 @@ if (this.field_78299_w) { -@@ -580,6 +594,7 @@ +@@ -580,6 +603,7 @@ public int func_78263_a(char p_78263_1_) { @@ -135,7 +157,7 @@ if (p_78263_1_ == 167) { return -1; -@@ -635,14 +650,17 @@ +@@ -635,14 +659,17 @@ { flag = false; @@ -158,7 +180,7 @@ } else if (i1 < 0) { -@@ -678,7 +696,7 @@ +@@ -678,7 +705,7 @@ private String func_78273_d(String p_78273_1_) { @@ -167,96 +189,93 @@ { p_78273_1_ = p_78273_1_.substring(0, p_78273_1_.length() - 1); } -@@ -725,9 +743,95 @@ +@@ -725,9 +752,92 @@ public List func_78271_c(String p_78271_1_, int p_78271_2_) { - return Arrays.asList(this.func_78280_d(p_78271_1_, p_78271_2_).split("\n")); -+ // They don't render and should not be feed into iterator -+ String cleanStr = str.replaceAll("\u00a7.", "").replaceAll("\u00a7", ""); -+ if (cleanStr.length() == 0) return Collections.singletonList(str); -+ BREAK_ITERATOR.setText(cleanStr); ++ if (p_78271_1_.isEmpty()){ ++ return Collections.singletonList(""); ++ } ++ BREAK_ITERATOR.setText(p_78271_1_); + List list = new ArrayList<>(); -+ String format = ""; // For last line's format since it should use format of previous line -+ StringBuilder nextFormat = new StringBuilder(); -+ int i = 0, j = 0, k, l; -+ record Reset(int i, int ri) {} -+ Stack lastReset = new Stack<>(); -+ lastReset.push(new Reset(0, 0)); -+ int strWidth = 0; -+ int prevBreak = 0; ++ int lineWidth = 0, fed = 0, icui, d; ++ StringBuilder format = new StringBuilder(); // For next line's format since it should use format of previous line ++ HashMap> map = new HashMap<>(); ++ StringBuilder line = new StringBuilder(); ++ String temp; ++ char[] chars = p_78271_1_.toCharArray(); ++ char f; + boolean bold = false; -+ char c, f, back; -+ int prevCandidate; -+ do { -+ switch (c = str.charAt(i)) { -+ case '\n' -> { -+ list.add(nextFormat.substring(lastReset.peek().ri()) + str.substring(prevBreak, i)); -+ format = nextFormat.toString(); -+ prevBreak = i + 1; -+ strWidth = 0; -+ } -+ case '\u00a7' -> { // format start -+ if (i + 1 < str.length()) { // Prevent out of bound -+ f = str.charAt(++i); -+ nextFormat.append('\u00a7').append(f); // Add to current format code ++ for (int i = 0; i < chars.length; i++) { ++ char current = chars[i]; ++ switch (current) { ++ case '\n': ++ list.add(line.toString()); ++ fed += line.length() + 1; ++ line.delete(0, line.length()).append(format); ++ lineWidth = 0; ++ map.put(i, Pair.of(lineWidth, format.toString())); ++ continue; ++ case '§': ++ if (i + 1 < chars.length) { // Prevent out of bound ++ f = chars[i + 1]; + if (f != 'l' && f != 'L') { // Check start of bold style -+ if (f == 'r' || f == 'R' || isFormatColor(f)) { // Not Bold, check end of style ++ if (f == 'r' || f == 'R' || func_78272_b(f)) { // Not Bold, check end of style + bold = false; -+ lastReset.push(new Reset(i - 1, nextFormat.length())); // push reset location in str and format to stack ++ if (f == 'r' || f == 'R') { ++ format.delete(0, format.length()); // Clear the format ++ } else { ++ format.append('§').append(f); // Add to current format code ++ } ++ line.append('§').append(f); ++ map.put(i, Pair.of(lineWidth, format.toString())); ++ map.put(++i, Pair.of(lineWidth, format.toString())); ++ continue; ++ } ++ if (f >= 'k' && f <= 'o' || f >= 'K' && f <= 'O') { ++ format.append('§').append(f); // Add to current format code ++ line.append('§').append(f); ++ map.put(i, Pair.of(lineWidth, format.toString())); ++ map.put(++i, Pair.of(lineWidth, format.toString())); ++ continue; + } + } else { + bold = true; ++ format.append('§').append(f); // Add to current format code ++ line.append('§').append(f); ++ map.put(i, Pair.of(lineWidth, format.toString())); ++ map.put(++i, Pair.of(lineWidth, format.toString())); ++ continue; + } + } -+ } -+ default -> { -+ strWidth += getCharWidth(c); ++ default: ++ line.append(current); ++ lineWidth += func_78263_a(current); + if (bold) { -+ // Bold style is fat -+ strWidth += 1; ++ lineWidth++; // Bold style is one pixel wider + } -+ } ++ break; + } -+ if (strWidth > wrapWidth) { -+ BREAK_ITERATOR.following(j); // The legal break right after j -+ prevCandidate = BREAK_ITERATOR.previous(); // Find the nearest legit break -+ k = i; -+ l = j; -+ if (prevCandidate > -1) { -+ while (l > prevCandidate && k > 0) { // Backward searching to get actual format at break -+ k--; -+ l--; -+ back = str.charAt(k); -+ if (back == '\u00a7') { -+ if (!lastReset.isEmpty() && k == lastReset.peek().i()) { -+ lastReset.pop(); // Remove reset -+ } -+ if (nextFormat.length() > 1) -+ nextFormat.delete(nextFormat.length() - 2, nextFormat.length()); // Remove format -+ l++; -+ } -+ } -+ } -+ if (k <= prevBreak) { -+ k = i; // Break in previous line, not usable, set it to current i ++ map.put(i, Pair.of(lineWidth, format.toString())); ++ if (lineWidth > p_78271_2_) { ++ icui = BREAK_ITERATOR.preceding(i); ++ if (icui <= fed) { ++ list.add(line.substring(0,line.length() - 1)); ++ fed += line.length() - 1; ++ line.delete(0, line.length()).append(format).append(current); ++ lineWidth = func_78263_a(current); ++ } else { ++ d = icui - fed; ++ list.add(line.substring(0, d)); ++ temp = line.substring(d); ++ fed += d; ++ line.delete(0, line.length()).append(map.get(icui).getRight()).append(temp); ++ lineWidth = lineWidth - map.get(icui - 1).getLeft(); + } -+ if (str.charAt(k - 1) == '\u00a7') { -+ k--; // Make sure not to break in format code. Can't figure out how to put it in while(), so -+ } -+ list.add(nextFormat.substring(lastReset.peek().ri()) + str.substring(prevBreak, k)); -+ format = nextFormat.toString(); -+ if (k != i) { -+ j = prevCandidate; // k!=i means usable break point found, j should back to corresponding location -+ } -+ prevBreak = k; -+ i = k; -+ strWidth = getCharWidth(c); // Width of first char of new line. + } -+ i++; -+ j++; -+ } while (i < str.length()); -+ list.add(format + str.substring(prevBreak)); ++ } ++ list.add(line.toString()); + return list; } @@ -264,7 +283,7 @@ String func_78280_d(String p_78280_1_, int p_78280_2_) { int i = this.func_78259_e(p_78280_1_, p_78280_2_); -@@ -746,6 +850,7 @@ +@@ -746,6 +856,7 @@ } } @@ -272,7 +291,7 @@ private int func_78259_e(String p_78259_1_, int p_78259_2_) { int i = p_78259_1_.length(); -@@ -844,6 +949,26 @@ +@@ -844,6 +955,26 @@ public boolean func_78260_a() { return this.field_78294_m; diff --git a/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch index 47974aa80..5f6418c51 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiUtilRenderComponents.java.patch @@ -1,6 +1,14 @@ --- before/net/minecraft/client/gui/GuiUtilRenderComponents.java +++ after/net/minecraft/client/gui/GuiUtilRenderComponents.java -@@ -17,13 +17,11 @@ +@@ -4,6 +4,7 @@ + import java.util.List; + import net.minecraft.client.Minecraft; + import net.minecraft.util.text.ITextComponent; ++import net.minecraft.util.text.Style; + import net.minecraft.util.text.TextComponentString; + import net.minecraft.util.text.TextFormatting; + import net.minecraftforge.fml.relauncher.Side; +@@ -17,94 +18,111 @@ return !p_178909_1_ && !Minecraft.func_71410_x().field_71474_y.field_74344_o ? TextFormatting.func_110646_a(p_178909_0_) : p_178909_0_; } @@ -9,33 +17,162 @@ - ) + public static List func_178908_a(ITextComponent p_178908_0_, int p_178908_1_, FontRenderer p_178908_2_, boolean p_178908_3_, boolean p_178908_4_) { - int i = 0; - ITextComponent itextcomponent = new TextComponentString(""); -- List list = Lists.newArrayList(); -+ List list = Lists.newArrayList(); - List list1 = Lists.newArrayList(p_178908_0_); +- int i = 0; +- ITextComponent itextcomponent = new TextComponentString(""); ++ int accumlateWidth = 0; + List list = Lists.newArrayList(); +- List list1 = Lists.newArrayList(p_178908_0_); +- +- for (int j = 0; j < list1.size(); ++j) +- { +- ITextComponent itextcomponent1 = list1.get(j); +- String s = itextcomponent1.func_150261_e(); +- boolean flag = false; +- +- if (s.contains("\n")) +- { +- int k = s.indexOf(10); +- String s1 = s.substring(k + 1); +- s = s.substring(0, k + 1); +- ITextComponent itextcomponent2 = new TextComponentString(s1); +- itextcomponent2.func_150255_a(itextcomponent1.func_150256_b().func_150232_l()); +- list1.add(j + 1, itextcomponent2); +- flag = true; ++ List cache = Lists.newArrayList(); ++ List