Removed ASMTweaker and replaced it with AT. (#2636)

Added appeng_at.cfg and updated build.gradle to correctly include the AT when building.
Deleted the now useless ASMTweaker.
Moved the coremod from package transformer to coremod as a better matching name.
Updated the old 1.7.10 code using reflection to drop it where forge or vanilla now exposes that functionality directly.
This commit is contained in:
yueh
2016-11-26 14:08:10 +01:00
committed by GitHub
parent a665200c31
commit 887339f7b8
17 changed files with 49 additions and 236 deletions
+7 -26
View File
@@ -539,16 +539,7 @@ public abstract class AEBaseGui extends GuiContainer
@Override
protected boolean checkHotbarKeys( final int keyCode )
{
final Slot theSlot;
try
{
theSlot = ObfuscationReflectionHelper.getPrivateValue( GuiContainer.class, this, "theSlot", "field_147006_u", "f" );
}
catch( final Throwable t )
{
return false;
}
final Slot theSlot = this.getSlotUnderMouse();
if( this.mc.thePlayer.inventory.getItemStack() == null && theSlot != null )
{
@@ -701,7 +692,8 @@ public abstract class AEBaseGui extends GuiContainer
/**
* This overrides the base-class method through some access transformer hackery...
*/
public void drawSlot( final Slot s )
@Override
public void drawSlot( Slot s )
{
if( s instanceof SlotME )
{
@@ -720,7 +712,7 @@ public abstract class AEBaseGui extends GuiContainer
this.itemRender.zLevel = 0.0F;
// Annoying but easier than trying to splice into render item
this.safeDrawSlot( new Size1Slot( s ) );
super.drawSlot( new Size1Slot( s ) );
stackSizeRenderer.renderStackSize( fontRendererObj, ( (SlotME) s ).getAEStack(), s.getStack(), s.xDisplayPosition, s.yDisplayPosition );
@@ -822,11 +814,11 @@ public abstract class AEBaseGui extends GuiContainer
if( s instanceof AppEngSlot )
{
( (AppEngSlot) s ).setDisplay( true );
this.safeDrawSlot( s );
super.drawSlot( s );
}
else
{
this.safeDrawSlot( s );
super.drawSlot( s );
}
return;
@@ -837,7 +829,7 @@ public abstract class AEBaseGui extends GuiContainer
}
}
// do the usual for non-ME Slots.
this.safeDrawSlot( s );
super.drawSlot( s );
}
protected boolean isPowered()
@@ -845,17 +837,6 @@ public abstract class AEBaseGui extends GuiContainer
return true;
}
private void safeDrawSlot( final Slot s )
{
try
{
GuiContainer.class.getDeclaredMethod( "func_146977_a_original", Slot.class ).invoke( this, s );
}
catch( final Exception err )
{
}
}
public void bindTexture( final String file )
{
final ResourceLocation loc = new ResourceLocation( AppEng.MOD_ID, "textures/" + file );