Changed access to use this qualifier

This commit is contained in:
yueh
2014-12-29 15:13:47 +01:00
parent 2a5e57a59b
commit f471513bd0
604 changed files with 11573 additions and 11573 deletions
@@ -42,16 +42,16 @@ public class AppEngCore extends DummyModContainer implements IFMLLoadingPlugin
protected final ModMetadata md = new ModMetadata();
public AppEngCore() {
instance = this;
this.instance = this;
FMLRelaunchLog.info( "[AppEng] Core Init" );
md.autogenerated = false;
md.authorList.add( "AlgorithmX2" );
md.credits = "AlgorithmX2";
md.modId = getModId();
md.version = getVersion();
md.name = getName();
md.url = "http://ae2.ae-mod.info";
md.description = "Embedded Coremod for Applied Energistics 2";
this.md.autogenerated = false;
this.md.authorList.add( "AlgorithmX2" );
this.md.credits = "AlgorithmX2";
this.md.modId = this.getModId();
this.md.version = this.getVersion();
this.md.name = this.getName();
this.md.url = "http://ae2.ae-mod.info";
this.md.description = "Embedded Coremod for Applied Energistics 2";
}
@EventHandler
@@ -110,13 +110,13 @@ public class AppEngCore extends DummyModContainer implements IFMLLoadingPlugin
@Override
public String getDisplayVersion()
{
return getVersion();
return this.getVersion();
}
@Override
public ModMetadata getMetadata()
{
return md;
return this.md;
}
@Override
@@ -35,7 +35,7 @@ public class MissingCoreMod extends CustomModLoadingErrorDisplayException
try
{
clz.getField( "mc" );
deobf = true;
this.deobf = true;
}
catch (Throwable ignored)
{
@@ -47,30 +47,30 @@ public class MissingCoreMod extends CustomModLoadingErrorDisplayException
public void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime)
{
int offset = 10;
drawCenteredString( fontRenderer, "Sorry, couldn't load AE2 Properly.", errorScreen.width / 2, offset += 15, 0xffffff );
drawCenteredString( fontRenderer, "Please make sure that AE2 is installed into your mods folder.", errorScreen.width / 2, offset += 15, 0xeeeeee );
this.drawCenteredString( fontRenderer, "Sorry, couldn't load AE2 Properly.", errorScreen.width / 2, offset += 15, 0xffffff );
this.drawCenteredString( fontRenderer, "Please make sure that AE2 is installed into your mods folder.", errorScreen.width / 2, offset += 15, 0xeeeeee );
offset += 15;
if ( deobf )
if ( this.deobf )
{
offset += 15;
drawCenteredString( fontRenderer, "In a developer environment add the following too your args,", errorScreen.width / 2, offset += 15, 0xffffff );
drawCenteredString( fontRenderer, "-Dfml.coreMods.load=appeng.transformer.AppEngCore", errorScreen.width / 2, offset += 15, 0xeeeeee );
this.drawCenteredString( fontRenderer, "In a developer environment add the following too your args,", errorScreen.width / 2, offset += 15, 0xffffff );
this.drawCenteredString( fontRenderer, "-Dfml.coreMods.load=appeng.transformer.AppEngCore", errorScreen.width / 2, offset += 15, 0xeeeeee );
}
else
{
drawCenteredString( fontRenderer, "You're launcher may refer to this by different names,", errorScreen.width / 2, offset += 15, 0xffffff );
this.drawCenteredString( fontRenderer, "You're launcher may refer to this by different names,", errorScreen.width / 2, offset += 15, 0xffffff );
offset += 5;
drawCenteredString( fontRenderer, "MultiMC calls this tab \"Loader Mods\"", errorScreen.width / 2, offset += 15, 0xeeeeee );
drawCenteredString( fontRenderer, "Magic Launcher calls this tab \"External Mods\"", errorScreen.width / 2, offset += 15, 0xeeeeee );
drawCenteredString( fontRenderer, "Most other launchers refer to this tab as just \"Mods\"", errorScreen.width / 2, offset += 15, 0xeeeeee );
this.drawCenteredString( fontRenderer, "MultiMC calls this tab \"Loader Mods\"", errorScreen.width / 2, offset += 15, 0xeeeeee );
this.drawCenteredString( fontRenderer, "Magic Launcher calls this tab \"External Mods\"", errorScreen.width / 2, offset += 15, 0xeeeeee );
this.drawCenteredString( fontRenderer, "Most other launchers refer to this tab as just \"Mods\"", errorScreen.width / 2, offset += 15, 0xeeeeee );
offset += 15;
drawCenteredString( fontRenderer, "Also make sure that the AE2 file is a .jar, and not a .zip", errorScreen.width / 2, offset += 15, 0xffffff );
this.drawCenteredString( fontRenderer, "Also make sure that the AE2 file is a .jar, and not a .zip", errorScreen.width / 2, offset += 15, 0xffffff );
}
}
@@ -80,7 +80,7 @@ public class ASMIntegration implements IClassTransformer
try
{
boolean reWrite = removeOptionals( classNode );
boolean reWrite = this.removeOptionals( classNode );
if ( reWrite )
{
@@ -105,16 +105,16 @@ public class ASMIntegration implements IClassTransformer
{
for ( AnnotationNode an : classNode.visibleAnnotations )
{
if ( hasAnnotation( an, integration.Interface.class ) )
if ( this.hasAnnotation( an, integration.Interface.class ) )
{
if ( stripInterface( classNode, integration.Interface.class, an ) )
if ( this.stripInterface( classNode, integration.Interface.class, an ) )
changed = true;
}
else if ( hasAnnotation( an, integration.InterfaceList.class ) )
else if ( this.hasAnnotation( an, integration.InterfaceList.class ) )
{
for ( Object o : ( ( List ) an.values.get( 1 ) ) )
{
if ( stripInterface( classNode, integration.InterfaceList.class, ( AnnotationNode ) o ) )
if ( this.stripInterface( classNode, integration.InterfaceList.class, ( AnnotationNode ) o ) )
changed = true;
}
}
@@ -130,9 +130,9 @@ public class ASMIntegration implements IClassTransformer
{
for ( AnnotationNode an : mn.visibleAnnotations )
{
if ( hasAnnotation( an, integration.Method.class ) )
if ( this.hasAnnotation( an, integration.Method.class ) )
{
if ( stripMethod( classNode, mn, i, integration.Method.class, an ) )
if ( this.stripMethod( classNode, mn, i, integration.Method.class, an ) )
changed = true;
}
}
@@ -141,7 +141,7 @@ public class ASMIntegration implements IClassTransformer
}
if ( changed )
log( "Updated " + classNode.name );
this.log( "Updated " + classNode.name );
return changed;
}
@@ -166,12 +166,12 @@ public class ASMIntegration implements IClassTransformer
IntegrationType type = IntegrationType.valueOf( iName );
if ( !IntegrationRegistry.INSTANCE.isEnabled( type ) )
{
log( "Removing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is disabled." );
this.log( "Removing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is disabled." );
i.remove();
return true;
}
else
log( "Allowing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is enabled." );
this.log( "Allowing Method " + mn.name + " from " + classNode.name + " because " + iName + " integration is enabled." );
}
else
throw new RuntimeException( "Unable to handle Method annotation on " + classNode.name );
@@ -203,12 +203,12 @@ public class ASMIntegration implements IClassTransformer
{
if ( !IntegrationRegistry.INSTANCE.isEnabled( type ) )
{
log( "Removing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is disabled." );
this.log( "Removing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is disabled." );
classNode.interfaces.remove( iFace.replace( '.', '/' ) );
return true;
}
else
log( "Allowing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is enabled." );
this.log( "Allowing Interface " + iFace + " from " + classNode.name + " because " + iName + " integration is enabled." );
}
else
throw new RuntimeException( "Unable to handle Method annotation on " + classNode.name );
@@ -56,16 +56,16 @@ public class ASMTweaker implements IClassTransformer
final Multimap<String, publicLine> privateToPublicMethods = HashMultimap.create();
public ASMTweaker() {
privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "func_146977_a", "(Lnet/minecraft/inventory/Slot;)V" ) );
privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "a", "(Lzk;)V" ) );
this.privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "func_146977_a", "(Lnet/minecraft/inventory/Slot;)V" ) );
this.privateToPublicMethods.put( "net.minecraft.client.gui.inventory.GuiContainer", new publicLine( "a", "(Lzk;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "writeToNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145841_b", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "b", "(Ldh;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "writeToNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145841_b", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "b", "(Ldh;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "readFromNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145839_a", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "a", "(Ldh;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "readFromNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "func_145839_a", "(Lnet/minecraft/nbt/NBTTagCompound;)V" ) );
this.privateToPublicMethods.put( "appeng.tile.AEBaseTile", new publicLine( "a", "(Ldh;)V" ) );
}
@Override
@@ -76,15 +76,15 @@ public class ASMTweaker implements IClassTransformer
try
{
if ( transformedName != null && privateToPublicMethods.containsKey( transformedName ) )
if ( transformedName != null && this.privateToPublicMethods.containsKey( transformedName ) )
{
ClassNode classNode = new ClassNode();
ClassReader classReader = new ClassReader( basicClass );
classReader.accept( classNode, 0 );
for (publicLine Set : privateToPublicMethods.get( transformedName ))
for (publicLine Set : this.privateToPublicMethods.get( transformedName ))
{
makePublic( classNode, Set );
this.makePublic( classNode, Set );
}
// CALL VIRTUAL!
@@ -99,7 +99,7 @@ public class ASMTweaker implements IClassTransformer
newNode.instructions.add( new VarInsnNode( Opcodes.ALOAD, 1 ) );
newNode.instructions.add( new MethodInsnNode( Opcodes.INVOKESPECIAL, classNode.name, mn.name, mn.desc, false ) );
newNode.instructions.add( new InsnNode( Opcodes.RETURN ) );
log( newNode.name + newNode.desc + " - New Method" );
this.log( newNode.name + newNode.desc + " - New Method" );
classNode.methods.add( newNode );
break;
}
@@ -118,7 +118,7 @@ public class ASMTweaker implements IClassTransformer
MethodInsnNode n = (MethodInsnNode) in;
if ( n.name.equals( "func_146977_a" ) || (n.name.equals( "a" ) && n.desc.equals( "(Lzk;)V" )) )
{
log( n.name + n.desc + " - Invoke Virtual" );
this.log( n.name + n.desc + " - Invoke Virtual" );
mn.instructions.insertBefore( n, new MethodInsnNode( Opcodes.INVOKEVIRTUAL, n.owner, n.name, n.desc, false ) );
mn.instructions.remove( in );
break;
@@ -153,7 +153,7 @@ public class ASMTweaker implements IClassTransformer
if ( mn.name.equals( set.name ) && mn.desc.equals( set.desc ) )
{
mn.access = (mn.access & (~(Opcodes.ACC_FINAL | Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED))) | Opcodes.ACC_PUBLIC;
log( mn.name + mn.desc + " - Transformed" );
this.log( mn.name + mn.desc + " - Transformed" );
}
}
}