First update pass (1/3) - ~1400 -> 82 errors

This is first update pass, which is mainly import reorganization, name
fixes, etc... Although some parts of second were done where changes
aren't important.
Errors: ~1400 -> 82.
This commit is contained in:
elix-x
2016-06-19 14:43:27 +02:00
parent d9725a7d9b
commit 5498eb6d7c
288 changed files with 1637 additions and 1420 deletions
+20 -18
View File
@@ -42,11 +42,12 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.RenderItem;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@@ -380,14 +381,15 @@ public abstract class AEBaseGui extends GuiContainer
}
}
//TODO 1.9.4 - Whole ClickType thing and 1.8.9 conversion, to be checked
@Override
protected void handleMouseClick( final Slot slot, final int slotIdx, final int ctrlDown, final int key )
protected void handleMouseClick( final Slot slot, final int slotIdx, final int key, final ClickType clickType )
{
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if( slot instanceof SlotFake )
{
final InventoryAction action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
final InventoryAction action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
if( this.drag_click.size() > 1 )
{
@@ -430,7 +432,7 @@ public abstract class AEBaseGui extends GuiContainer
}
else
{
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
action = isCtrlKeyDown() ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
}
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
@@ -470,10 +472,10 @@ public abstract class AEBaseGui extends GuiContainer
switch( key )
{
case 0: // pickup / set-down.
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
break;
case 1:
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
break;
case 3: // creative dupe:
@@ -507,7 +509,7 @@ public abstract class AEBaseGui extends GuiContainer
switch( key )
{
case 0: // pickup / set-down.
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
stack = ( (SlotME) slot ).getAEStack();
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
@@ -517,7 +519,7 @@ public abstract class AEBaseGui extends GuiContainer
break;
case 1:
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
stack = ( (SlotME) slot ).getAEStack();
break;
@@ -580,7 +582,7 @@ public abstract class AEBaseGui extends GuiContainer
{
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot( inventorySlot, this.dbl_whichItem, true ) )
{
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, ctrlDown, 1 );
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
}
}
}
@@ -588,7 +590,7 @@ public abstract class AEBaseGui extends GuiContainer
this.disableShiftClick = false;
}
super.handleMouseClick( slot, slotIdx, ctrlDown, key );
super.handleMouseClick( slot, slotIdx, key, clickType );
}
@Override
@@ -625,7 +627,7 @@ public abstract class AEBaseGui extends GuiContainer
if( theSlot.getSlotStackLimit() == 64 )
{
this.handleMouseClick( theSlot, theSlot.slotNumber, j, 2 );
this.handleMouseClick( theSlot, theSlot.slotNumber, j, ClickType.SWAP );
return true;
}
else
@@ -816,18 +818,18 @@ public abstract class AEBaseGui extends GuiContainer
final float par4 = uv_y * 16;
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
final VertexBuffer VertexBuffer = tessellator.getBuffer();
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
;
final float f1 = 0.00390625F;
final float f = 0.00390625F;
final float par6 = 16;
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).endVertex();
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).endVertex();
final float par5 = 16;
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).endVertex();
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).endVertex();
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).endVertex();
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).endVertex();
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).endVertex();
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).endVertex();
tessellator.draw();
}
catch( final Exception err )
@@ -55,7 +55,7 @@ import appeng.util.Platform;
import appeng.util.ReadableNumberConverter;
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
public class GuICraftingCPU extends AEBaseGui implements ISortSource
{
private static final int GUI_HEIGHT = 184;
private static final int GUI_WIDTH = 238;
@@ -92,12 +92,12 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
private GuiButton cancel;
private int tooltip = -1;
public GuiCraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
public GuICraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
{
this( new ContainerCraftingCPU( inventoryPlayer, te ) );
}
protected GuiCraftingCPU( final ContainerCraftingCPU container )
protected GuICraftingCPU( final ContainerCraftingCPU container )
{
super( container );
this.craftingCpu = container;
@@ -49,7 +49,7 @@ import appeng.parts.reporting.PartPatternTerminal;
import appeng.parts.reporting.PartTerminal;
public class GuiCraftingStatus extends GuiCraftingCPU
public class GuIContainerListenerStatus extends GuICraftingCPU
{
private final ContainerCraftingStatus status;
@@ -59,7 +59,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
private GuiBridge originalGui;
private ItemStack myIcon = null;
public GuiCraftingStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
public GuIContainerListenerStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{
super( new ContainerCraftingStatus( inventoryPlayer, te ) );
@@ -36,12 +36,12 @@ import appeng.core.sync.packets.PacketInventoryAction;
import appeng.helpers.InventoryAction;
public class GuiCraftingTerm extends GuiMEMonitorable
public class GuIContainerListenerTerm extends GuiMEMonitorable
{
private GuiImgButton clearBtn;
public GuiCraftingTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
public GuIContainerListenerTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
this.setReservedSpace( 73 );
@@ -104,10 +104,10 @@ public class GuiPatternTerm extends GuiMEMonitorable
{
super.initGui();
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.crafting_table ), GuiText.CraftingPattern.getLocal(), this.itemRender );
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.CRAFTING_TABLE ), GuiText.CraftingPattern.getLocal(), this.itemRender );
this.buttonList.add( this.tabCraftButton );
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.furnace ), GuiText.ProcessingPattern.getLocal(), this.itemRender );
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.FURNACE ), GuiText.ProcessingPattern.getLocal(), this.itemRender );
this.buttonList.add( this.tabProcessButton );
this.substitutionsEnabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.ENABLED );
@@ -27,7 +27,7 @@ import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.util.StatCollector;
import net.minecraft.util.text.translation.I18n;
import appeng.api.config.AccessRestriction;
import appeng.api.config.ActionItems;
@@ -289,8 +289,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
if( displayName != null )
{
String name = StatCollector.translateToLocal( displayName );
String value = StatCollector.translateToLocal( displayValue );
String name = I18n.translateToLocal( displayName );
String value = I18n.translateToLocal( displayValue );
if( name == null || name.isEmpty() )
{
@@ -25,7 +25,7 @@ import org.lwjgl.opengl.GL12;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.RenderItem;
import net.minecraft.item.ItemStack;
import appeng.client.texture.ExtraBlockTextures;
@@ -25,7 +25,7 @@ import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.util.StatCollector;
import net.minecraft.util.text.translation.I18n;
import appeng.client.texture.ExtraBlockTextures;
@@ -89,8 +89,8 @@ public class GuiToggleButton extends GuiButton implements ITooltip
{
if( this.displayName != null )
{
String name = StatCollector.translateToLocal( this.displayName );
String value = StatCollector.translateToLocal( this.displayHint );
String name = I18n.translateToLocal( this.displayName );
String value = I18n.translateToLocal( this.displayHint );
if( name == null || name.isEmpty() )
{