Port to 1.11

This commit is contained in:
yueh
2016-12-08 12:42:00 +01:00
parent 589730bfad
commit ed9e6dd21c
262 changed files with 4027 additions and 3954 deletions
+13 -13
View File
@@ -251,14 +251,14 @@ public abstract class AEBaseGui extends GuiContainer
{
if( fs.isEnabled() )
{
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
18 );
}
else
{
GlStateManager.color( 1.0F, 1.0F, 1.0F, 0.4F );
GlStateManager.enableBlend();
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
18 );
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
}
@@ -297,7 +297,7 @@ public abstract class AEBaseGui extends GuiContainer
protected void mouseClickMove( final int x, final int y, final int c, final long d )
{
final Slot slot = this.getSlot( x, y );
final ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
final ItemStack itemstack = this.mc.player.inventory.getItemStack();
if( this.getScrollBar() != null )
{
@@ -326,7 +326,7 @@ public abstract class AEBaseGui extends GuiContainer
@Override
protected void handleMouseClick( final Slot slot, final int slotIdx, final int mouseButton, final ClickType clickType )
{
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
final EntityPlayer player = Minecraft.getMinecraft().player;
if( slot instanceof SlotFake )
{
@@ -521,7 +521,7 @@ public abstract class AEBaseGui extends GuiContainer
for( final Slot inventorySlot : slots )
{
if( inventorySlot != null && inventorySlot.canTakeStack(
this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot(
this.mc.player ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot(
inventorySlot, this.dbl_whichItem, true ) )
{
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
@@ -540,7 +540,7 @@ public abstract class AEBaseGui extends GuiContainer
{
final Slot theSlot = this.getSlotUnderMouse();
if( this.mc.thePlayer.inventory.getItemStack() == null && theSlot != null )
if( this.mc.player.inventory.getItemStack() == null && theSlot != null )
{
for( int j = 0; j < 9; ++j )
{
@@ -594,7 +594,7 @@ public abstract class AEBaseGui extends GuiContainer
for( final Slot slot : slots )
{
// isPointInRegion
if( this.isPointInRegion( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
if( this.isPointInRegion( slot.xPos, slot.yPos, 16, 16, mouseX, mouseY ) )
{
return slot;
}
@@ -704,7 +704,7 @@ public abstract class AEBaseGui extends GuiContainer
if( !this.isPowered() )
{
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66111111 );
drawRect( s.xPos, s.yPos, 16 + s.xPos, 16 + s.yPos, 0x66111111 );
}
this.zLevel = 0.0F;
@@ -713,7 +713,7 @@ public abstract class AEBaseGui extends GuiContainer
// Annoying but easier than trying to splice into render item
super.drawSlot( new Size1Slot( s ) );
stackSizeRenderer.renderStackSize( fontRendererObj, ( (SlotME) s ).getAEStack(), s.getStack(), s.xDisplayPosition, s.yDisplayPosition );
stackSizeRenderer.renderStackSize( fontRendererObj, ( (SlotME) s ).getAEStack(), s.getStack(), s.xPos, s.yPos );
}
catch( final Exception err )
@@ -745,8 +745,8 @@ public abstract class AEBaseGui extends GuiContainer
GlStateManager.enableTexture2D();
GlStateManager.blendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
final float par1 = aes.xDisplayPosition;
final float par2 = aes.yDisplayPosition;
final float par1 = aes.xPos;
final float par2 = aes.yPos;
final float par3 = uv_x * 16;
final float par4 = uv_y * 16;
@@ -786,7 +786,7 @@ public abstract class AEBaseGui extends GuiContainer
{
try
{
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.theWorld );
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.world );
}
catch( final Exception err )
{
@@ -802,7 +802,7 @@ public abstract class AEBaseGui extends GuiContainer
this.itemRender.zLevel = 100.0F;
GlStateManager.disableLighting();
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66ff6666 );
drawRect( s.xPos, s.yPos, 16 + s.xPos, 16 + s.yPos, 0x66ff6666 );
GlStateManager.enableLighting();
this.zLevel = 0.0F;
@@ -82,10 +82,10 @@ public abstract class AEBaseMEGui extends AEBaseGui
currentToolTip.add( TextFormatting.GRAY + format );
}
}
else if( stack.stackSize > BigNumber || ( stack.stackSize > 1 && stack.isItemDamaged() ) )
else if( stack.getCount() > BigNumber || ( stack.getCount() > 1 && stack.isItemDamaged() ) )
{
final String local = ButtonToolTips.ItemsStored.getLocal();
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize );
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.getCount() );
final String format = String.format( local, formattedAmount );
currentToolTip.add( TextFormatting.GRAY + format );
@@ -119,7 +119,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
if( myStack != null )
{
@SuppressWarnings( "unchecked" )
final List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
final List<String> currentToolTip = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
{
@@ -134,10 +134,10 @@ public abstract class AEBaseMEGui extends AEBaseGui
this.drawTooltip( x, y, currentToolTip );
return;
}
else if( stack.stackSize > BigNumber )
else if( stack.getCount() > BigNumber )
{
List<String> var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
List<String> var4 = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.getCount() ) );
this.drawTooltip( x, y, var4 );
return;
}
@@ -24,7 +24,7 @@ class Size1Slot extends Slot
public Size1Slot( Slot delegate )
{
super( delegate.inventory, delegate.getSlotIndex(), delegate.xDisplayPosition, delegate.yDisplayPosition );
super( delegate.inventory, delegate.getSlotIndex(), delegate.xPos, delegate.yPos );
this.delegate = delegate;
}
@@ -36,7 +36,7 @@ class Size1Slot extends Slot
if( orgStack != null )
{
ItemStack modifiedStack = orgStack.copy();
modifiedStack.stackSize = 1;
modifiedStack.setCount( 1 );
return modifiedStack;
}
@@ -232,7 +232,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
final String which = Integer.toString( x );
if( invData.hasKey( which ) )
{
current.getInventory().setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
current.getInventory().setInventorySlotContents( x, new ItemStack( invData.getCompoundTag( which ) ) );
}
}
}
@@ -344,7 +344,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
for( int i = 0; i < outTag.tagCount(); i++ )
{
final ItemStack parsedItemStack = ItemStack.loadItemStackFromNBT( outTag.getCompoundTagAt( i ) );
final ItemStack parsedItemStack = new ItemStack( outTag.getCompoundTagAt( i ) );
if( parsedItemStack != null )
{
final String displayName = Platform.getItemDisplayName( AEApi.instance().storage().createItemStack( parsedItemStack ) ).toLowerCase();
@@ -323,7 +323,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
if( s instanceof AppEngSlot )
{
if( ( (Slot) s ).xDisplayPosition < 197 )
if( ( (Slot) s ).xPos < 197 )
{
this.repositionSlot( (AppEngSlot) s );
}
@@ -332,10 +332,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
{
final Slot g = (Slot) s;
if( g.xDisplayPosition > 0 && g.yDisplayPosition > 0 )
if( g.xPos > 0 && g.yPos > 0 )
{
craftingGridOffsetX = Math.min( craftingGridOffsetX, g.xDisplayPosition );
craftingGridOffsetY = Math.min( craftingGridOffsetY, g.yDisplayPosition );
craftingGridOffsetX = Math.min( craftingGridOffsetX, g.xPos );
craftingGridOffsetY = Math.min( craftingGridOffsetY, g.yPos );
}
}
}
@@ -443,7 +443,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
protected void repositionSlot( final AppEngSlot s )
{
s.yDisplayPosition = s.getY() + this.ySize - 78 - 5;
s.yPos = s.getY() + this.ySize - 78 - 5;
}
@Override
@@ -253,7 +253,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
if( myStack != null )
{
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
List<String> currentToolTip = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
while( currentToolTip.size() > 1 )
{
@@ -176,6 +176,6 @@ public class GuiPatternTerm extends GuiMEMonitorable
{
final int offsetPlayerSide = s.isPlayerSide() ? 5 : 3;
s.yDisplayPosition = s.getY() + this.ySize - 78 - offsetPlayerSide;
s.yPos = s.getY() + this.ySize - 78 - offsetPlayerSide;
}
}