generated from kappa-maintainer/1.12.2-FG6-Template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Polyfrost mods patch & fix LP patch
- Loading branch information
1 parent
072c159
commit cefde7b
Showing
5 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/com/cleanroommc/fugue/transformer/LaunchWrapperTweakerTransformer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.cleanroommc.fugue.transformer; | ||
|
||
import com.cleanroommc.fugue.common.Fugue; | ||
import javassist.ClassPool; | ||
import javassist.CtClass; | ||
import top.outlands.foundation.IExplicitTransformer; | ||
|
||
import java.io.ByteArrayInputStream; | ||
|
||
public class LaunchWrapperTweakerTransformer implements IExplicitTransformer { | ||
@Override | ||
public byte[] transform(byte[] bytes) { | ||
try { | ||
CtClass cc = ClassPool.getDefault().makeClass(new ByteArrayInputStream(bytes)); | ||
cc.getDeclaredMethod("isInitialized").setBody("{return com.cleanroommc.fugue.helper.HookHelper#isInitialized($$);}"); | ||
cc.getDeclaredMethod("addToClasspath").setBody("{com.cleanroommc.fugue.helper.HookHelper#addToClasspath($$);}"); | ||
bytes = cc.toBytecode(); | ||
} catch (Throwable t) { | ||
Fugue.LOGGER.error("Exception {} on {}", t, this.getClass().getSimpleName()); | ||
} | ||
return bytes; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/main/java/com/cleanroommc/fugue/transformer/logisticpipes/LogisticsPipesTrigger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters