Skip to content

Commit

Permalink
Moved and renamed battlegear access transformer classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
c0508383 committed Jun 26, 2024
1 parent b3cc4a2 commit e0e1bda
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 39 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import cpw.mods.fml.relauncher.CoreModManager;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import xonin.backhand.api.core.BattlegearTranslator;
import mods.battlegear2.coremod.BattlegearLoadingPlugin;
import xonin.backhand.coremod.BackhandLoadingPlugin;
import net.tclproject.mysteriumlib.asm.core.ASMFix;
import net.tclproject.mysteriumlib.asm.core.MetaReader;
import net.tclproject.mysteriumlib.asm.core.TargetClassTransformer;
Expand All @@ -23,7 +23,7 @@
* Custom IFMLLoadingPlugin implementation.
* @see IFMLLoadingPlugin
* */
@IFMLLoadingPlugin.TransformerExclusions({"net.tclproject", "mods.battlegear2.coremod"})
@IFMLLoadingPlugin.TransformerExclusions({"net.tclproject", "xonin.backhand.coremod"})
public class CustomLoadingPlugin implements IFMLLoadingPlugin {

/**A DeobfuscationTransformer instance for use inside this class.*/
Expand Down Expand Up @@ -134,7 +134,7 @@ public static boolean isObfuscated() {
// Only exists in 1.7.10. Comment out if not needed.
@Override
public String getAccessTransformerClass() {
return "mods.battlegear2.coremod.transformers.BattlegearAccessTransformer";
return "xonin.backhand.coremod.transformers.BattlegearAccessTransformer";
}


Expand All @@ -161,7 +161,7 @@ public String getSetupClass() {
@Override
public void injectData(Map<String, Object> data) {
debugOutputLocation = new File(data.get("mcLocation").toString(), "bg edited classes");
BattlegearLoadingPlugin.debugOutputLocation = new File(data.get("mcLocation").toString(), "bg edited classes");
BackhandLoadingPlugin.debugOutputLocation = new File(data.get("mcLocation").toString(), "bg edited classes");
BattlegearTranslator.obfuscatedEnv = Boolean.class.cast(data.get("runtimeDeobfuscationEnabled"));
if (((ArrayList)data.get("coremodList")).contains("DragonAPIASMHandler")) {
Logger.getGlobal().info("Core: Located DragonAPI in list of coremods");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.tclproject.mysteriumlib.asm.fixes;

import mods.battlegear2.coremod.transformers.*;
import net.tclproject.mysteriumlib.asm.common.CustomClassTransformer;
import net.tclproject.mysteriumlib.asm.common.CustomLoadingPlugin;
import net.tclproject.mysteriumlib.asm.common.FirstClassTransformer;
import xonin.backhand.coremod.transformers.*;

public class MysteriumPatchesFixLoaderO extends CustomLoadingPlugin {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod;
package xonin.backhand.coremod;

import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name;
Expand All @@ -9,18 +9,18 @@
import java.io.File;
import java.util.Map;

@TransformerExclusions({"mods.battlegear2.coremod"})
@TransformerExclusions({"xonin.backhand.coremod"})
@Name("Mine and Blade: Battlegear2")
@SortingIndex(1500)
public final class BattlegearLoadingPlugin implements IFMLLoadingPlugin {

public static final String EntityPlayerTransformer = "mods.battlegear2.coremod.transformers.EntityPlayerTransformer";
public static final String NetClientHandlerTransformer = "mods.battlegear2.coremod.transformers.NetClientHandlerTransformer";
public static final String PlayerControllerMPTransformer = "mods.battlegear2.coremod.transformers.PlayerControllerMPTransformer";
public static final String ItemInWorldTransformer = "mods.battlegear2.coremod.transformers.ItemInWorldTransformer";
public static final String EntityAIControlledTransformer = "mods.battlegear2.coremod.transformers.EntityAIControlledByPlayerTransformer";
public static final String EntityOtherPlayerMPTransformer = "mods.battlegear2.coremod.transformers.EntityOtherPlayerMPTransformer";
public static final String AccessTransformer = "mods.battlegear2.coremod.transformers.BattlegearAccessTransformer";
public final class BackhandLoadingPlugin implements IFMLLoadingPlugin {

public static final String EntityPlayerTransformer = "xonin.backhand.coremod.transformers.EntityPlayerTransformer";
public static final String NetClientHandlerTransformer = "xonin.backhand.coremod.transformers.NetClientHandlerTransformer";
public static final String PlayerControllerMPTransformer = "xonin.backhand.coremod.transformers.PlayerControllerMPTransformer";
public static final String ItemInWorldTransformer = "xonin.backhand.coremod.transformers.ItemInWorldTransformer";
public static final String EntityAIControlledTransformer = "xonin.backhand.coremod.transformers.EntityAIControlledByPlayerTransformer";
public static final String EntityOtherPlayerMPTransformer = "xonin.backhand.coremod.transformers.EntityOtherPlayerMPTransformer";
public static final String AccessTransformer = "xonin.backhand.coremod.transformers.BattlegearAccessTransformer";
public static File debugOutputLocation;

public static final String[] transformers =
Expand All @@ -43,7 +43,6 @@ public String[] getASMTransformerClass() {

@Override
public String getModContainerClass() {
//return "mods.battlegear2.coremod.BattlegearCoremodContainer";
return null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package xonin.backhand.coremod.transformers;

import java.io.IOException;

import cpw.mods.fml.common.asm.transformers.AccessTransformer;

public class BackhandAccessTransformer extends AccessTransformer {
public BackhandAccessTransformer() throws IOException {
super("theoffhandmod_at.cfg");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import xonin.backhand.api.core.BattlegearTranslator;
import org.objectweb.asm.tree.MethodNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import xonin.backhand.api.core.BattlegearTranslator;
import org.objectweb.asm.tree.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import xonin.backhand.api.core.BattlegearTranslator;
import xonin.backhand.api.core.IBattlePlayer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import xonin.backhand.api.core.BattlegearTranslator;
import org.objectweb.asm.tree.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import xonin.backhand.api.core.BattlegearTranslator;
import org.objectweb.asm.tree.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import org.objectweb.asm.tree.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import xonin.backhand.api.core.BattlegearTranslator;
import org.objectweb.asm.tree.MethodNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import xonin.backhand.api.core.BattlegearTranslator;
import mods.battlegear2.coremod.BattlegearLoadingPlugin;
import xonin.backhand.coremod.BackhandLoadingPlugin;
import net.minecraft.launchwrapper.IClassTransformer;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
Expand Down Expand Up @@ -74,7 +74,7 @@ void addInterface(List<String> interfaces) {

public static void writeClassFile(ClassWriter cw, String name) {
try {
File outDir = BattlegearLoadingPlugin.debugOutputLocation;
File outDir = BackhandLoadingPlugin.debugOutputLocation;
outDir.mkdirs();
DataOutputStream dout = new DataOutputStream(new FileOutputStream(new File(outDir, name + ".class")));
dout.write(cw.toByteArray());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mods.battlegear2.coremod.transformers;
package xonin.backhand.coremod.transformers;

import org.objectweb.asm.tree.FieldNode;
import org.objectweb.asm.tree.MethodNode;
Expand Down

0 comments on commit e0e1bda

Please sign in to comment.