mirror of
https://github.com/GTNewHorizons/GTNHLib.git
synced 2026-11-26 14:53:14 +00:00
Fix transformer exclusions when loading without RFB (#56)
* fix transformer exclusions when loading without RFB
This commit is contained in:
1 parent
5d4f7119b8
commit
9d9575f99b
1 file changed
+6
+6
@@ -17,6 +17,8 @@ import org.objectweb.asm.tree.MethodNode;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.asm.ClassConstantPoolParser;
|
||||
|
||||
import lombok.val;
|
||||
|
||||
public class TessellatorRedirectorTransformer implements IClassTransformer {
|
||||
|
||||
private static final String TessellatorClass = "net/minecraft/client/renderer/Tessellator";
|
||||
@@ -44,6 +46,10 @@ public class TessellatorRedirectorTransformer implements IClassTransformer {
|
||||
public byte[] transform(String name, String transformedName, byte[] basicClass) {
|
||||
if (basicClass == null) return null;
|
||||
|
||||
for (val exclusion : TransformerExclusions) {
|
||||
if (transformedName.startsWith(exclusion)) return basicClass;
|
||||
}
|
||||
|
||||
if (!cstPoolParser.find(basicClass, true)) {
|
||||
return basicClass;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user