mirror of https://github.com/cabaletta/baritone
Move tweak class to its own package
Launchwrapper automatically adds a classloader exclusion for every package containing a tweak class, forcing the whole package to load through the parent class loader.
This commit is contained in:
parent
92bc067633
commit
1947459acf
|
@ -71,10 +71,10 @@ public class Determinizer {
|
||||||
ByteArrayOutputStream cancer = new ByteArrayOutputStream();
|
ByteArrayOutputStream cancer = new ByteArrayOutputStream();
|
||||||
copy(jarFile.getInputStream(entry), cancer);
|
copy(jarFile.getInputStream(entry), cancer);
|
||||||
String manifest = new String(cancer.toByteArray());
|
String manifest = new String(cancer.toByteArray());
|
||||||
if (!manifest.contains("baritone.launch.BaritoneTweaker")) {
|
if (!manifest.contains("baritone.launch.tweaker.BaritoneTweaker")) {
|
||||||
throw new IllegalStateException("unable to replace");
|
throw new IllegalStateException("unable to replace");
|
||||||
}
|
}
|
||||||
manifest = manifest.replace("baritone.launch.BaritoneTweaker", "org.spongepowered.asm.launch.MixinTweaker");
|
manifest = manifest.replace("baritone.launch.tweaker.BaritoneTweaker", "org.spongepowered.asm.launch.MixinTweaker");
|
||||||
jos.write(manifest.getBytes());
|
jos.write(manifest.getBytes());
|
||||||
} else {
|
} else {
|
||||||
copy(jarFile.getInputStream(entry), jos);
|
copy(jarFile.getInputStream(entry), jos);
|
||||||
|
|
|
@ -26,7 +26,7 @@ plugins {
|
||||||
unimined.minecraft {
|
unimined.minecraft {
|
||||||
runs.client = {
|
runs.client = {
|
||||||
mainClass = "net.minecraft.launchwrapper.Launch"
|
mainClass = "net.minecraft.launchwrapper.Launch"
|
||||||
args.addAll(["--tweakClass", "baritone.launch.BaritoneTweaker"])
|
args.addAll(["--tweakClass", "baritone.launch.tweaker.BaritoneTweaker"])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package baritone.launch;
|
package baritone.launch.tweaker;
|
||||||
|
|
||||||
import io.github.impactdevelopment.simpletweaker.SimpleTweaker;
|
import io.github.impactdevelopment.simpletweaker.SimpleTweaker;
|
||||||
import net.minecraft.launchwrapper.Launch;
|
import net.minecraft.launchwrapper.Launch;
|
Loading…
Reference in New Issue