diff --git a/src/main/java/appeng/block/AEBaseBlock.java b/src/main/java/appeng/block/AEBaseBlock.java index 0b4360cc..8e319ea2 100644 --- a/src/main/java/appeng/block/AEBaseBlock.java +++ b/src/main/java/appeng/block/AEBaseBlock.java @@ -58,8 +58,8 @@ import cpw.mods.fml.relauncher.SideOnly; public class AEBaseBlock extends BlockContainer implements IAEFeature { - private String FeatureFullname; - private String FeatureSubname; + private String featureFullName; + private String featureSubName; private AEFeatureHandler feature; private Class tileEntityType = null; @@ -77,7 +77,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature @Override public String toString() { - return FeatureFullname; + return featureFullName; } @SideOnly(Side.CLIENT) @@ -176,14 +176,14 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature protected void setTileEntity(Class c) { AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) ); - GameRegistry.registerTileEntity( tileEntityType = c, FeatureFullname ); + GameRegistry.registerTileEntity( tileEntityType = c, featureFullName ); isInventory = IInventory.class.isAssignableFrom( c ); setTileProvider( hasBlockTileEntity() ); } protected void setFeature(EnumSet f) { - feature = new AEFeatureHandler( f, this, FeatureSubname ); + feature = new AEFeatureHandler( f, this, featureSubName ); } protected AEBaseBlock(Class c, Material mat) { @@ -201,7 +201,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" ); } - protected AEBaseBlock(Class c, Material mat, String subname) { + protected AEBaseBlock(Class c, Material mat, String subName) { super( mat ); if ( mat == AEGlassMaterial.instance ) @@ -213,8 +213,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature else setStepSound( Block.soundTypeMetal ); - FeatureFullname = AEFeatureHandler.getName( c, subname ); - FeatureSubname = subname; + featureFullName = AEFeatureHandler.getName( c, subName ); + featureSubName = subName; } @Override @@ -689,7 +689,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature if ( is.getItem() instanceof IMemoryCard && !(this instanceof BlockCableBus) ) { - IMemoryCard memc = (IMemoryCard) is.getItem(); + IMemoryCard memoryCard = (IMemoryCard) is.getItem(); if ( player.isSneaking() ) { AEBaseTile t = getTileEntity( w, x, y, z ); @@ -699,24 +699,24 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD ); if ( data != null ) { - memc.setMemoryCardContents( is, name, data ); - memc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED ); + memoryCard.setMemoryCardContents( is, name, data ); + memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED ); return true; } } } else { - String name = memc.getSettingsName( is ); - NBTTagCompound data = memc.getData( is ); + String name = memoryCard.getSettingsName( is ); + NBTTagCompound data = memoryCard.getData( is ); if ( getUnlocalizedName().equals( name ) ) { AEBaseTile t = getTileEntity( w, x, y, z ); t.uploadSettings( SettingsFrom.MEMORY_CARD, data ); - memc.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED ); + memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED ); } else - memc.notifyUser( player, MemoryCardMessages.INVALID_MACHINE ); + memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE ); return false; } } diff --git a/src/main/java/appeng/block/misc/BlockCellWorkbench.java b/src/main/java/appeng/block/misc/BlockCellWorkbench.java index 468eb690..fab1c2bc 100644 --- a/src/main/java/appeng/block/misc/BlockCellWorkbench.java +++ b/src/main/java/appeng/block/misc/BlockCellWorkbench.java @@ -31,7 +31,7 @@ public class BlockCellWorkbench extends AEBaseBlock if ( tg != null ) { if ( Platform.isServer() ) - Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELLWORKBENCH ); + Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELL_WORKBENCH ); return true; } return false; diff --git a/src/main/java/appeng/block/misc/BlockQuartzGrowthAccelerator.java b/src/main/java/appeng/block/misc/BlockQuartzGrowthAccelerator.java index 1e9931a6..ba7547ee 100644 --- a/src/main/java/appeng/block/misc/BlockQuartzGrowthAccelerator.java +++ b/src/main/java/appeng/block/misc/BlockQuartzGrowthAccelerator.java @@ -52,15 +52,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient if ( !AEConfig.instance.enableEffects ) return; - TileQuartzGrowthAccelerator tqga = getTileEntity( w, x, y, z ); + TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = getTileEntity( w, x, y, z ); - if ( tqga != null && tqga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) ) + if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) ) { double d0 = (double) (r.nextFloat() - 0.5F); double d1 = (double) (r.nextFloat() - 0.5F); - ForgeDirection up = tqga.getUp(); - ForgeDirection forward = tqga.getForward(); + ForgeDirection up = tileQuartzGrowthAccelerator.getUp(); + ForgeDirection forward = tileQuartzGrowthAccelerator.getForward(); ForgeDirection west = Platform.crossProduct( forward, up ); double rx = 0.5 + x; diff --git a/src/main/java/appeng/block/misc/BlockTinyTNT.java b/src/main/java/appeng/block/misc/BlockTinyTNT.java index ab912126..4377417e 100644 --- a/src/main/java/appeng/block/misc/BlockTinyTNT.java +++ b/src/main/java/appeng/block/misc/BlockTinyTNT.java @@ -127,19 +127,19 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision { if ( !w.isRemote ) { - EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() ); - entitytntprimed.fuse = w.rand.nextInt( entitytntprimed.fuse / 4 ) + entitytntprimed.fuse / 8; - w.spawnEntityInWorld( entitytntprimed ); + EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() ); + primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8; + w.spawnEntityInWorld( primedTinyTNTEntity ); } } - public void startFuse(World w, int x, int y, int z, EntityLivingBase ignitor) + public void startFuse(World w, int x, int y, int z, EntityLivingBase igniter) { if ( !w.isRemote ) { - EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, ignitor ); - w.spawnEntityInWorld( entitytntprimed ); - w.playSoundAtEntity( entitytntprimed, "game.tnt.primed", 1.0F, 1.0F ); + EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, igniter ); + w.spawnEntityInWorld( primedTinyTNTEntity ); + w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F ); } } diff --git a/src/main/java/appeng/block/misc/BlockVibrationChamber.java b/src/main/java/appeng/block/misc/BlockVibrationChamber.java index 607ef030..e8584b96 100644 --- a/src/main/java/appeng/block/misc/BlockVibrationChamber.java +++ b/src/main/java/appeng/block/misc/BlockVibrationChamber.java @@ -39,7 +39,7 @@ public class BlockVibrationChamber extends AEBaseBlock TileVibrationChamber tc = getTileEntity( w, x, y, z ); if ( tc != null && !player.isSneaking() ) { - Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATIONCHAMBER ); + Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATION_CHAMBER ); return true; } } diff --git a/src/main/java/appeng/block/networking/BlockCableBus.java b/src/main/java/appeng/block/networking/BlockCableBus.java index 2b0084d4..b37b4103 100644 --- a/src/main/java/appeng/block/networking/BlockCableBus.java +++ b/src/main/java/appeng/block/networking/BlockCableBus.java @@ -92,10 +92,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection @SideOnly(Side.CLIENT) public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) { - Object pobj = cb( world, target.blockX, target.blockY, target.blockZ ); - if ( pobj instanceof IPartHost ) + Object object = cb( world, target.blockX, target.blockY, target.blockZ ); + if ( object instanceof IPartHost ) { - IPartHost host = (IPartHost) pobj; + IPartHost host = (IPartHost) object; for (ForgeDirection side : ForgeDirection.values()) { @@ -138,10 +138,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection @SideOnly(Side.CLIENT) public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) { - Object pobj = cb( world, x, y, z ); - if ( pobj instanceof IPartHost ) + Object object = cb( world, x, y, z ); + if ( object instanceof IPartHost ) { - IPartHost host = (IPartHost) pobj; + IPartHost host = (IPartHost) object; for (ForgeDirection side : ForgeDirection.values()) { diff --git a/src/main/java/appeng/block/qnb/BlockQuantumLinkChamber.java b/src/main/java/appeng/block/qnb/BlockQuantumLinkChamber.java index bb179ef5..8cf8347e 100644 --- a/src/main/java/appeng/block/qnb/BlockQuantumLinkChamber.java +++ b/src/main/java/appeng/block/qnb/BlockQuantumLinkChamber.java @@ -54,7 +54,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli } @Override - public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber) + public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber) { TileQuantumBridge bridge = getTileEntity( w, x, y, z ); if ( bridge != null ) diff --git a/src/main/java/appeng/block/qnb/BlockQuantumRing.java b/src/main/java/appeng/block/qnb/BlockQuantumRing.java index eac97887..a6c60316 100644 --- a/src/main/java/appeng/block/qnb/BlockQuantumRing.java +++ b/src/main/java/appeng/block/qnb/BlockQuantumRing.java @@ -30,7 +30,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision } @Override - public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber) + public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber) { TileQuantumBridge bridge = getTileEntity( w, x, y, z ); if ( bridge != null ) diff --git a/src/main/java/appeng/block/solids/OreQuartz.java b/src/main/java/appeng/block/solids/OreQuartz.java index 85f2c3d7..7955267f 100644 --- a/src/main/java/appeng/block/solids/OreQuartz.java +++ b/src/main/java/appeng/block/solids/OreQuartz.java @@ -113,11 +113,11 @@ public class OreQuartz extends AEBaseBlock } @Override - public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockid, float something, int meta) + public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockID, float something, int meta) { - super.dropBlockAsItemWithChance( w, x, y, z, blockid, something, meta ); + super.dropBlockAsItemWithChance( w, x, y, z, blockID, something, meta ); - if ( getItemDropped( blockid, w.rand, meta ) != Item.getItemFromBlock( this ) ) + if ( getItemDropped( blockID, w.rand, meta ) != Item.getItemFromBlock( this ) ) { int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 ); diff --git a/src/main/java/appeng/block/spatial/BlockSpatialIOPort.java b/src/main/java/appeng/block/spatial/BlockSpatialIOPort.java index a47f6321..4d042fb8 100644 --- a/src/main/java/appeng/block/spatial/BlockSpatialIOPort.java +++ b/src/main/java/appeng/block/spatial/BlockSpatialIOPort.java @@ -40,7 +40,7 @@ public class BlockSpatialIOPort extends AEBaseBlock if ( tg != null ) { if ( Platform.isServer() ) - Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIALIOPORT ); + Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT ); return true; } return false; diff --git a/src/main/java/appeng/client/ClientHelper.java b/src/main/java/appeng/client/ClientHelper.java index 90e5c36e..23dc435b 100644 --- a/src/main/java/appeng/client/ClientHelper.java +++ b/src/main/java/appeng/client/ClientHelper.java @@ -209,7 +209,7 @@ public class ClientHelper extends ServerHelper } @Override - public void postinit() + public void postInit() { RenderingRegistry.registerBlockHandler( WorldRender.instance ); RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() ); diff --git a/src/main/java/appeng/client/gui/AEBaseGui.java b/src/main/java/appeng/client/gui/AEBaseGui.java index 72196034..712c5a5b 100644 --- a/src/main/java/appeng/client/gui/AEBaseGui.java +++ b/src/main/java/appeng/client/gui/AEBaseGui.java @@ -127,7 +127,7 @@ public abstract class AEBaseGui extends GuiContainer try { ((AEBaseContainer) inventorySlots).setTargetStack( item ); - InventoryAction direction = wheel > 0 ? InventoryAction.ROLLDOWN : InventoryAction.ROLLUP; + InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP; int times = Math.abs( wheel ); for (int h = 0; h < times; h++) { @@ -176,7 +176,7 @@ public abstract class AEBaseGui extends GuiContainer ItemStack dbl_whichItem; Slot bl_clicked; - // dragy + // drag y Set drag_click = new HashSet(); @Override @@ -187,7 +187,7 @@ public abstract class AEBaseGui extends GuiContainer if ( slot instanceof SlotFake ) { InventoryAction action = null; - action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN; + action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN; if ( drag_click.size() > 1 ) return; @@ -283,7 +283,7 @@ public abstract class AEBaseGui extends GuiContainer switch (key) { case 0: // pickup / set-down. - action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN; + action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN; break; case 1: action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK; @@ -327,11 +327,11 @@ public abstract class AEBaseGui extends GuiContainer switch (key) { case 0: // pickup / set-down. - action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN; + action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN; stack = ((SlotME) slot).getAEStack(); - if ( stack != null && action == InventoryAction.PICKUP_OR_SETDOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null ) - action = InventoryAction.AUTOCRAFT; + if ( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null ) + action = InventoryAction.AUTO_CRAFT; break; case 1: @@ -343,7 +343,7 @@ public abstract class AEBaseGui extends GuiContainer stack = ((SlotME) slot).getAEStack(); if ( stack != null && stack.isCraftable() ) - action = InventoryAction.AUTOCRAFT; + action = InventoryAction.AUTO_CRAFT; else if ( player.capabilities.isCreativeMode ) { @@ -428,7 +428,7 @@ public abstract class AEBaseGui extends GuiContainer { for (Slot dr : drag_click) { - PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SETDOWN : InventoryAction.PLACE_SINGLE, + PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE, dr.slotNumber, 0 ); NetworkHandler.instance.sendToServer( p ); } @@ -724,14 +724,14 @@ public abstract class AEBaseGui extends GuiContainer return false; } - protected Slot getSlot(int mousex, int mousey) + protected Slot getSlot(int mouseX, int mouseY) { for (int j1 = 0; j1 < this.inventorySlots.inventorySlots.size(); ++j1) { Slot slot = (Slot) this.inventorySlots.inventorySlots.get( j1 ); // isPointInRegion - if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mousex, mousey ) ) + if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) ) { return slot; } @@ -743,11 +743,11 @@ public abstract class AEBaseGui extends GuiContainer protected static String join(Collection s, String delimiter) { StringBuilder builder = new StringBuilder(); - Iterator iter = s.iterator(); - while (iter.hasNext()) + Iterator iterator = s.iterator(); + while (iterator.hasNext()) { - builder.append( iter.next() ); - if ( !iter.hasNext() ) + builder.append( iterator.next() ); + if ( !iterator.hasNext() ) { break; } @@ -758,16 +758,16 @@ public abstract class AEBaseGui extends GuiContainer boolean useNEI = false; - private RenderItem setItemRender(RenderItem aeri2) + private RenderItem setItemRender(RenderItem item) { if ( AppEng.instance.isIntegrationEnabled( IntegrationType.NEI ) ) { - return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( aeri2 ); + return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( item ); } else { RenderItem ri = itemRender; - itemRender = aeri2; + itemRender = item; return ri; } } @@ -788,7 +788,7 @@ public abstract class AEBaseGui extends GuiContainer } } - AppEngRenderItem aeri = new AppEngRenderItem(); + AppEngRenderItem aeRenderItem = new AppEngRenderItem(); protected boolean isPowered() { @@ -809,7 +809,7 @@ public abstract class AEBaseGui extends GuiContainer { if ( s instanceof SlotME ) { - RenderItem pIR = setItemRender( aeri ); + RenderItem pIR = setItemRender( aeRenderItem ); try { this.zLevel = 100.0F; @@ -826,9 +826,9 @@ public abstract class AEBaseGui extends GuiContainer itemRender.zLevel = 0.0F; if ( s instanceof SlotME ) - aeri.aestack = ((SlotME) s).getAEStack(); + aeRenderItem.aeStack = ((SlotME) s).getAEStack(); else - aeri.aestack = null; + aeRenderItem.aeStack = null; safeDrawSlot( s ); } diff --git a/src/main/java/appeng/client/gui/AEBaseMEGui.java b/src/main/java/appeng/client/gui/AEBaseMEGui.java index 9c1a7027..4dadf8ef 100644 --- a/src/main/java/appeng/client/gui/AEBaseMEGui.java +++ b/src/main/java/appeng/client/gui/AEBaseMEGui.java @@ -18,11 +18,11 @@ public abstract class AEBaseMEGui extends AEBaseGui super( container ); } - public List handleItemTooltip(ItemStack stack, int mousex, int mousey, List currenttip) + public List handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List currentToolTip) { if ( stack != null ) { - Slot s = getSlot( mousex, mousey ); + Slot s = getSlot( mouseX, mouseY ); if ( s instanceof SlotME ) { int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999; @@ -41,18 +41,18 @@ public abstract class AEBaseMEGui extends AEBaseGui if ( myStack != null ) { if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) ) - currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) ); + currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) ); if ( myStack.getCountRequestable() > 0 ) - currenttip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) ); + currentToolTip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) ); } else if ( stack.stackSize > BigNumber || (stack.stackSize > 1 && stack.isItemDamaged()) ) { - currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) ); + currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) ); } } } - return currenttip; + return currentToolTip; } // Vanilla version... @@ -78,15 +78,15 @@ public abstract class AEBaseMEGui extends AEBaseGui if ( myStack != null ) { - List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips ); + List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips ); if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) ) - currenttip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) ); + currentToolTip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) ); if ( myStack.getCountRequestable() > 0 ) - currenttip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) ); + currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) ); - drawTooltip( x, y, 0, join( currenttip, "\n" ) ); + drawTooltip( x, y, 0, join( currentToolTip, "\n" ) ); } else if ( stack != null && stack.stackSize > BigNumber ) { diff --git a/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java b/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java index 225984db..a7cf42e6 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCellWorkbench.java @@ -27,7 +27,7 @@ import appeng.util.Platform; public class GuiCellWorkbench extends GuiUpgradeable { - ContainerCellWorkbench ccwb; + ContainerCellWorkbench workbench; TileCellWorkbench tcw; GuiImgButton clear; @@ -36,7 +36,7 @@ public class GuiCellWorkbench extends GuiUpgradeable public GuiCellWorkbench(InventoryPlayer inventoryPlayer, TileCellWorkbench te) { super( new ContainerCellWorkbench( inventoryPlayer, te ) ); - ccwb = (ContainerCellWorkbench) inventorySlots; + workbench = (ContainerCellWorkbench) inventorySlots; ySize = 251; tcw = te; } @@ -44,7 +44,7 @@ public class GuiCellWorkbench extends GuiUpgradeable @Override protected boolean drawUpgrades() { - return ccwb.availableUpgrades() > 0; + return workbench.availableUpgrades() > 0; } @Override @@ -62,17 +62,17 @@ public class GuiCellWorkbench extends GuiUpgradeable this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize ); if ( drawUpgrades() ) { - if ( ccwb.availableUpgrades() <= 8 ) + if ( workbench.availableUpgrades() <= 8 ) { - this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + ccwb.availableUpgrades() * 18 ); - this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (ccwb.availableUpgrades()) * 18), 177, 151, 35, 7 ); + this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + workbench.availableUpgrades() * 18 ); + this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (workbench.availableUpgrades()) * 18), 177, 151, 35, 7 ); } - else if ( ccwb.availableUpgrades() <= 16 ) + else if ( workbench.availableUpgrades() <= 16 ) { this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 ); this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (8) * 18), 177, 151, 35, 7 ); - int dx = ccwb.availableUpgrades() - 8; + int dx = workbench.availableUpgrades() - 8; this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 ); if ( dx == 8 ) this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 ); @@ -88,7 +88,7 @@ public class GuiCellWorkbench extends GuiUpgradeable this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 ); this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (8) * 18), 186, 151, 35 - 8, 7 ); - int dx = ccwb.availableUpgrades() - 16; + int dx = workbench.availableUpgrades() - 16; this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 ); if ( dx == 8 ) this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 ); @@ -150,10 +150,10 @@ public class GuiCellWorkbench extends GuiUpgradeable protected void handleButtonVisibility() { - copyMode.setState( ccwb.copyMode == CopyMode.CLEAR_ON_REMOVE ); + copyMode.setState( workbench.copyMode == CopyMode.CLEAR_ON_REMOVE ); boolean hasFuzzy = false; - IInventory inv = ccwb.getCellUpgradeInventory(); + IInventory inv = workbench.getCellUpgradeInventory(); for (int x = 0; x < inv.getSizeInventory(); x++) { ItemStack is = inv.getStackInSlot( x ); diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java b/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java index 980a2d4b..6d84b8f9 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftConfirm.java @@ -84,7 +84,7 @@ public class GuiCraftConfirm extends AEBaseGui GuiButton cancel; GuiButton start; - GuiButton selectcpu; + GuiButton selectCPU; @Override public void initGui() @@ -95,10 +95,10 @@ public class GuiCraftConfirm extends AEBaseGui start.enabled = false; buttonList.add( start ); - selectcpu = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": " + selectCPU = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.Automatic ); - selectcpu.enabled = false; - buttonList.add( selectcpu ); + selectCPU.enabled = false; + buttonList.add( selectCPU ); if ( OriginalGui != null ) cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + ySize - 25, 50, 20, GuiText.Cancel.getLocal() ); @@ -123,7 +123,7 @@ public class GuiCraftConfirm extends AEBaseGui if ( ccc.noCPU ) btnTextText = GuiText.NoCraftingCPUs.getLocal(); - selectcpu.displayString = btnTextText; + selectCPU.displayString = btnTextText; } @Override @@ -133,7 +133,7 @@ public class GuiCraftConfirm extends AEBaseGui boolean backwards = Mouse.isButtonDown( 1 ); - if ( btn == selectcpu ) + if ( btn == selectCPU ) { try { @@ -315,25 +315,25 @@ public class GuiCraftConfirm extends AEBaseGui updateCPUButtonText(); start.enabled = ccc.noCPU || isSimulation() ? false : true; - selectcpu.enabled = isSimulation() ? false : true; + selectCPU.enabled = isSimulation() ? false : true; int x = 0; int y = 0; int gx = (width - xSize) / 2; int gy = (height - ySize) / 2; - int yoff = 23; + int offY = 23; tooltip = -1; for (int z = 0; z <= 4 * 5; z++) { int minX = gx + 9 + x * 67; - int minY = gy + 22 + y * yoff; + int minY = gy + 22 + y * offY; if ( minX < mouse_x && minX + 67 > mouse_x ) { - if ( minY < mouse_y && minY + yoff - 2 > mouse_y ) + if ( minY < mouse_y && minY + offY - 2 > mouse_y ) { tooltip = z; break; diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java b/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java index d782c93c..8a7cf578 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftingCPU.java @@ -223,18 +223,18 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource int gx = (width - xSize) / 2; int gy = (height - ySize) / 2; - int yoff = 23; + int offY = 23; tooltip = -1; for (int z = 0; z <= 4 * 5; z++) { int minX = gx + 9 + x * 67; - int minY = gy + 22 + y * yoff; + int minY = gy + 22 + y * offY; if ( minX < mouse_x && minX + 67 > mouse_x ) { - if ( minY < mouse_y && minY + yoff - 2 > mouse_y ) + if ( minY < mouse_y && minY + offY - 2 > mouse_y ) { tooltip = z; break; diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java b/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java index a5237dcf..862ec26b 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftingStatus.java @@ -30,7 +30,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU { ContainerCraftingStatus ccc; - GuiButton selectcpu; + GuiButton selectCPU; GuiTabButton originalGuiBtn; GuiBridge OriginalGui; @@ -74,7 +74,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU boolean backwards = Mouse.isButtonDown( 1 ); - if ( btn == selectcpu ) + if ( btn == selectCPU ) { try { @@ -110,9 +110,9 @@ public class GuiCraftingStatus extends GuiCraftingCPU { super.initGui(); - selectcpu = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs ); - // selectcpu.enabled = false; - buttonList.add( selectcpu ); + selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs ); + // selectCPU.enabled = false; + buttonList.add( selectCPU ); if ( myIcon != null ) { @@ -139,7 +139,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU if ( ccc.noCPU ) btnTextText = GuiText.NoCraftingJobs.getLocal(); - selectcpu.displayString = btnTextText; + selectCPU.displayString = btnTextText; } @Override diff --git a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java index a9e2bdf4..0438d429 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java @@ -183,12 +183,12 @@ public class GuiInterfaceTerminal extends AEBaseGui { lines.add( n ); - ArrayList lset = new ArrayList(); - lset.addAll( byName.get( n ) ); + ArrayList clientInventories = new ArrayList(); + clientInventories.addAll( byName.get( n ) ); - Collections.sort( lset ); + Collections.sort( clientInventories ); - for (ClientDCInternalInv i : lset) + for (ClientDCInternalInv i : clientInventories) { lines.add( i ); } diff --git a/src/main/java/appeng/client/gui/implementations/GuiMAC.java b/src/main/java/appeng/client/gui/implementations/GuiMAC.java index 10674c23..b45d6611 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiMAC.java +++ b/src/main/java/appeng/client/gui/implementations/GuiMAC.java @@ -13,7 +13,7 @@ import appeng.tile.crafting.TileMolecularAssembler; public class GuiMAC extends GuiUpgradeable { - ContainerMAC cmac; + ContainerMAC container; GuiProgressBar pb; @Override @@ -37,7 +37,7 @@ public class GuiMAC extends GuiUpgradeable public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) { pb.max = 100; - pb.current = cmac.craftProgress; + pb.current = container.craftProgress; pb.FullMsg = pb.current + "%"; super.drawFG( offsetX, offsetY, mouseX, mouseY ); @@ -58,7 +58,7 @@ public class GuiMAC extends GuiUpgradeable public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) { super( new ContainerMAC( inventoryPlayer, te ) ); this.ySize = 197; - this.cmac = (ContainerMAC) this.inventorySlots; + this.container = (ContainerMAC) this.inventorySlots; } protected GuiText getName() diff --git a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java index 05fbbd1b..106daaf9 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java +++ b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java @@ -62,7 +62,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi GuiText myName; - int xoffset = 9; + int offsetX = 9; int perRow = 9; int reservedSpace = 0; int lowerTextureOffset = 0; @@ -83,7 +83,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi boolean viewCell; ItemStack myCurrentViewCells[] = new ItemStack[5]; - ContainerMEMonitorable mecontainer; + ContainerMEMonitorable monitorableContainer; public GuiMEMonitorable(InventoryPlayer inventoryPlayer, ITerminalHost te) { this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) ); @@ -104,7 +104,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi standardSize = xSize; configSrc = ((IConfigurableObject) inventorySlots).getConfigManager(); - (mecontainer = (ContainerMEMonitorable) inventorySlots).gui = this; + (monitorableContainer = (ContainerMEMonitorable) inventorySlots).gui = this; viewCell = te instanceof IViewCellStorage; @@ -180,7 +180,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi { for (int x = 0; x < perRow; x++) { - meSlots.add( new InternalSlotME( repo, x + y * perRow, xoffset + x * 18, 18 + y * 18 ) ); + meSlots.add( new InternalSlotME( repo, x + y * perRow, offsetX + x * 18, 18 + y * 18 ) ); } } @@ -226,7 +226,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi .getSetting( Settings.TERMINAL_STYLE ) ) ); } - searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT ); + searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, offsetX ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT ); searchField.setEnableBackgroundDrawing( false ); searchField.setMaxStringLength( 25 ); searchField.setTextColor( 0xFFFFFF ); @@ -373,7 +373,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi @Override public void updateScreen() { - repo.setPower( mecontainer.hasPower ); + repo.setPower( monitorableContainer.hasPower ); super.updateScreen(); } @@ -399,10 +399,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi for (int i = 0; i < 5; i++) { - if ( myCurrentViewCells[i] != mecontainer.cellView[i].getStack() ) + if ( myCurrentViewCells[i] != monitorableContainer.cellView[i].getStack() ) { update = true; - myCurrentViewCells[i] = mecontainer.cellView[i].getStack(); + myCurrentViewCells[i] = monitorableContainer.cellView[i].getStack(); } } diff --git a/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java b/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java index 57fbdb52..4fa5e4f1 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java +++ b/src/main/java/appeng/client/gui/implementations/GuiNetworkStatus.java @@ -213,11 +213,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource } // @Override - NEI - public List handleItemTooltip(ItemStack stack, int mousex, int mousey, List currenttip) + public List handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List currentToolTip) { if ( stack != null ) { - Slot s = getSlot( mousex, mousey ); + Slot s = getSlot( mouseX, mouseY ); if ( s instanceof SlotME ) { IAEItemStack myStack = null; @@ -233,13 +233,13 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource if ( myStack != null ) { - while (currenttip.size() > 1) - currenttip.remove( 1 ); + while (currentToolTip.size() > 1) + currentToolTip.remove( 1 ); } } } - return currenttip; + return currentToolTip; } // Vanilla version... @@ -261,15 +261,15 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource if ( myStack != null ) { - List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips ); + List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips ); - while (currenttip.size() > 1) - currenttip.remove( 1 ); + while (currentToolTip.size() > 1) + currentToolTip.remove( 1 ); - currenttip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) ); - currenttip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) ); + currentToolTip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) ); + currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) ); - drawTooltip( x, y, 0, join( currenttip, "\n" ) ); + drawTooltip( x, y, 0, join( currentToolTip, "\n" ) ); } } // super.drawItemStackTooltip( stack, x, y ); diff --git a/src/main/java/appeng/client/gui/implementations/GuiPriority.java b/src/main/java/appeng/client/gui/implementations/GuiPriority.java index 929a0318..35caf58e 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiPriority.java +++ b/src/main/java/appeng/client/gui/implementations/GuiPriority.java @@ -73,7 +73,7 @@ public class GuiPriority extends AEBaseGui if ( target instanceof PartFormationPlane ) { myIcon = AEApi.instance().parts().partFormationPlane.stack( 1 ); - OriginalGui = GuiBridge.GUI_FPLANE; + OriginalGui = GuiBridge.GUI_FORMATION_PLANE; } if ( target instanceof TileDrive ) diff --git a/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java b/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java index 725d408f..fb3a1ce1 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java +++ b/src/main/java/appeng/client/gui/implementations/GuiSpatialIOPort.java @@ -17,13 +17,13 @@ import appeng.util.Platform; public class GuiSpatialIOPort extends AEBaseGui { - ContainerSpatialIOPort csiop; + ContainerSpatialIOPort container; GuiImgButton units; public GuiSpatialIOPort(InventoryPlayer inventoryPlayer, TileSpatialIOPort te) { super( new ContainerSpatialIOPort( inventoryPlayer, te ) ); this.ySize = 199; - csiop = (ContainerSpatialIOPort) inventorySlots; + container = (ContainerSpatialIOPort) inventorySlots; } @Override @@ -59,10 +59,10 @@ public class GuiSpatialIOPort extends AEBaseGui @Override public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) { - fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.currentPower, false ), 13, 21, 4210752 ); - fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( csiop.maxPower, false ), 13, 31, 4210752 ); - fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.reqPower, false ), 13, 78, 4210752 ); - fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) csiop.eff) / 100) + "%", 13, 88, 4210752 ); + fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( container.currentPower, false ), 13, 21, 4210752 ); + fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( container.maxPower, false ), 13, 31, 4210752 ); + fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( container.reqPower, false ), 13, 78, 4210752 ); + fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) container.eff) / 100) + "%", 13, 88, 4210752 ); fontRendererObj.drawString( getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 ); fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96, 4210752 ); diff --git a/src/main/java/appeng/client/gui/implementations/GuiWireless.java b/src/main/java/appeng/client/gui/implementations/GuiWireless.java index ac574bb2..15b73533 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiWireless.java +++ b/src/main/java/appeng/client/gui/implementations/GuiWireless.java @@ -64,13 +64,13 @@ public class GuiWireless extends AEBaseGui if ( cw.range > 0 ) { - String msga = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m"; - String msgb = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true ); + String firstMessage = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m"; + String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true ); - int strWidth = Math.max( fontRendererObj.getStringWidth( msga ), fontRendererObj.getStringWidth( msgb ) ); + int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) ); int cOffset = (this.xSize / 2) - (strWidth / 2); - fontRendererObj.drawString( msga, cOffset, 20, 4210752 ); - fontRendererObj.drawString( msgb, cOffset, 20 + 12, 4210752 ); + fontRendererObj.drawString( firstMessage, cOffset, 20, 4210752 ); + fontRendererObj.drawString( secondMessage, cOffset, 20 + 12, 4210752 ); } } diff --git a/src/main/java/appeng/client/me/ItemRepo.java b/src/main/java/appeng/client/me/ItemRepo.java index 38fe8a61..ba950457 100644 --- a/src/main/java/appeng/client/me/ItemRepo.java +++ b/src/main/java/appeng/client/me/ItemRepo.java @@ -122,9 +122,9 @@ public class ItemRepo view.ensureCapacity( list.size() ); dsp.ensureCapacity( list.size() ); - Enum vmode = sortSrc.getSortDisplay(); - Enum mode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE ); - if ( mode == SearchBoxMode.NEI_AUTOSEARCH || mode == SearchBoxMode.NEI_MANUAL_SEARCH ) + Enum viewMode = sortSrc.getSortDisplay(); + Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE ); + if ( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH ) updateNEI( searchString ); innerSearch = searchString; @@ -164,16 +164,16 @@ public class ItemRepo continue; } - if ( vmode == ViewItems.CRAFTABLE && !is.isCraftable() ) + if ( viewMode == ViewItems.CRAFTABLE && !is.isCraftable() ) continue; - if ( vmode == ViewItems.CRAFTABLE ) + if ( viewMode == ViewItems.CRAFTABLE ) { is = is.copy(); is.setStackSize( 0 ); } - if ( vmode == ViewItems.STORED && is.getStackSize() == 0 ) + if ( viewMode == ViewItems.STORED && is.getStackSize() == 0 ) continue; String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is ); diff --git a/src/main/java/appeng/client/render/AppEngRenderItem.java b/src/main/java/appeng/client/render/AppEngRenderItem.java index f24531b8..c61bda4e 100644 --- a/src/main/java/appeng/client/render/AppEngRenderItem.java +++ b/src/main/java/appeng/client/render/AppEngRenderItem.java @@ -14,7 +14,7 @@ import appeng.core.AEConfig; public class AppEngRenderItem extends RenderItem { - public IAEItemStack aestack; + public IAEItemStack aeStack; private void renderQuad(Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6) { @@ -83,7 +83,7 @@ public class AppEngRenderItem extends RenderItem GL11.glEnable( GL11.GL_DEPTH_TEST ); } - long amount = aestack != null ? aestack.getStackSize() : is.stackSize; + long amount = aeStack != null ? aeStack.getStackSize() : is.stackSize; if ( amount > 999999999999L ) amount = 999999999999L; diff --git a/src/main/java/appeng/client/render/BaseBlockRender.java b/src/main/java/appeng/client/render/BaseBlockRender.java index 88ac16bd..8190fd27 100644 --- a/src/main/java/appeng/client/render/BaseBlockRender.java +++ b/src/main/java/appeng/client/render/BaseBlockRender.java @@ -255,9 +255,9 @@ public class BaseBlockRender this( false, 20 ); } - public BaseBlockRender(boolean enableTESR, double TESRrange) { + public BaseBlockRender(boolean enableTESR, double tileEntitySpecialRendererRange) { hasTESR = enableTESR; - MAX_DISTANCE = TESRrange; + MAX_DISTANCE = tileEntitySpecialRendererRange; setOriMap(); } @@ -587,52 +587,52 @@ public class BaseBlockRender Tessellator tess = Tessellator.instance; double offsetX = 0.0, offsetY = 0.0, offsetZ = 0.0; - double layaX = 0.0, layaY = 0.0, layaZ = 0.0; - double laybX = 0.0, laybY = 0.0, laybZ = 0.0; + double layerAX = 0.0, layerAY = 0.0, layerAZ = 0.0; + double layerBX = 0.0, layerBY = 0.0, layerBZ = 0.0; boolean flip = false; switch (orientation) { case NORTH: - layaX = 1.0; - laybY = 1.0; + layerAX = 1.0; + layerBY = 1.0; flip = true; break; case SOUTH: - layaX = 1.0; - laybY = 1.0; + layerAX = 1.0; + layerBY = 1.0; offsetZ = 1.0; break; case EAST: flip = true; - layaZ = 1.0; - laybY = 1.0; + layerAZ = 1.0; + layerBY = 1.0; offsetX = 1.0; break; case WEST: - layaZ = 1.0; - laybY = 1.0; + layerAZ = 1.0; + layerBY = 1.0; break; case UP: flip = true; - layaX = 1.0; - laybZ = 1.0; + layerAX = 1.0; + layerBZ = 1.0; offsetY = 1.0; break; case DOWN: - layaX = 1.0; - laybZ = 1.0; + layerAX = 1.0; + layerBZ = 1.0; break; default: @@ -643,25 +643,25 @@ public class BaseBlockRender offsetY += y; offsetZ += z; - renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ, + renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ, // u -> u 0, 1.0, // v -> v 0, edgeThickness, ico, flip ); - renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ, + renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ, // u -> u 0.0, edgeThickness, // v -> v edgeThickness, 1.0 - edgeThickness, ico, flip ); - renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ, + renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ, // u -> u 1.0 - edgeThickness, 1.0, // v -> v edgeThickness, 1.0 - edgeThickness, ico, flip ); - renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ, + renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ, // u -> u 0, 1.0, // v -> v diff --git a/src/main/java/appeng/client/render/BusRenderHelper.java b/src/main/java/appeng/client/render/BusRenderHelper.java index 522b0c5e..9b19c7c7 100644 --- a/src/main/java/appeng/client/render/BusRenderHelper.java +++ b/src/main/java/appeng/client/render/BusRenderHelper.java @@ -209,14 +209,14 @@ public class BusRenderHelper implements IPartRenderHelper } @Override - public void setBounds(float minx, float miny, float minz, float maxx, float maxy, float maxz) + public void setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) { - minX = minx; - minY = miny; - minZ = minz; - maxX = maxx; - maxY = maxy; - maxZ = maxz; + this.minX = minX; + this.minY = minY; + this.minZ = minZ; + this.maxX = maxX; + this.maxY = maxY; + this.maxZ = maxZ; } public double getBound(ForgeDirection side) diff --git a/src/main/java/appeng/client/render/TESRWrapper.java b/src/main/java/appeng/client/render/TESRWrapper.java index edeadc58..8e2cd115 100644 --- a/src/main/java/appeng/client/render/TESRWrapper.java +++ b/src/main/java/appeng/client/render/TESRWrapper.java @@ -19,7 +19,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class TESRWrapper extends TileEntitySpecialRenderer { - final public RenderBlocks rbinstance = new RenderBlocks(); + final public RenderBlocks renderBlocksInstance = new RenderBlocks(); final BaseBlockRender blkRender; final double MAX_DISTANCE; @@ -51,8 +51,8 @@ public class TESRWrapper extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); - rbinstance.blockAccess = te.getWorldObj(); - blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, rbinstance ); + renderBlocksInstance.blockAccess = te.getWorldObj(); + blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, renderBlocksInstance ); if ( Platform.isDrawing( tess ) ) throw new RuntimeException( "Error during rendering." ); diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockCrank.java b/src/main/java/appeng/client/render/blocks/RenderBlockCrank.java index ac39af7b..3afc9bb8 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockCrank.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockCrank.java @@ -45,7 +45,7 @@ public class RenderBlockCrank extends BaseBlockRender } @Override - public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks rbinstance) + public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderBlocks) { TileCrank tc = (TileCrank) tile; if ( tc.getUp() == null || tc.getUp() == ForgeDirection.UNKNOWN ) @@ -69,16 +69,16 @@ public class RenderBlockCrank extends BaseBlockRender tess.setTranslation( -tc.xCoord, -tc.yCoord, -tc.zCoord ); tess.startDrawingQuads(); - rbinstance.renderAllFaces = true; - rbinstance.blockAccess = tc.getWorldObj(); + renderBlocks.renderAllFaces = true; + renderBlocks.blockAccess = tc.getWorldObj(); - rbinstance.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 ); + renderBlocks.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 ); - rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord ); + renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord ); - rbinstance.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 ); + renderBlocks.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 ); - rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord ); + renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord ); tess.draw(); tess.setTranslation( 0, 0, 0 ); diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockInscriber.java b/src/main/java/appeng/client/render/blocks/RenderBlockInscriber.java index 67e1c4e8..e071d2be 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockInscriber.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockInscriber.java @@ -144,17 +144,17 @@ public class RenderBlockInscriber extends BaseBlockRender float press = 0.2f; float base = 0.4f; - long lprogress = 0; + long absoluteProgress = 0; if ( inv.smash ) { long currentTime = System.currentTimeMillis(); - lprogress = currentTime - inv.clientStart; - if ( lprogress > 800 ) + absoluteProgress = currentTime - inv.clientStart; + if ( absoluteProgress > 800 ) inv.smash = false; } - float rprogress = (float) (lprogress % 800) / 400.0f; - float progress = rprogress; + float relativeProgress = (float) (absoluteProgress % 800) / 400.0f; + float progress = relativeProgress; if ( progress > 1.0f ) progress = 1.0f - (progress - 1.0f); @@ -197,7 +197,7 @@ public class RenderBlockInscriber extends BaseBlockRender if ( inv.getStackInSlot( 2 ) != null ) items++; - if ( rprogress > 1.0f || items == 0 ) + if ( relativeProgress > 1.0f || items == 0 ) { ItemStack is = inv.getStackInSlot( 3 ); diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockPaint.java b/src/main/java/appeng/client/render/blocks/RenderBlockPaint.java index bbd2828a..f5438a6c 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockPaint.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockPaint.java @@ -2,6 +2,7 @@ package appeng.client.render.blocks; import java.util.EnumSet; +import appeng.helpers.Splotch; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.ItemStack; @@ -12,7 +13,6 @@ import net.minecraftforge.common.util.ForgeDirection; import appeng.block.AEBaseBlock; import appeng.client.render.BaseBlockRender; import appeng.client.texture.ExtraBlockTextures; -import appeng.helpers.Splot; import appeng.tile.misc.TilePaint; public class RenderBlockPaint extends BaseBlockRender @@ -42,9 +42,9 @@ public class RenderBlockPaint extends BaseBlockRender Tessellator tess = Tessellator.instance; int lumen = 14 << 20 | 14 << 4; - int worldb = imb.getMixedBrightnessForBlock( world, x, y, z ); + int brightness = imb.getMixedBrightnessForBlock( world, x, y, z ); - double offoff = 0.001; + double offsetConstant = 0.001; EnumSet validSides = EnumSet.noneOf( ForgeDirection.class ); @@ -54,7 +54,7 @@ public class RenderBlockPaint extends BaseBlockRender validSides.add( side ); } - for (Splot s : tp.getDots()) + for (Splotch s : tp.getDots()) { if ( !validSides.contains( s.side ) ) continue; @@ -67,11 +67,11 @@ public class RenderBlockPaint extends BaseBlockRender else { tess.setColorOpaque_I( s.color.mediumVariant ); - tess.setBrightness( worldb ); + tess.setBrightness( brightness ); } - double offset = offoff; - offoff += 0.001; + double offset = offsetConstant; + offsetConstant += 0.001; double H = 0.1; diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java b/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java index a59000f4..e217be5b 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockSkyChest.java @@ -39,13 +39,13 @@ public class RenderBlockSkyChest extends BaseBlockRender Minecraft.getMinecraft().getTextureManager().bindTexture( loc ); - float lidangle = 0.0f; + float lidAngle = 0.0f; GL11.glScalef( 1.0F, -1F, -1F ); GL11.glTranslatef( -0.0F, -1.0F, -1.0F ); model.chestLid.offsetY = -(0.9f / 16.0f); - model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F); + model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F); model.renderAll(); GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */); @@ -100,12 +100,12 @@ public class RenderBlockSkyChest extends BaseBlockRender if ( skyChest.lidAngle < 0.0f ) skyChest.lidAngle = 0.0f; - float lidangle = skyChest.lidAngle; - lidangle = 1.0F - lidangle; - lidangle = 1.0F - lidangle * lidangle * lidangle; + float lidAngle = skyChest.lidAngle; + lidAngle = 1.0F - lidAngle; + lidAngle = 1.0F - lidAngle * lidAngle * lidAngle; model.chestLid.offsetY = -(1.01f / 16.0f); - model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F); + model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F); model.renderAll(); GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */); diff --git a/src/main/java/appeng/client/render/blocks/RenderBlockWireless.java b/src/main/java/appeng/client/render/blocks/RenderBlockWireless.java index 862aed51..c596da95 100644 --- a/src/main/java/appeng/client/render/blocks/RenderBlockWireless.java +++ b/src/main/java/appeng/client/render/blocks/RenderBlockWireless.java @@ -30,9 +30,9 @@ public class RenderBlockWireless extends BaseBlockRender public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj) { this.blk = blk; - cenx = 0; - ceny = 0; - cenz = 0; + centerX = 0; + centerY = 0; + centerZ = 0; hasChan = false; hasPower = false; BlockRenderInfo ri = blk.getRendererInstance(); @@ -83,9 +83,9 @@ public class RenderBlockWireless extends BaseBlockRender } } - int cenx = 0; - int ceny = 0; - int cenz = 0; + int centerX = 0; + int centerY = 0; + int centerZ = 0; AEBaseBlock blk; boolean hasChan = false; boolean hasPower = false; @@ -118,9 +118,9 @@ public class RenderBlockWireless extends BaseBlockRender renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz ); super.renderInWorld( blk, world, x, y, z, renderer ); - cenx = x; - ceny = y; - cenz = z; + centerX = x; + centerY = y; + centerZ = z; ri.setTemporaryRenderIcon( null ); renderTorchAtAngle( renderer, fdx, fdy, fdz ); @@ -235,14 +235,14 @@ public class RenderBlockWireless extends BaseBlockRender Tessellator.instance.setColorOpaque_I( 0xffffff ); renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z ); - renderFace( cenx, ceny, cenz, blk, sides, renderer, y ); - renderFace( cenx, ceny, cenz, blk, sides, renderer, y.getOpposite() ); + renderFace( centerX, centerY, centerZ, blk, sides, renderer, y ); + renderFace( centerX, centerY, centerZ, blk, sides, renderer, y.getOpposite() ); renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z ); - renderFace( cenx, ceny, cenz, blk, sides, renderer, x ); - renderFace( cenx, ceny, cenz, blk, sides, renderer, x.getOpposite() ); + renderFace( centerX, centerY, centerZ, blk, sides, renderer, x ); + renderFace( centerX, centerY, centerZ, blk, sides, renderer, x.getOpposite() ); renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z ); - renderFace( cenx, ceny, cenz, blk, r, renderer, z ); + renderFace( centerX, centerY, centerZ, blk, r, renderer, z ); } } diff --git a/src/main/java/appeng/client/render/blocks/RenderDrive.java b/src/main/java/appeng/client/render/blocks/RenderDrive.java index 54a29d26..86146758 100644 --- a/src/main/java/appeng/client/render/blocks/RenderDrive.java +++ b/src/main/java/appeng/client/render/blocks/RenderDrive.java @@ -237,16 +237,16 @@ public class RenderDrive extends BaseBlockRender if ( stat != 0 ) { - IIcon wico = ExtraBlockTextures.White.getIcon(); - u1 = wico.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 ); - u2 = wico.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 ); - u3 = wico.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 ); - u4 = wico.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 ); + IIcon whiteIcon = ExtraBlockTextures.White.getIcon(); + u1 = whiteIcon.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 ); + u2 = whiteIcon.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 ); + u3 = whiteIcon.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 ); + u4 = whiteIcon.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 ); - v1 = wico.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 ); - v2 = wico.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 ); - v3 = wico.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 ); - v4 = wico.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 ); + v1 = whiteIcon.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 ); + v2 = whiteIcon.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 ); + v3 = whiteIcon.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 ); + v4 = whiteIcon.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 ); if ( sp.isPowered() ) tess.setBrightness( 15 << 20 | 15 << 4 ); diff --git a/src/main/java/appeng/client/render/blocks/RenderMEChest.java b/src/main/java/appeng/client/render/blocks/RenderMEChest.java index d11ac59f..500c792c 100644 --- a/src/main/java/appeng/client/render/blocks/RenderMEChest.java +++ b/src/main/java/appeng/client/render/blocks/RenderMEChest.java @@ -68,26 +68,26 @@ public class RenderMEChest extends BaseBlockRender Tessellator.instance.setBrightness( b ); Tessellator.instance.setColorOpaque_I( 0xffffff ); - FlippableIcon fico = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) ); + FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) ); if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) ) - fico.setFlip( true, false ); + flippableIcon.setFlip( true, false ); else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST ) - fico.setFlip( false, true ); + flippableIcon.setFlip( false, true ); else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.WEST ) - fico.setFlip( true, false ); + flippableIcon.setFlip( true, false ); else if ( forward == ForgeDirection.DOWN && up == ForgeDirection.EAST ) - fico.setFlip( false, true ); + flippableIcon.setFlip( false, true ); else if ( forward == ForgeDirection.DOWN ) - fico.setFlip( true, false ); + flippableIcon.setFlip( true, false ); /* * 1.7.2 * - * else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) fico.setFlip( true, false ); else if ( - * forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) fico.setFlip( true, false ); + * else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false ); else if ( + * forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false ); */ - renderFace( x, y, z, imb, fico, renderer, forward ); + renderFace( x, y, z, imb, flippableIcon, renderer, forward ); if ( stat != 0 ) { diff --git a/src/main/java/appeng/client/render/blocks/RenderQNB.java b/src/main/java/appeng/client/render/blocks/RenderQNB.java index 3f71c82e..d89904e9 100644 --- a/src/main/java/appeng/client/render/blocks/RenderQNB.java +++ b/src/main/java/appeng/client/render/blocks/RenderQNB.java @@ -74,9 +74,9 @@ public class RenderQNB extends BaseBlockRender @Override public void renderInventory(AEBaseBlock block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] obj) { - float px = 2.0f / 16.0f; - float maxpx = 14.0f / 16.0f; - renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx ); + float minPx = 2.0f / 16.0f; + float maxPx = 14.0f / 16.0f; + renderer.setRenderBounds( minPx, minPx, minPx, maxPx, maxPx, maxPx ); super.renderInventory( block, item, renderer, type, obj ); } @@ -94,20 +94,20 @@ public class RenderQNB extends BaseBlockRender { if ( tqb.isFormed() ) { - AEColoredItemDefinition cabldef = AEApi.instance().parts().partCableGlass; - Item cable = cabldef.item( AEColor.Transparent ); + AEColoredItemDefinition glassCableDefinition = AEApi.instance().parts().partCableGlass; + Item transparentGlassCable = glassCableDefinition.item( AEColor.Transparent ); - AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered; - Item ccable = ccabldef.item( AEColor.Transparent ); + AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered; + Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent ); EnumSet sides = tqb.getConnections(); - renderCableAt( 0.11D, world, x, y, z, block, renderer, cable.getIconIndex( cabldef.stack( AEColor.Transparent, 1 ) ), 0.141D, sides ); - renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides ); + renderCableAt( 0.11D, world, x, y, z, block, renderer, transparentGlassCable.getIconIndex( glassCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.141D, sides ); + renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides ); } - float px = 2.0f / 16.0f; - float maxpx = 14.0f / 16.0f; - renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx ); + float renderMin = 2.0f / 16.0f; + float renderMax = 14.0f / 16.0f; + renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax ); renderer.renderStandardBlock( block, x, y, z ); // super.renderWorldBlock(world, x, y, z, block, modelId, renderer); } @@ -115,9 +115,9 @@ public class RenderQNB extends BaseBlockRender { if ( !tqb.isFormed() ) { - float px = 2.0f / 16.0f; - float maxpx = 14.0f / 16.0f; - renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx ); + float renderMin = 2.0f / 16.0f; + float renderMax = 14.0f / 16.0f; + renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax ); renderer.renderStandardBlock( block, x, y, z ); } else if ( tqb.isCorner() ) @@ -125,24 +125,24 @@ public class RenderQNB extends BaseBlockRender // renderCableAt(0.11D, world, x, y, z, block, modelId, // renderer, // AppEngTextureRegistry.Blocks.MECable.get(), true, 0.0D); - AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered; - Item ccable = ccabldef.item( AEColor.Transparent ); + AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered; + Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent ); - renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.05D, + renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.05D, tqb.getConnections() ); - float px = 4.0f / 16.0f; - float maxpx = 12.0f / 16.0f; + float renderMin = 4.0f / 16.0f; + float renderMax = 12.0f / 16.0f; - renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx ); + renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax ); renderer.renderStandardBlock( block, x, y, z ); if ( tqb.isPowered() ) { - px = 3.9f / 16.0f; - maxpx = 12.1f / 16.0f; - renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx ); + renderMin = 3.9f / 16.0f; + renderMax = 12.1f / 16.0f; + renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax ); int bn = 15; Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F ); @@ -154,22 +154,22 @@ public class RenderQNB extends BaseBlockRender } else { - float px = 2.0f / 16.0f; - float maxpx = 14.0f / 16.0f; - renderer.setRenderBounds( 0, px, px, 1, maxpx, maxpx ); + float renderMin = 2.0f / 16.0f; + float renderMax = 14.0f / 16.0f; + renderer.setRenderBounds( 0, renderMin, renderMin, 1, renderMax, renderMax ); renderer.renderStandardBlock( block, x, y, z ); - renderer.setRenderBounds( px, 0, px, maxpx, 1, maxpx ); + renderer.setRenderBounds( renderMin, 0, renderMin, renderMax, 1, renderMax ); renderer.renderStandardBlock( block, x, y, z ); - renderer.setRenderBounds( px, px, 0, maxpx, maxpx, 1 ); + renderer.setRenderBounds( renderMin, renderMin, 0, renderMax, renderMax, 1 ); renderer.renderStandardBlock( block, x, y, z ); if ( tqb.isPowered() ) { - px = -0.01f / 16.0f; - maxpx = 16.01f / 16.0f; - renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx ); + renderMin = -0.01f / 16.0f; + renderMax = 16.01f / 16.0f; + renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax ); int bn = 15; Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F ); diff --git a/src/main/java/appeng/client/render/blocks/RenderQuartzTorch.java b/src/main/java/appeng/client/render/blocks/RenderQuartzTorch.java index a27611ec..ad8d08bc 100644 --- a/src/main/java/appeng/client/render/blocks/RenderQuartzTorch.java +++ b/src/main/java/appeng/client/render/blocks/RenderQuartzTorch.java @@ -32,9 +32,9 @@ public class RenderQuartzTorch extends BaseBlockRender float Point13 = 10.0f / 16.0f; float Point12 = 9.0f / 16.0f; - float Onepx = 1.0f / 16.0f; - float rbottom = 5.0f / 16.0f; - float rtop = 10.0f / 16.0f; + float singlePixel = 1.0f / 16.0f; + float renderBottom = 5.0f / 16.0f; + float renderTop = 10.0f / 16.0f; float bottom = 7.0f / 16.0f; float top = 8.0f / 16.0f; @@ -43,13 +43,13 @@ public class RenderQuartzTorch extends BaseBlockRender float yOff = 0.0f; float zOff = 0.0f; - renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff ); + renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff ); renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer ); - renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff ); + renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff ); renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer ); - renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff ); + renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff ); renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer ); @@ -86,9 +86,9 @@ public class RenderQuartzTorch extends BaseBlockRender float Point13 = 10.0f / 16.0f; float Point12 = 9.0f / 16.0f; - float Onepx = 1.0f / 16.0f; - float rbottom = 5.0f / 16.0f; - float rtop = 10.0f / 16.0f; + float singlePixel = 1.0f / 16.0f; + float renderBottom = 5.0f / 16.0f; + float renderTop = 10.0f / 16.0f; float bottom = 7.0f / 16.0f; float top = 8.0f / 16.0f; @@ -106,24 +106,24 @@ public class RenderQuartzTorch extends BaseBlockRender zOff = forward.offsetZ * -(4.0f / 16.0f); } - renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff ); + renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff ); super.renderInWorld( block, world, x, y, z, renderer ); int r = (x + y + z) % 2; if ( r == 0 ) { - renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff ); + renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff ); super.renderInWorld( block, world, x, y, z, renderer ); - renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff ); + renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff ); super.renderInWorld( block, world, x, y, z, renderer ); } else { - renderer.setRenderBounds( Point3 + xOff, rbottom - Onepx + yOff, Point3 + zOff, Point3 + Onepx + xOff, rbottom + yOff, Point3 + Onepx + zOff ); + renderer.setRenderBounds( Point3 + xOff, renderBottom - singlePixel + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderBottom + yOff, Point3 + singlePixel + zOff ); super.renderInWorld( block, world, x, y, z, renderer ); - renderer.setRenderBounds( Point12 - Onepx + xOff, rtop + yOff, Point12 - Onepx + zOff, Point12 + xOff, rtop + Onepx + yOff, Point12 + zOff ); + renderer.setRenderBounds( Point12 - singlePixel + xOff, renderTop + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderTop + singlePixel + yOff, Point12 + zOff ); super.renderInWorld( block, world, x, y, z, renderer ); } diff --git a/src/main/java/appeng/client/render/blocks/RenderSpatialPylon.java b/src/main/java/appeng/client/render/blocks/RenderSpatialPylon.java index 21659837..c0368ad9 100644 --- a/src/main/java/appeng/client/render/blocks/RenderSpatialPylon.java +++ b/src/main/java/appeng/client/render/blocks/RenderSpatialPylon.java @@ -44,14 +44,14 @@ public class RenderSpatialPylon extends BaseBlockRender if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_X ) { ori = ForgeDirection.EAST; - if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX ) + if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX ) { renderer.uvRotateEast = 1; renderer.uvRotateWest = 2; renderer.uvRotateTop = 2; renderer.uvRotateBottom = 1; } - else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN ) + else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN ) { renderer.uvRotateEast = 2; renderer.uvRotateWest = 1; @@ -70,7 +70,7 @@ public class RenderSpatialPylon extends BaseBlockRender else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Y ) { ori = ForgeDirection.UP; - if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX ) + if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX ) { renderer.uvRotateNorth = 3; renderer.uvRotateSouth = 3; @@ -82,12 +82,12 @@ public class RenderSpatialPylon extends BaseBlockRender else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Z ) { ori = ForgeDirection.NORTH; - if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX ) + if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX ) { renderer.uvRotateSouth = 1; renderer.uvRotateNorth = 2; } - else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN ) + else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN ) { renderer.uvRotateNorth = 1; renderer.uvRotateSouth = 2; @@ -112,7 +112,7 @@ public class RenderSpatialPylon extends BaseBlockRender boolean r = renderer.renderStandardBlock( imb, x, y, z ); - if ( (displayBits & sp.DISPLAY_POWEREDENABLED) == sp.DISPLAY_POWEREDENABLED ) + if ( (displayBits & sp.DISPLAY_POWERED_ENABLED) == sp.DISPLAY_POWERED_ENABLED ) { int bn = 15; Tessellator.instance.setBrightness( bn << 20 | bn << 4 ); @@ -159,10 +159,10 @@ public class RenderSpatialPylon extends BaseBlockRender if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE ) return ExtraBlockTextures.BlockSpatialPylonC.getIcon(); - else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN ) + else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN ) return ExtraBlockTextures.BlockSpatialPylonE.getIcon(); - else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX ) + else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX ) return ExtraBlockTextures.BlockSpatialPylonE.getIcon(); return blk.getIcon( 0, 0 ); @@ -178,10 +178,10 @@ public class RenderSpatialPylon extends BaseBlockRender if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE ) return good ? ExtraBlockTextures.BlockSpatialPylonC_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonC_red.getIcon(); - else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN ) + else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN ) return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon(); - else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX ) + else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX ) return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon(); return blk.getIcon( 0, 0 ); diff --git a/src/main/java/appeng/client/render/effects/CraftingFx.java b/src/main/java/appeng/client/render/effects/CraftingFx.java index 99acf0ba..2db57892 100644 --- a/src/main/java/appeng/client/render/effects/CraftingFx.java +++ b/src/main/java/appeng/client/render/effects/CraftingFx.java @@ -68,29 +68,29 @@ public class CraftingFx extends EntityBreakingFX float f9 = this.particleTextureIndex.getMaxV(); float scale = 0.1F * this.particleScale; - float offx = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick); - float offy = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick); - float offz = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick); + float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick); + float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick); + float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick); float f14 = 1.0F; - int blkX = MathHelper.floor_double( offx ); - int blkY = MathHelper.floor_double( offy ); - int blkZ = MathHelper.floor_double( offz ); + int blkX = MathHelper.floor_double( offX ); + int blkY = MathHelper.floor_double( offY ); + int blkZ = MathHelper.floor_double( offZ ); if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ ) { - offx -= interpPosX; - offy -= interpPosY; - offz -= interpPosZ; + offX -= interpPosX; + offY -= interpPosY; + offZ -= interpPosZ; // AELog.info( "" + partialTick ); par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ); - par1Tessellator.addVertexWithUV( (double) (offx - x * scale - rx * scale), (double) (offy - y * scale), (double) (offz - z * scale - rz * scale), + par1Tessellator.addVertexWithUV( (double) (offX - x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ - z * scale - rz * scale), (double) f7, (double) f9 ); - par1Tessellator.addVertexWithUV( (double) (offx - x * scale + rx * scale), (double) (offy + y * scale), (double) (offz - z * scale + rz * scale), + par1Tessellator.addVertexWithUV( (double) (offX - x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ - z * scale + rz * scale), (double) f7, (double) f8 ); - par1Tessellator.addVertexWithUV( (double) (offx + x * scale + rx * scale), (double) (offy + y * scale), (double) (offz + z * scale + rz * scale), + par1Tessellator.addVertexWithUV( (double) (offX + x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ + z * scale + rz * scale), (double) f6, (double) f8 ); - par1Tessellator.addVertexWithUV( (double) (offx + x * scale - rx * scale), (double) (offy - y * scale), (double) (offz + z * scale - rz * scale), + par1Tessellator.addVertexWithUV( (double) (offX + x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ + z * scale - rz * scale), (double) f6, (double) f9 ); } } diff --git a/src/main/java/appeng/client/texture/CableBusTextures.java b/src/main/java/appeng/client/texture/CableBusTextures.java index 9e137c66..6cdeafb2 100644 --- a/src/main/java/appeng/client/texture/CableBusTextures.java +++ b/src/main/java/appeng/client/texture/CableBusTextures.java @@ -27,7 +27,7 @@ public enum CableBusTextures PartPatternTerm_Bright("PartPatternTerm_Bright"), PartPatternTerm_Colored("PartPatternTerm_Colored"), PartPatternTerm_Dark("PartPatternTerm_Dark"), - PartConvMonitor_Bright("PartConvMonitor_Bright"), PartConvMonitor_Colored("PartConvMonitor_Colored"), PartConvMonitor_Dark("PartConvMonitor_Dark"), + PartConversionMonitor_Bright("PartConversionMonitor_Bright"), PartConversionMonitor_Colored("PartConversionMonitor_Colored"), PartConversionMonitor_Dark("PartConversionMonitor_Dark"), PartInterfaceTerm_Bright("PartInterfaceTerm_Bright"), PartInterfaceTerm_Colored("PartInterfaceTerm_Colored"), PartInterfaceTerm_Dark( "PartInterfaceTerm_Dark"), diff --git a/src/main/java/appeng/container/AEBaseContainer.java b/src/main/java/appeng/container/AEBaseContainer.java index 5ab81d2f..f6e98215 100644 --- a/src/main/java/appeng/container/AEBaseContainer.java +++ b/src/main/java/appeng/container/AEBaseContainer.java @@ -610,11 +610,11 @@ public abstract class AEBaseContainer extends Container { if ( f.isAnnotationPresent( GuiSync.class ) ) { - GuiSync anno = f.getAnnotation( GuiSync.class ); - if ( syncData.containsKey( anno.value() ) ) - AELog.warning( "Channel already in use: " + anno.value() + " for " + f.getName() ); + GuiSync annotation = f.getAnnotation( GuiSync.class ); + if ( syncData.containsKey( annotation.value() ) ) + AELog.warning( "Channel already in use: " + annotation.value() + " for " + f.getName() ); else - syncData.put( anno.value(), new SyncDat( this, f, anno ) ); + syncData.put( annotation.value(), new SyncDat( this, f, annotation ) ); } } } @@ -718,7 +718,7 @@ public abstract class AEBaseContainer extends Container switch (action) { - case PICKUP_OR_SETDOWN: + case PICKUP_OR_SET_DOWN: if ( hand == null ) s.putStack( null ); @@ -736,7 +736,7 @@ public abstract class AEBaseContainer extends Container } break; - case SPLIT_OR_PLACESINGLE: + case SPLIT_OR_PLACE_SINGLE: ItemStack is = s.getStack(); if ( is != null ) @@ -815,7 +815,7 @@ public abstract class AEBaseContainer extends Container adp.addItems( ais.getItemStack() ); } break; - case ROLLDOWN: + case ROLL_DOWN: if ( powerSrc == null || cellInv == null ) return; @@ -842,7 +842,7 @@ public abstract class AEBaseContainer extends Container } break; - case ROLLUP: + case ROLL_UP: case PICKUP_SINGLE: if ( powerSrc == null || cellInv == null ) return; @@ -850,13 +850,13 @@ public abstract class AEBaseContainer extends Container if ( slotItem != null ) { int liftQty = 1; - ItemStack isgg = player.inventory.getItemStack(); + ItemStack item = player.inventory.getItemStack(); - if ( isgg != null ) + if ( item != null ) { - if ( isgg.stackSize >= isgg.getMaxStackSize() ) + if ( item.stackSize >= item.getMaxStackSize() ) liftQty = 0; - if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), isgg ) ) + if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), item ) ) liftQty = 0; } @@ -878,7 +878,7 @@ public abstract class AEBaseContainer extends Container } } break; - case PICKUP_OR_SETDOWN: + case PICKUP_OR_SET_DOWN: if ( powerSrc == null || cellInv == null ) return; @@ -908,7 +908,7 @@ public abstract class AEBaseContainer extends Container } break; - case SPLIT_OR_PLACESINGLE: + case SPLIT_OR_PLACE_SINGLE: if ( powerSrc == null || cellInv == null ) return; diff --git a/src/main/java/appeng/container/ContainerNull.java b/src/main/java/appeng/container/ContainerNull.java index 0788e722..677a391b 100644 --- a/src/main/java/appeng/container/ContainerNull.java +++ b/src/main/java/appeng/container/ContainerNull.java @@ -4,7 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; /* - * Totaly useless container that does nothing. + * Totally useless container that does nothing. */ public class ContainerNull extends Container { diff --git a/src/main/java/appeng/container/guisync/SyncDat.java b/src/main/java/appeng/container/guisync/SyncDat.java index d06eb3e0..43e64d74 100644 --- a/src/main/java/appeng/container/guisync/SyncDat.java +++ b/src/main/java/appeng/container/guisync/SyncDat.java @@ -22,11 +22,11 @@ public class SyncDat private int channel; - public SyncDat(AEBaseContainer container, Field field, GuiSync anno) { + public SyncDat(AEBaseContainer container, Field field, GuiSync annotation) { clientVersion = null; this.source = container; this.field = field; - channel = anno.value(); + channel = annotation.value(); } public int getChannel() diff --git a/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java b/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java index 4eef5397..6c234199 100644 --- a/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java +++ b/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java @@ -195,10 +195,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable int y = 29; int offset = 0; - IInventory cell = myte.getInventoryByName( "cell" ); + IInventory cell = upgradeable.getInventoryByName( "cell" ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) ); - IInventory inv = myte.getInventoryByName( "config" ); + IInventory inv = upgradeable.getInventoryByName( "config" ); UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory( // null, 3 * 8 ); @@ -271,7 +271,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable public void clear() { - IInventory inv = myte.getInventoryByName( "config" ); + IInventory inv = upgradeable.getInventoryByName( "config" ); for (int x = 0; x < inv.getSizeInventory(); x++) inv.setInventorySlotContents( x, null ); detectAndSendChanges(); @@ -279,10 +279,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable public void partition() { - IInventory inv = myte.getInventoryByName( "config" ); + IInventory inv = upgradeable.getInventoryByName( "config" ); IMEInventory cellInv = AEApi.instance().registries().cell() - .getCellInventory( myte.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS ); + .getCellInventory( upgradeable.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS ); Iterator i = new NullIterator(); if ( cellInv != null ) diff --git a/src/main/java/appeng/container/implementations/ContainerChest.java b/src/main/java/appeng/container/implementations/ContainerChest.java index 7f44fac1..0c48d1df 100644 --- a/src/main/java/appeng/container/implementations/ContainerChest.java +++ b/src/main/java/appeng/container/implementations/ContainerChest.java @@ -8,15 +8,15 @@ import appeng.tile.storage.TileChest; public class ContainerChest extends AEBaseContainer { - TileChest myte; + TileChest chest; - public ContainerChest(InventoryPlayer ip, TileChest te) { - super( ip, te, null ); - myte = te; + public ContainerChest(InventoryPlayer ip, TileChest chest) { + super( ip, chest, null ); + this.chest = chest; - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, myte, 1, 80, 37, invPlayer ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest, 1, 80, 37, invPlayer ) ); - bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 ); } } diff --git a/src/main/java/appeng/container/implementations/ContainerCondenser.java b/src/main/java/appeng/container/implementations/ContainerCondenser.java index b90e768b..dd934bb8 100644 --- a/src/main/java/appeng/container/implementations/ContainerCondenser.java +++ b/src/main/java/appeng/container/implementations/ContainerCondenser.java @@ -13,17 +13,17 @@ import appeng.util.Platform; public class ContainerCondenser extends AEBaseContainer { - TileCondenser myte; + TileCondenser condenser; - public ContainerCondenser(InventoryPlayer ip, TileCondenser te) { - super( ip, te, null ); - myte = te; + public ContainerCondenser(InventoryPlayer ip, TileCondenser condenser) { + super( ip, condenser, null ); + this.condenser = condenser; - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, te, 0, 51, 52, ip ) ); - addSlotToContainer( new SlotOutput( te, 1, 105, 52, -1 ) ); - addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, te.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, condenser, 0, 51, 52, ip ) ); + addSlotToContainer( new SlotOutput( condenser, 1, 105, 52, -1 ) ); + addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, condenser.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) ); - bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 ); } @Override @@ -31,13 +31,13 @@ public class ContainerCondenser extends AEBaseContainer { if ( Platform.isServer() ) { - double maxStorage = this.myte.getStorage(); - double requiredEnergy = this.myte.getRequiredPower(); + double maxStorage = this.condenser.getStorage(); + double requiredEnergy = this.condenser.getRequiredPower(); int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage ); this.requiredEnergy = (int) maxDisplay; - this.storedPower = (int) this.myte.storedPower; - this.output = (CondenserOutput) this.myte.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT ); + this.storedPower = (int) this.condenser.storedPower; + this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT ); } super.detectAndSendChanges(); diff --git a/src/main/java/appeng/container/implementations/ContainerDrive.java b/src/main/java/appeng/container/implementations/ContainerDrive.java index 046f8e3e..71219f10 100644 --- a/src/main/java/appeng/container/implementations/ContainerDrive.java +++ b/src/main/java/appeng/container/implementations/ContainerDrive.java @@ -8,19 +8,19 @@ import appeng.tile.storage.TileDrive; public class ContainerDrive extends AEBaseContainer { - TileDrive myte; + TileDrive drive; - public ContainerDrive(InventoryPlayer ip, TileDrive te) { - super( ip, te, null ); - myte = te; + public ContainerDrive(InventoryPlayer ip, TileDrive drive) { + super( ip, drive, null ); + this.drive = drive; for (int y = 0; y < 5; y++) for (int x = 0; x < 2; x++) { - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, te, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) ); } - bindPlayerInventory( ip, 0, 199 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 ); } } diff --git a/src/main/java/appeng/container/implementations/ContainerFormationPlane.java b/src/main/java/appeng/container/implementations/ContainerFormationPlane.java index 5b364c2f..f9cbf637 100644 --- a/src/main/java/appeng/container/implementations/ContainerFormationPlane.java +++ b/src/main/java/appeng/container/implementations/ContainerFormationPlane.java @@ -43,7 +43,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable @Override public boolean isSlotEnabled(int idx) { - int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY ); + int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY ); return upgrades > idx; } @@ -54,7 +54,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable int xo = 8; int yo = 23 + 6; - IInventory config = myte.getInventoryByName( "config" ); + IInventory config = upgradeable.getInventoryByName( "config" ); for (int y = 0; y < 7; y++) { for (int x = 0; x < 9; x++) @@ -66,7 +66,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable } } - IInventory upgrades = myte.getInventoryByName( "upgrades" ); + IInventory upgrades = upgradeable.getInventoryByName( "upgrades" ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); @@ -81,7 +81,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable if ( Platform.isServer() ) { - this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE ); + this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE ); } standardDetectAndSendChanges(); diff --git a/src/main/java/appeng/container/implementations/ContainerGrinder.java b/src/main/java/appeng/container/implementations/ContainerGrinder.java index b7f6bb90..ea78c3df 100644 --- a/src/main/java/appeng/container/implementations/ContainerGrinder.java +++ b/src/main/java/appeng/container/implementations/ContainerGrinder.java @@ -10,23 +10,23 @@ import appeng.tile.grindstone.TileGrinder; public class ContainerGrinder extends AEBaseContainer { - TileGrinder myte; + TileGrinder grinder; - public ContainerGrinder(InventoryPlayer ip, TileGrinder te) { - super( ip, te, null ); - myte = te; + public ContainerGrinder(InventoryPlayer ip, TileGrinder grinder) { + super( ip, grinder, null ); + this.grinder = grinder; - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 0, 12, 17, invPlayer ) ); - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 1, 12 + 18, 17, invPlayer ) ); - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 2, 12 + 36, 17, invPlayer ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 0, 12, 17, invPlayer ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 1, 12 + 18, 17, invPlayer ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 2, 12 + 36, 17, invPlayer ) ); - addSlotToContainer( new SlotInaccessible( te, 6, 80, 40 ) ); + addSlotToContainer( new SlotInaccessible( grinder, 6, 80, 40 ) ); - addSlotToContainer( new SlotOutput( te, 3, 112, 63, 2 * 16 + 15 ) ); - addSlotToContainer( new SlotOutput( te, 4, 112 + 18, 63, 2 * 16 + 15 ) ); - addSlotToContainer( new SlotOutput( te, 5, 112 + 36, 63, 2 * 16 + 15 ) ); + addSlotToContainer( new SlotOutput( grinder, 3, 112, 63, 2 * 16 + 15 ) ); + addSlotToContainer( new SlotOutput( grinder, 4, 112 + 18, 63, 2 * 16 + 15 ) ); + addSlotToContainer( new SlotOutput( grinder, 5, 112 + 36, 63, 2 * 16 + 15 ) ); - bindPlayerInventory( ip, 0, 176 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 ); } } diff --git a/src/main/java/appeng/container/implementations/ContainerIOPort.java b/src/main/java/appeng/container/implementations/ContainerIOPort.java index 1511fb8a..5bd28f77 100644 --- a/src/main/java/appeng/container/implementations/ContainerIOPort.java +++ b/src/main/java/appeng/container/implementations/ContainerIOPort.java @@ -49,22 +49,22 @@ public class ContainerIOPort extends ContainerUpgradeable @Override protected void setupConfig() { - int offx = 19; - int offy = 17; + int offX = 19; + int offY = 17; - IInventory cells = myte.getInventoryByName( "cells" ); + IInventory cells = upgradeable.getInventoryByName( "cells" ); for (int y = 0; y < 3; y++) for (int x = 0; x < 2; x++) - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offx + x * 18, offy + y * 18, invPlayer ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, invPlayer ) ); - offx = 122; - offy = 17; + offX = 122; + offY = 17; for (int y = 0; y < 3; y++) for (int x = 0; x < 2; x++) - addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offx + x * 18, offy + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) ); + addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) ); - IInventory upgrades = myte.getInventoryByName( "upgrades" ); + IInventory upgrades = upgradeable.getInventoryByName( "upgrades" ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); @@ -77,9 +77,9 @@ public class ContainerIOPort extends ContainerUpgradeable if ( Platform.isServer() ) { - this.opMode = (OperationMode) myte.getConfigManager().getSetting( Settings.OPERATION_MODE ); - this.fMode = (FullnessMode) this.myte.getConfigManager().getSetting( Settings.FULLNESS_MODE ); - this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED ); + this.opMode = (OperationMode) upgradeable.getConfigManager().getSetting( Settings.OPERATION_MODE ); + this.fMode = (FullnessMode) this.upgradeable.getConfigManager().getSetting( Settings.FULLNESS_MODE ); + this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED ); } standardDetectAndSendChanges(); diff --git a/src/main/java/appeng/container/implementations/ContainerInscriber.java b/src/main/java/appeng/container/implementations/ContainerInscriber.java index 08fbec55..1c0ba0f9 100644 --- a/src/main/java/appeng/container/implementations/ContainerInscriber.java +++ b/src/main/java/appeng/container/implementations/ContainerInscriber.java @@ -16,7 +16,7 @@ import appeng.util.Platform; public class ContainerInscriber extends AEBaseContainer { - TileInscriber myte; + TileInscriber inscriber; Slot top; Slot middle; @@ -28,23 +28,23 @@ public class ContainerInscriber extends AEBaseContainer @GuiSync(1) public int processingTime = -1; - public ContainerInscriber(InventoryPlayer ip, TileInscriber te) { - super( ip, te, null ); - myte = te; + public ContainerInscriber(InventoryPlayer ip, TileInscriber inscriber) { + super( ip, inscriber, null ); + this.inscriber = inscriber; - addSlotToContainer( top = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, myte, 0, 45, 16, invPlayer ) ); - addSlotToContainer( bottom = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, myte, 1, 45, 62, invPlayer ) ); - addSlotToContainer( middle = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_INPUT, myte, 2, 63, 39, invPlayer ) ); + addSlotToContainer( top = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, this.inscriber, 0, 45, 16, invPlayer ) ); + addSlotToContainer( bottom = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, this.inscriber, 1, 45, 62, invPlayer ) ); + addSlotToContainer( middle = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_INPUT, this.inscriber, 2, 63, 39, invPlayer ) ); - addSlotToContainer( new SlotOutput( myte, 3, 113, 40, -1 ) ); + addSlotToContainer( new SlotOutput( this.inscriber, 3, 113, 40, -1 ) ); - bindPlayerInventory( ip, 0, 176 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 ); } public boolean isValidForSlot(Slot s, ItemStack is) { - ItemStack PlateA = myte.getStackInSlot( 0 ); - ItemStack PlateB = myte.getStackInSlot( 1 ); + ItemStack PlateA = inscriber.getStackInSlot( 0 ); + ItemStack PlateB = inscriber.getStackInSlot( 1 ); if ( s == middle ) { @@ -124,8 +124,8 @@ public class ContainerInscriber extends AEBaseContainer if ( Platform.isServer() ) { - this.maxProcessingTime = myte.maxProcessingTime; - this.processingTime = myte.processingTime; + this.maxProcessingTime = inscriber.maxProcessingTime; + this.processingTime = inscriber.processingTime; } } } diff --git a/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java b/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java index 9b1c7869..e97afc5d 100644 --- a/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java +++ b/src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java @@ -71,7 +71,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer if ( Platform.isServer() ) g = anchor.getActionableNode().getGrid(); - bindPlayerInventory( ip, 0, 222 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 222 - /* height of player inventory */82 ); } NBTTagCompound data = new NBTTagCompound(); @@ -109,7 +109,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer switch (action) { - case PICKUP_OR_SETDOWN: + case PICKUP_OR_SET_DOWN: if ( hasItemInHand ) { @@ -142,7 +142,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer } break; - case SPLIT_OR_PLACESINGLE: + case SPLIT_OR_PLACE_SINGLE: if ( hasItemInHand ) { @@ -345,12 +345,12 @@ public class ContainerInterfaceTerminal extends AEBaseContainer private void addItems(NBTTagCompound data, InvTracker inv, int offset, int length) { String name = "=" + Long.toString( inv.which, Character.MAX_RADIX ); - NBTTagCompound invv = data.getCompoundTag( name ); + NBTTagCompound tag = data.getCompoundTag( name ); - if ( invv.hasNoTags() ) + if ( tag.hasNoTags() ) { - invv.setLong( "sortBy", inv.sortBy ); - invv.setString( "un", inv.unlocalizedName ); + tag.setLong( "sortBy", inv.sortBy ); + tag.setString( "un", inv.unlocalizedName ); } for (int x = 0; x < length; x++) @@ -365,9 +365,9 @@ public class ContainerInterfaceTerminal extends AEBaseContainer if ( is != null ) is.writeToNBT( itemNBT ); - invv.setTag( Integer.toString( x + offset ), itemNBT ); + tag.setTag( Integer.toString( x + offset ), itemNBT ); } - data.setTag( name, invv ); + data.setTag( name, tag ); } } diff --git a/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java b/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java index 2269c58d..a524be91 100644 --- a/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java +++ b/src/main/java/appeng/container/implementations/ContainerLevelEmitter.java @@ -63,7 +63,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable int x = 80 + 44; int y = 40; - IInventory upgrades = myte.getInventoryByName( "upgrades" ); + IInventory upgrades = upgradeable.getInventoryByName( "upgrades" ); if ( availableUpgrades() > 0 ) addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); if ( availableUpgrades() > 1 ) @@ -73,7 +73,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable if ( availableUpgrades() > 3 ) addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() ); - IInventory inv = myte.getInventoryByName( "config" ); + IInventory inv = upgradeable.getInventoryByName( "config" ); addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) ); } @@ -94,10 +94,10 @@ public class ContainerLevelEmitter extends ContainerUpgradeable if ( Platform.isServer() ) { this.EmitterValue = lvlEmitter.getReportingValue(); - this.cmType = (YesNo) this.myte.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE ); - this.lvType = (LevelType) this.myte.getConfigManager().getSetting( Settings.LEVEL_TYPE ); - this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE ); - this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_EMITTER ); + this.cmType = (YesNo) this.upgradeable.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE ); + this.lvType = (LevelType) this.upgradeable.getConfigManager().getSetting( Settings.LEVEL_TYPE ); + this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE ); + this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_EMITTER ); } standardDetectAndSendChanges(); diff --git a/src/main/java/appeng/container/implementations/ContainerMAC.java b/src/main/java/appeng/container/implementations/ContainerMAC.java index 65565c71..3134647d 100644 --- a/src/main/java/appeng/container/implementations/ContainerMAC.java +++ b/src/main/java/appeng/container/implementations/ContainerMAC.java @@ -48,7 +48,7 @@ public class ContainerMAC extends ContainerUpgradeable public boolean isValidItemForSlot(int slotIndex, ItemStack i) { - IInventory mac = myte.getInventoryByName( "mac" ); + IInventory mac = upgradeable.getInventoryByName( "mac" ); ItemStack is = mac.getStackInSlot( 10 ); if ( is == null ) @@ -69,28 +69,28 @@ public class ContainerMAC extends ContainerUpgradeable @Override protected void setupConfig() { - int offx = 29; - int offy = 30; + int offX = 29; + int offY = 30; - IInventory mac = myte.getInventoryByName( "mac" ); + IInventory mac = upgradeable.getInventoryByName( "mac" ); for (int y = 0; y < 3; y++) for (int x = 0; x < 3; x++) { - SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offx + x * 18, offy + y * 18 ); + SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offX + x * 18, offY + y * 18 ); addSlotToContainer( s ); } - offx = 126; - offy = 16; + offX = 126; + offY = 16; - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offx, offy, invPlayer ) ); - addSlotToContainer( new SlotOutput( mac, 9, offx, offy + 32, -1 ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, invPlayer ) ); + addSlotToContainer( new SlotOutput( mac, 9, offX, offY + 32, -1 ) ); - offx = 122; - offy = 17; + offX = 122; + offY = 17; - IInventory upgrades = myte.getInventoryByName( "upgrades" ); + IInventory upgrades = upgradeable.getInventoryByName( "upgrades" ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); @@ -105,7 +105,7 @@ public class ContainerMAC extends ContainerUpgradeable if ( Platform.isServer() ) { - this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED ); + this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED ); } craftProgress = this.tma.getCraftingProgress(); diff --git a/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java b/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java index c27dd00d..d33e51f4 100644 --- a/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java +++ b/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java @@ -121,7 +121,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa { for (int y = 0; y < 5; y++) { - cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEWCELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8, + cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8, invPlayer ); cellView[y].allowEdit = canAccessViewCells; addSlotToContainer( cellView[y] ); diff --git a/src/main/java/appeng/container/implementations/ContainerNetworkTool.java b/src/main/java/appeng/container/implementations/ContainerNetworkTool.java index 537b7e9a..5301d478 100644 --- a/src/main/java/appeng/container/implementations/ContainerNetworkTool.java +++ b/src/main/java/appeng/container/implementations/ContainerNetworkTool.java @@ -27,7 +27,7 @@ public class ContainerNetworkTool extends AEBaseContainer for (int x = 0; x < 3; x++) addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, te, y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, invPlayer )) ); - bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 ); } public void toggleFacadeMode() diff --git a/src/main/java/appeng/container/implementations/ContainerPatternTerm.java b/src/main/java/appeng/container/implementations/ContainerPatternTerm.java index 1f51eb2a..2c8842f5 100644 --- a/src/main/java/appeng/container/implementations/ContainerPatternTerm.java +++ b/src/main/java/appeng/container/implementations/ContainerPatternTerm.java @@ -178,7 +178,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA ItemStack[] in = getInputs(); ItemStack[] out = getOutputs(); - // if theres no input, this would be silly. + // if there is no input, this would be silly. if ( in == null || out == null ) return; diff --git a/src/main/java/appeng/container/implementations/ContainerQNB.java b/src/main/java/appeng/container/implementations/ContainerQNB.java index 7174c646..12be8b0e 100644 --- a/src/main/java/appeng/container/implementations/ContainerQNB.java +++ b/src/main/java/appeng/container/implementations/ContainerQNB.java @@ -8,13 +8,13 @@ import appeng.tile.qnb.TileQuantumBridge; public class ContainerQNB extends AEBaseContainer { - TileQuantumBridge myte; + TileQuantumBridge quantumBridge; - public ContainerQNB(InventoryPlayer ip, TileQuantumBridge te) { - super( ip, te, null ); - myte = te; + public ContainerQNB(InventoryPlayer ip, TileQuantumBridge quantumBridge) { + super( ip, quantumBridge, null ); + this.quantumBridge = quantumBridge; - addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, te, 0, 80, 37, invPlayer )).setStackLimit( 1 ) ); + addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, quantumBridge, 0, 80, 37, invPlayer )).setStackLimit( 1 ) ); bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 ); } diff --git a/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java b/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java index 557cb9ad..a5c6ca20 100644 --- a/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java +++ b/src/main/java/appeng/container/implementations/ContainerQuartzKnife.java @@ -41,7 +41,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn lockPlayerInventorySlot( ip.currentItem ); - bindPlayerInventory( ip, 0, 184 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 184 - /* height of player inventory */82 ); } @Override diff --git a/src/main/java/appeng/container/implementations/ContainerSecurity.java b/src/main/java/appeng/container/implementations/ContainerSecurity.java index 53378f71..ace788f1 100644 --- a/src/main/java/appeng/container/implementations/ContainerSecurity.java +++ b/src/main/java/appeng/container/implementations/ContainerSecurity.java @@ -39,7 +39,7 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE addSlotToContainer( configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) ); - addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODEABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) ); + addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) ); addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) ); bindPlayerInventory( ip, 0, 0 ); @@ -117,18 +117,18 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE if ( wirelessIn.getHasStack() ) { ItemStack term = wirelessIn.getStack().copy(); - INetworkEncodable netEncodeable = null; + INetworkEncodable networkEncodable = null; if ( term.getItem() instanceof INetworkEncodable ) - netEncodeable = (INetworkEncodable) term.getItem(); + networkEncodable = (INetworkEncodable) term.getItem(); IWirelessTermHandler wTermHandler = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term ); if ( wTermHandler != null ) - netEncodeable = wTermHandler; + networkEncodable = wTermHandler; - if ( netEncodeable != null ) + if ( networkEncodable != null ) { - netEncodeable.setEncryptionKey( term, "" + securityBox.securityKey, "" ); + networkEncodable.setEncryptionKey( term, "" + securityBox.securityKey, "" ); wirelessIn.putStack( null ); wirelessOut.putStack( term ); diff --git a/src/main/java/appeng/container/implementations/ContainerSkyChest.java b/src/main/java/appeng/container/implementations/ContainerSkyChest.java index 3b4f9e9a..55509034 100644 --- a/src/main/java/appeng/container/implementations/ContainerSkyChest.java +++ b/src/main/java/appeng/container/implementations/ContainerSkyChest.java @@ -11,29 +11,29 @@ import appeng.tile.storage.TileSkyChest; public class ContainerSkyChest extends AEBaseContainer { - TileSkyChest myte; + TileSkyChest chest; - public ContainerSkyChest(InventoryPlayer ip, TileSkyChest te) { - super( ip, te, null ); - myte = te; + public ContainerSkyChest(InventoryPlayer ip, TileSkyChest chest) { + super( ip, chest, null ); + this.chest = chest; for (int y = 0; y < 4; y++) { for (int x = 0; x < 9; x++) { - addSlotToContainer( new SlotNormal( myte, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) ); + addSlotToContainer( new SlotNormal( this.chest, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) ); } } - myte.openInventory(); + this.chest.openInventory(); - bindPlayerInventory( ip, 0, 195 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 ); } @Override public void onContainerClosed(EntityPlayer par1EntityPlayer) { super.onContainerClosed( par1EntityPlayer ); - myte.closeInventory(); + chest.closeInventory(); } } diff --git a/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java b/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java index 3ea8e6c8..8e0a7592 100644 --- a/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java +++ b/src/main/java/appeng/container/implementations/ContainerSpatialIOPort.java @@ -16,7 +16,7 @@ import appeng.util.Platform; public class ContainerSpatialIOPort extends AEBaseContainer { - TileSpatialIOPort myte; + TileSpatialIOPort spatialIOPort; IGrid network; @@ -31,17 +31,17 @@ public class ContainerSpatialIOPort extends AEBaseContainer int delay = 40; - public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort te) { - super( ip, te, null ); - myte = te; + public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort spatialIOPort) { + super( ip, spatialIOPort, null ); + this.spatialIOPort = spatialIOPort; if ( Platform.isServer() ) - network = te.getGridNode( ForgeDirection.UNKNOWN ).getGrid(); + network = spatialIOPort.getGridNode( ForgeDirection.UNKNOWN ).getGrid(); - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, te, 0, 52, 48, invPlayer ) ); - addSlotToContainer( new SlotOutput( te, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, spatialIOPort, 0, 52, 48, invPlayer ) ); + addSlotToContainer( new SlotOutput( spatialIOPort, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) ); - bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 ); } @Override diff --git a/src/main/java/appeng/container/implementations/ContainerStorageBus.java b/src/main/java/appeng/container/implementations/ContainerStorageBus.java index 3c3cca2e..8b60bfbc 100644 --- a/src/main/java/appeng/container/implementations/ContainerStorageBus.java +++ b/src/main/java/appeng/container/implementations/ContainerStorageBus.java @@ -60,7 +60,7 @@ public class ContainerStorageBus extends ContainerUpgradeable @Override public boolean isSlotEnabled(int idx) { - int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY ); + int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY ); return upgrades > idx; } @@ -71,7 +71,7 @@ public class ContainerStorageBus extends ContainerUpgradeable int xo = 8; int yo = 23 + 6; - IInventory config = myte.getInventoryByName( "config" ); + IInventory config = upgradeable.getInventoryByName( "config" ); for (int y = 0; y < 7; y++) { for (int x = 0; x < 9; x++) @@ -83,7 +83,7 @@ public class ContainerStorageBus extends ContainerUpgradeable } } - IInventory upgrades = myte.getInventoryByName( "upgrades" ); + IInventory upgrades = upgradeable.getInventoryByName( "upgrades" ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); @@ -98,9 +98,9 @@ public class ContainerStorageBus extends ContainerUpgradeable if ( Platform.isServer() ) { - this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE ); - this.rwMode = (AccessRestriction) this.myte.getConfigManager().getSetting( Settings.ACCESS ); - this.storageFilter = (StorageFilter) this.myte.getConfigManager().getSetting( Settings.STORAGE_FILTER ); + this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE ); + this.rwMode = (AccessRestriction) this.upgradeable.getConfigManager().getSetting( Settings.ACCESS ); + this.storageFilter = (StorageFilter) this.upgradeable.getConfigManager().getSetting( Settings.STORAGE_FILTER ); } standardDetectAndSendChanges(); @@ -108,7 +108,7 @@ public class ContainerStorageBus extends ContainerUpgradeable public void clear() { - IInventory inv = myte.getInventoryByName( "config" ); + IInventory inv = upgradeable.getInventoryByName( "config" ); for (int x = 0; x < inv.getSizeInventory(); x++) inv.setInventorySlotContents( x, null ); detectAndSendChanges(); @@ -116,7 +116,7 @@ public class ContainerStorageBus extends ContainerUpgradeable public void partition() { - IInventory inv = myte.getInventoryByName( "config" ); + IInventory inv = upgradeable.getInventoryByName( "config" ); IMEInventory cellInv = storageBus.getInternalHandler(); diff --git a/src/main/java/appeng/container/implementations/ContainerUpgradeable.java b/src/main/java/appeng/container/implementations/ContainerUpgradeable.java index c2898a4e..8602c56a 100644 --- a/src/main/java/appeng/container/implementations/ContainerUpgradeable.java +++ b/src/main/java/appeng/container/implementations/ContainerUpgradeable.java @@ -29,25 +29,25 @@ import appeng.util.Platform; public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost { - IUpgradeableHost myte; + IUpgradeableHost upgradeable; - int tbslot; - NetworkToolViewer tbinv; + int tbSlot; + NetworkToolViewer tbInventory; public ContainerUpgradeable(InventoryPlayer ip, IUpgradeableHost te) { super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) ); - myte = te; + upgradeable = te; World w = null; - int xCoor = 0, yCoor = 0, zCoor = 0; + int xCoord = 0, yCoord = 0, zCoord = 0; if ( te instanceof TileEntity ) { TileEntity myTile = (TileEntity) te; w = myTile.getWorldObj(); - xCoor = myTile.xCoord; - yCoor = myTile.yCoord; - zCoor = myTile.zCoord; + xCoord = myTile.xCoord; + yCoord = myTile.yCoord; + zCoord = myTile.zCoord; } if ( te instanceof IPart ) @@ -55,9 +55,9 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl IUpgradeableHost myTile = (IUpgradeableHost) te; TileEntity mk = myTile.getTile(); w = mk.getWorldObj(); - xCoor = mk.xCoord; - yCoor = mk.yCoord; - zCoor = mk.zCoord; + xCoord = mk.xCoord; + yCoord = mk.yCoord; + zCoord = mk.zCoord; } IInventory pi = getPlayerInv(); @@ -67,8 +67,8 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl if ( pii != null && pii.getItem() instanceof ToolNetworkTool ) { lockPlayerInventorySlot( x ); - tbslot = x; - tbinv = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoor, yCoor, zCoor ); + tbSlot = x; + tbInventory = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoord, yCoord, zCoord ); break; } } @@ -77,18 +77,18 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl { for (int v = 0; v < 3; v++) for (int u = 0; u < 3; u++) - addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbinv, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18, + addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbInventory, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18, invPlayer )).setPlayerSide() ); } setupConfig(); - bindPlayerInventory( ip, 0, getHeight() - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, getHeight() - /* height of player inventory */82 ); } protected void setupUpgrades() { - IInventory upgrades = myte.getInventoryByName( "upgrades" ); + IInventory upgrades = upgradeable.getInventoryByName( "upgrades" ); if ( availableUpgrades() > 0 ) addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); if ( availableUpgrades() > 1 ) @@ -105,7 +105,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl int y = 40; setupUpgrades(); - IInventory inv = myte.getInventoryByName( "config" ); + IInventory inv = upgradeable.getInventoryByName( "config" ); addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) ); if ( supportCapacity() ) @@ -150,14 +150,14 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl { if ( hasToolbox() ) { - ItemStack currentItem = getPlayerInv().getStackInSlot( tbslot ); + ItemStack currentItem = getPlayerInv().getStackInSlot( tbSlot ); - if ( currentItem != tbinv.getItemStack() ) + if ( currentItem != tbInventory.getItemStack() ) { if ( currentItem != null ) { - if ( Platform.isSameItem( tbinv.getItemStack(), currentItem ) ) - getPlayerInv().setInventorySlotContents( tbslot, tbinv.getItemStack() ); + if ( Platform.isSameItem( tbInventory.getItemStack(), currentItem ) ) + getPlayerInv().setInventorySlotContents( tbSlot, tbInventory.getItemStack() ); else isContainerValid = false; } @@ -174,7 +174,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl if ( Platform.isServer() ) { - IConfigManager cm = this.myte.getConfigManager(); + IConfigManager cm = this.upgradeable.getConfigManager(); loadSettingsFromHost( cm ); } @@ -197,7 +197,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl { this.fzMode = (FuzzyMode) cm.getSetting( Settings.FUZZY_MODE ); this.rsMode = (RedstoneMode) cm.getSetting( Settings.REDSTONE_CONTROLLED ); - if ( myte instanceof PartExportBus ) + if ( upgradeable instanceof PartExportBus ) this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY ); } @@ -208,13 +208,13 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl public boolean hasToolbox() { - return tbinv != null; + return tbInventory != null; } @Override public boolean isSlotEnabled(int idx) { - int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY ); + int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY ); if ( idx == 1 && upgrades > 0 ) return true; diff --git a/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java b/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java index e0113926..09604f46 100644 --- a/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java +++ b/src/main/java/appeng/container/implementations/ContainerVibrationChamber.java @@ -10,15 +10,15 @@ import appeng.util.Platform; public class ContainerVibrationChamber extends AEBaseContainer { - TileVibrationChamber myte; + TileVibrationChamber vibrationChamber; - public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber te) { - super( ip, te, null ); - myte = te; + public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber vibrationChamber) { + super( ip, vibrationChamber, null ); + this.vibrationChamber = vibrationChamber; - addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, te, 0, 80, 37, invPlayer ) ); + addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, invPlayer ) ); - bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 ); } public int aePerTick = 5; @@ -34,8 +34,8 @@ public class ContainerVibrationChamber extends AEBaseContainer { if ( Platform.isServer() ) { - this.burnProgress = (int) (this.myte.maxBurnTime <= 0 ? 0 : 12 * this.myte.burnTime / this.myte.maxBurnTime); - this.burnSpeed = this.myte.burnSpeed; + this.burnProgress = (int) (this.vibrationChamber.maxBurnTime <= 0 ? 0 : 12 * this.vibrationChamber.burnTime / this.vibrationChamber.maxBurnTime); + this.burnSpeed = this.vibrationChamber.burnSpeed; } super.detectAndSendChanges(); diff --git a/src/main/java/appeng/container/implementations/ContainerWireless.java b/src/main/java/appeng/container/implementations/ContainerWireless.java index 84f2d0c2..b6ac6882 100644 --- a/src/main/java/appeng/container/implementations/ContainerWireless.java +++ b/src/main/java/appeng/container/implementations/ContainerWireless.java @@ -10,7 +10,7 @@ import appeng.tile.networking.TileWireless; public class ContainerWireless extends AEBaseContainer { - TileWireless myte; + TileWireless wirelessTerminal; @GuiSync(1) public long range = 0; @@ -22,11 +22,11 @@ public class ContainerWireless extends AEBaseContainer public ContainerWireless(InventoryPlayer ip, TileWireless te) { super( ip, te, null ); - myte = te; + wirelessTerminal = te; - addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, myte, 0, 80, 47, invPlayer ) ); + addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, wirelessTerminal, 0, 80, 47, invPlayer ) ); - bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); + bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 ); } @Override diff --git a/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java b/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java index c1390dce..6aa7c88a 100644 --- a/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java +++ b/src/main/java/appeng/container/implementations/ContainerWirelessTerm.java @@ -9,11 +9,11 @@ import appeng.util.Platform; public class ContainerWirelessTerm extends ContainerMEPortableCell { - WirelessTerminalGuiObject wtgo; + WirelessTerminalGuiObject wirelessTerminalGUIObject; - public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject monitorable) { - super( ip, monitorable ); - wtgo = monitorable; + public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject wirelessTerminalGUIObject) { + super( ip, wirelessTerminalGUIObject ); + this.wirelessTerminalGUIObject = wirelessTerminalGUIObject; } @Override @@ -21,7 +21,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell { super.detectAndSendChanges(); - if ( !wtgo.rangeCheck() ) + if ( !wirelessTerminalGUIObject.rangeCheck() ) { if ( Platform.isServer() && isContainerValid ) getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() ); @@ -30,7 +30,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell } else { - powerMultiplier = AEConfig.instance.wireless_getDrainRate( wtgo.getRange() ); + powerMultiplier = AEConfig.instance.wireless_getDrainRate( wirelessTerminalGUIObject.getRange() ); } } } diff --git a/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java b/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java index ca324bef..bf345ea2 100644 --- a/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java +++ b/src/main/java/appeng/container/slot/OptionalSlotRestrictedInput.java @@ -9,9 +9,9 @@ public class OptionalSlotRestrictedInput extends SlotRestrictedInput final int groupNum; IOptionalSlotHost host; - public OptionalSlotRestrictedInput(PlacableItemType valid, IInventory i, IOptionalSlotHost host, int slotnum, int x, int y, int grpNum, + public OptionalSlotRestrictedInput(PlacableItemType valid, IInventory i, IOptionalSlotHost host, int slotIndex, int x, int y, int grpNum, InventoryPlayer invPlayer) { - super( valid, i, slotnum, x, y, invPlayer ); + super( valid, i, slotIndex, x, y, invPlayer ); this.groupNum = grpNum; this.host = host; } diff --git a/src/main/java/appeng/container/slot/SlotPatternTerm.java b/src/main/java/appeng/container/slot/SlotPatternTerm.java index 83cb9c01..fd8635e8 100644 --- a/src/main/java/appeng/container/slot/SlotPatternTerm.java +++ b/src/main/java/appeng/container/slot/SlotPatternTerm.java @@ -20,12 +20,12 @@ public class SlotPatternTerm extends SlotCraftingTerm IOptionalSlotHost host; public SlotPatternTerm(EntityPlayer player, BaseActionSource mySrc, IEnergySource energySrc, IStorageMonitorable storage, IInventory cMatrix, - IInventory secondMatrix, IInventory output, int x, int y, IOptionalSlotHost h, int grpnum, IContainerCraftingPacket c) + IInventory secondMatrix, IInventory output, int x, int y, IOptionalSlotHost h, int groupNumber, IContainerCraftingPacket c) { super( player, mySrc, energySrc, storage, cMatrix, secondMatrix, output, x, y, c ); host = h; - groupNum = grpnum; + groupNum = groupNumber; } diff --git a/src/main/java/appeng/container/slot/SlotRestrictedInput.java b/src/main/java/appeng/container/slot/SlotRestrictedInput.java index 84dbd611..235b34b9 100644 --- a/src/main/java/appeng/container/slot/SlotRestrictedInput.java +++ b/src/main/java/appeng/container/slot/SlotRestrictedInput.java @@ -30,13 +30,13 @@ public class SlotRestrictedInput extends AppEngSlot { STORAGE_CELLS(15), ORE(1 * 16 + 15), STORAGE_COMPONENT(3 * 16 + 15), - ENCODEABLE_ITEM(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), + ENCODABLE_ITEM(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_CRAFTING_PATTERN(7 * 16 + 15), ENCODED_PATTERN(7 * 16 + 15), PATTERN(8 * 16 + 15), BLANK_PATTERN(8 * 16 + 15), POWERED_TOOL(9 * 16 + 15), RANGE_BOOSTER(6 * 16 + 15), QE_SINGULARITY(10 * 16 + 15), SPATIAL_STORAGE_CELLS(11 * 16 + 15), - FUEL(12 * 16 + 15), UPGRADES(13 * 16 + 15), WORKBENCH_CELL(15), BIOMETRIC_CARD(14 * 16 + 15), VIEWCELL(4 * 16 + 14), + FUEL(12 * 16 + 15), UPGRADES(13 * 16 + 15), WORKBENCH_CELL(15), BIOMETRIC_CARD(14 * 16 + 15), VIEW_CELL(4 * 16 + 14), INSCRIBER_PLATE(2 * 16 + 14), INSCRIBER_INPUT(3 * 16 + 14), METAL_INGOTS(3 * 16 + 14); @@ -85,8 +85,8 @@ public class SlotRestrictedInput extends AppEngSlot return this; } - public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotnum, int x, int y, InventoryPlayer p) { - super( i, slotnum, x, y ); + public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotIndex, int x, int y, InventoryPlayer p) { + super( i, slotIndex, x, y ); which = valid; IIcon = valid.IIcon; this.p = p; @@ -179,7 +179,7 @@ public class SlotRestrictedInput extends AppEngSlot return isMetalIngot( i ); - case VIEWCELL: + case VIEW_CELL: return AEApi.instance().items().itemViewCell.sameAsStack( i ); case ORE: return appeng.api.AEApi.instance().registries().grinder().getRecipeForInput( i ) != null; @@ -206,7 +206,7 @@ public class SlotRestrictedInput extends AppEngSlot if ( i.getItem() instanceof IStorageComponent && ((IStorageComponent) i.getItem()).isStorageComponent( i ) ) return false; return true; - case ENCODEABLE_ITEM: + case ENCODABLE_ITEM: return i.getItem() instanceof INetworkEncodable || AEApi.instance().registries().wireless().isWirelessTerminal( i ); case BIOMETRIC_CARD: return i.getItem() instanceof IBiometricCard; diff --git a/src/main/java/appeng/core/AEConfig.java b/src/main/java/appeng/core/AEConfig.java index b7f207cf..480bfa95 100644 --- a/src/main/java/appeng/core/AEConfig.java +++ b/src/main/java/appeng/core/AEConfig.java @@ -96,7 +96,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon return prop; } - public double spatialPowerScaler = 1.35; + public double spatialPowerExponent = 1.35; public double spatialPowerMultiplier = 1250.0; public String grinderOres[] = { @@ -117,12 +117,12 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon public int[] priorityByStacks = new int[] { 1, 10, 100, 1000 }; public int[] levelByStacks = new int[] { 1, 10, 100, 1000 }; - public int wireless_battery = 1600000; - public int manipulator_battery = 200000; - public int mattercannon_battery = 200000; - public int portablecell_battery = 20000; - public int colorapplicator_battery = 20000; - public int staff_battery = 8000; + public int wirelessTerminalBattery = 1600000; + public int entropyManipulatorBattery = 200000; + public int matterCannonBattery = 200000; + public int portableCellBattery = 20000; + public int colorApplicatorBattery = 20000; + public int chargedStaffBattery = 8000; public boolean disableColoredCableRecipesInNEI = true; @@ -257,20 +257,20 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon formationPlaneEntityLimit = get( "automation", "formationPlaneEntityLimit", formationPlaneEntityLimit ).getInt( formationPlaneEntityLimit ); - wireless_battery = get( "battery", "wireless", wireless_battery ).getInt( wireless_battery ); - staff_battery = get( "battery", "staff", staff_battery ).getInt( staff_battery ); - manipulator_battery = get( "battery", "manipulator", manipulator_battery ).getInt( manipulator_battery ); - portablecell_battery = get( "battery", "portablecell", portablecell_battery ).getInt( portablecell_battery ); - colorapplicator_battery = get( "battery", "colorapplicator", colorapplicator_battery ).getInt( colorapplicator_battery ); - mattercannon_battery = get( "battery", "mattercannon", mattercannon_battery ).getInt( mattercannon_battery ); + wirelessTerminalBattery = get( "battery", "wirelessTerminal", wirelessTerminalBattery ).getInt( wirelessTerminalBattery ); + chargedStaffBattery = get( "battery", "chargedStaff", chargedStaffBattery ).getInt( chargedStaffBattery ); + entropyManipulatorBattery = get( "battery", "entropyManipulator", entropyManipulatorBattery ).getInt( entropyManipulatorBattery ); + portableCellBattery = get( "battery", "portableCell", portableCellBattery ).getInt( portableCellBattery ); + colorApplicatorBattery = get( "battery", "colorApplicator", colorApplicatorBattery ).getInt( colorApplicatorBattery ); + matterCannonBattery = get( "battery", "matterCannon", matterCannonBattery ).getInt( matterCannonBattery ); clientSync(); for (AEFeature feature : AEFeature.values()) { - if ( feature.isVisible() ) + if ( feature.isVisible ) { - if ( get( "Features." + feature.getCategory(), feature.name(), feature.defaultValue() ).getBoolean( feature.defaultValue() ) ) + if ( get( "Features." + feature.category, feature.name(), feature.defaultValue ).getBoolean( feature.defaultValue ) ) featureFlags.add( feature ); } else @@ -304,12 +304,12 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon storageBiomeID = get( "spatialio", "storageBiomeID", storageBiomeID ).getInt( storageBiomeID ); storageProviderID = get( "spatialio", "storageProviderID", storageProviderID ).getInt( storageProviderID ); spatialPowerMultiplier = get( "spatialio", "spatialPowerMultiplier", spatialPowerMultiplier ).getDouble( spatialPowerMultiplier ); - spatialPowerScaler = get( "spatialio", "spatialPowerScaler", spatialPowerScaler ).getDouble( spatialPowerScaler ); + spatialPowerExponent = get( "spatialio", "spatialPowerExponent", spatialPowerExponent ).getDouble( spatialPowerExponent ); } if ( isFeatureEnabled( AEFeature.CraftingCPU ) ) { - craftingCalculationTimePerTick = get( "craftingcpu", "craftingCalculationTimePerTick", craftingCalculationTimePerTick ).getInt( + craftingCalculationTimePerTick = get( "craftingCPU", "craftingCalculationTimePerTick", craftingCalculationTimePerTick ).getInt( craftingCalculationTimePerTick ); } diff --git a/src/main/java/appeng/core/AppEng.java b/src/main/java/appeng/core/AppEng.java index 38276f8f..0610c2ee 100644 --- a/src/main/java/appeng/core/AppEng.java +++ b/src/main/java/appeng/core/AppEng.java @@ -156,10 +156,10 @@ public class AppEng AELog.info( "PostInit" ); Registration.instance.PostInit( event ); - IntegrationRegistry.instance.postinit(); + IntegrationRegistry.instance.postInit(); FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( CrashInfo.INTEGRATION ) ); - CommonHelper.proxy.postinit(); + CommonHelper.proxy.postInit(); AEConfig.instance.save(); NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler ); diff --git a/src/main/java/appeng/core/CommonHelper.java b/src/main/java/appeng/core/CommonHelper.java index bad7301b..efd5a571 100644 --- a/src/main/java/appeng/core/CommonHelper.java +++ b/src/main/java/appeng/core/CommonHelper.java @@ -37,7 +37,7 @@ public abstract class CommonHelper public abstract void doRenderItem(ItemStack itemstack, World w); - public abstract void postinit(); + public abstract void postInit(); public abstract CableRenderMode getRenderMode(); diff --git a/src/main/java/appeng/core/Registration.java b/src/main/java/appeng/core/Registration.java index 2a8a449f..550fa113 100644 --- a/src/main/java/appeng/core/Registration.java +++ b/src/main/java/appeng/core/Registration.java @@ -9,7 +9,6 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.ChestGenHooks; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; import net.minecraftforge.oredict.RecipeSorter.Category; import appeng.api.AEApi; @@ -403,17 +402,17 @@ public class Registration items.itemFacade = addFeature( ItemFacade.class ); items.itemCrystalSeed = addFeature( ItemCrystalSeed.class ); - ColoredItemDefinition pbreg, pbregl; - items.itemPaintBall = pbreg = new ColoredItemDefinition(); - items.itemLumenPaintBall = pbregl = new ColoredItemDefinition(); + ColoredItemDefinition paintBall, lumenPaintBall; + items.itemPaintBall = paintBall = new ColoredItemDefinition(); + items.itemLumenPaintBall = lumenPaintBall = new ColoredItemDefinition(); AEItemDefinition pb = addFeature( ItemPaintBall.class ); for (AEColor c : AEColor.values()) { if ( c != AEColor.Transparent ) { - pbreg.add( c, new ItemStackSrc( pb.item(), c.ordinal() ) ); - pbregl.add( c, new ItemStackSrc( pb.item(), 20 + c.ordinal() ) ); + paintBall.add( c, new ItemStackSrc( pb.item(), c.ordinal() ) ); + lumenPaintBall.add( c, new ItemStackSrc( pb.item(), 20 + c.ordinal() ) ); } } @@ -519,7 +518,7 @@ public class Registration public void Init(FMLInitializationEvent event) { // Perform ore camouflage! - ItemMultiMaterial.instance.unduplicate(); + ItemMultiMaterial.instance.makeUnique(); if ( AEConfig.instance.isFeatureEnabled( AEFeature.CustomRecipes ) ) recipeHandler.parseRecipes( new ConfigLoader( AppEng.instance.getConfigPath() ), "index.recipe" ); @@ -591,7 +590,7 @@ public class Registration // default settings.. ((P2PTunnelRegistry) AEApi.instance().registries().p2pTunnel()).configure(); - // add to localizaiton.. + // add to localization.. PlayerMessages.values(); GuiText.values(); diff --git a/src/main/java/appeng/core/api/ApiPart.java b/src/main/java/appeng/core/api/ApiPart.java index 1eb275cf..419681c1 100644 --- a/src/main/java/appeng/core/api/ApiPart.java +++ b/src/main/java/appeng/core/api/ApiPart.java @@ -247,26 +247,26 @@ public class ApiPart implements IPartHelper // n.accept( cw ); // n.accept( new TraceClassVisitor( new PrintWriter( System.out ) ) ); - byte[] barray = cw.toByteArray(); - int size = barray.length; - Class nclass = loadClass( n.name.replace( "/", "." ), barray ); + byte[] byteArray = cw.toByteArray(); + int size = byteArray.length; + Class clazz = loadClass( n.name.replace( "/", "." ), byteArray ); try { - Object fish = nclass.newInstance(); + Object fish = clazz.newInstance(); Class rootC = Class.forName( root ); - boolean bads = false; + boolean hasError = false; if ( !rootC.isInstance( fish ) ) { - bads = true; + hasError = true; AELog.severe( "Error, Expected layer to implement " + root + " did not." ); } if ( fish instanceof LayerBase ) { - bads = true; + hasError = true; AELog.severe( "Error, Expected layer to NOT implement LayerBase but it DID." ); } @@ -274,18 +274,18 @@ public class ApiPart implements IPartHelper { if ( !(fish instanceof TileCableBus) ) { - bads = true; + hasError = true; AELog.severe( "Error, Expected layer to implement TileCableBus did not." ); } if ( !(fish instanceof TileEntity) ) { - bads = true; + hasError = true; AELog.severe( "Error, Expected layer to implement TileEntity did not." ); } } - if ( !bads ) + if ( !hasError ) { AELog.info( "Layer: " + n.name + " loaded successfully - " + size + " bytes" ); } @@ -297,8 +297,8 @@ public class ApiPart implements IPartHelper AELog.error( t ); } - roots.put( fullPath, nclass ); - return nclass; + roots.put( fullPath, clazz ); + return clazz; } private void processNode(AbstractInsnNode next, String nePar) diff --git a/src/main/java/appeng/core/features/AEFeature.java b/src/main/java/appeng/core/features/AEFeature.java index 0c0bf541..b9e9946f 100644 --- a/src/main/java/appeng/core/features/AEFeature.java +++ b/src/main/java/appeng/core/features/AEFeature.java @@ -56,33 +56,19 @@ public enum AEFeature ChunkLoggerTrace("Commands", false), LogSecurityAudits("Misc", false), Achievements("Misc"); - String Category; - boolean visible = true; - boolean defValue = true; + public final String category; + public final boolean isVisible; + public final boolean defaultValue; private AEFeature(String cat) { - Category = cat; - visible = !this.name().equals( "Core" ); + this.category = cat; + this.isVisible = !this.name().equals( "Core" ); + this.defaultValue = true; } - private AEFeature(String cat, boolean defv) { - this( cat ); - defValue = defv; + private AEFeature(String cat, boolean defaultValue) { + this.category = cat; + this.isVisible = !this.name().equals( "Core" ); + this.defaultValue = defaultValue; } - - public String getCategory() - { - return Category; - } - - public Boolean defaultValue() - { - return defValue; - } - - public Boolean isVisible() - { - return visible; - } - } diff --git a/src/main/java/appeng/core/features/AEFeatureHandler.java b/src/main/java/appeng/core/features/AEFeatureHandler.java index 22088423..87bb1fe4 100644 --- a/src/main/java/appeng/core/features/AEFeatureHandler.java +++ b/src/main/java/appeng/core/features/AEFeatureHandler.java @@ -21,32 +21,32 @@ import cpw.mods.fml.common.registry.GameRegistry; public class AEFeatureHandler implements AEItemDefinition { - private final EnumSet myFeatures; + private final EnumSet features; - private final String subname; - private IAEFeature obj; + private final String subName; + private IAEFeature feature; private Item ItemData; private Block BlockData; - public AEFeatureHandler(EnumSet featureSet, IAEFeature _obj, String _subname) { - myFeatures = featureSet; - obj = _obj; - subname = _subname; + public AEFeatureHandler(EnumSet features, IAEFeature feature, String subName) { + this.features = features; + this.feature = feature; + this.subName = subName; } public void register() { if ( isFeatureAvailable() ) { - if ( obj instanceof Item ) - initItem( (Item) obj ); - if ( obj instanceof Block ) - initBlock( (Block) obj ); + if ( feature instanceof Item ) + initItem( (Item) feature ); + if ( feature instanceof Block ) + initBlock( (Block) feature ); } } - public static String getName(Class o, String subname) + public static String getName(Class o, String subName) { String name = o.getSimpleName(); @@ -55,19 +55,19 @@ public class AEFeatureHandler implements AEItemDefinition else if ( name.startsWith( "ItemMultiMaterial" ) ) name = name.replace( "ItemMultiMaterial", "ItemMaterial" ); - if ( subname != null ) + if ( subName != null ) { // simple hack to allow me to do get nice names for these without // mode code outside of AEBaseItem - if ( subname.startsWith( "P2PTunnel" ) ) + if ( subName.startsWith( "P2PTunnel" ) ) return "ItemPart.P2PTunnel"; - if ( subname.equals( "CertusQuartzTools" ) ) + if ( subName.equals( "CertusQuartzTools" ) ) return name.replace( "Quartz", "CertusQuartz" ); - if ( subname.equals( "NetherQuartzTools" ) ) + if ( subName.equals( "NetherQuartzTools" ) ) return name.replace( "Quartz", "NetherQuartz" ); - name += "." + subname; + name += "." + subName; } return name; @@ -77,7 +77,7 @@ public class AEFeatureHandler implements AEItemDefinition { ItemData = i; - String name = getName( i.getClass(), subname ); + String name = getName( i.getClass(), subName ); i.setTextureName( "appliedenergistics2:" + name ); i.setUnlocalizedName( /* "item." */"appliedenergistics2." + name ); @@ -98,7 +98,7 @@ public class AEFeatureHandler implements AEItemDefinition { BlockData = b; - String name = getName( b.getClass(), subname ); + String name = getName( b.getClass(), subName ); b.setCreativeTab( CreativeTab.instance ); b.setBlockName( /* "tile." */"appliedenergistics2." + name ); b.setBlockTextureName( "appliedenergistics2:" + name ); @@ -118,14 +118,14 @@ public class AEFeatureHandler implements AEItemDefinition public EnumSet getFeatures() { - return myFeatures.clone(); + return features.clone(); } public boolean isFeatureAvailable() { boolean enabled = true; - for (AEFeature f : myFeatures) + for (AEFeature f : features) enabled = enabled && AEConfig.instance.isFeatureEnabled( f ); return enabled; diff --git a/src/main/java/appeng/core/features/registries/RegistryContainer.java b/src/main/java/appeng/core/features/registries/RegistryContainer.java index 7b38a91c..f1c6e32a 100644 --- a/src/main/java/appeng/core/features/registries/RegistryContainer.java +++ b/src/main/java/appeng/core/features/registries/RegistryContainer.java @@ -28,7 +28,7 @@ public class RegistryContainer implements IRegistryContainer private P2PTunnelRegistry P2PRegistry = new P2PTunnelRegistry(); private MovableTileRegistry MovableReg = new MovableTileRegistry(); private MatterCannonAmmoRegistry matterCannonReg = new MatterCannonAmmoRegistry(); - private PlayerRegistry playerreg = new PlayerRegistry(); + private PlayerRegistry playerRegistry = new PlayerRegistry(); private IRecipeHandlerRegistry recipeReg = new RecipeHandlerRegistry(); @Override @@ -94,7 +94,7 @@ public class RegistryContainer implements IRegistryContainer @Override public IPlayerRegistry players() { - return playerreg; + return playerRegistry; } @Override diff --git a/src/main/java/appeng/core/features/registries/WorldGenRegistry.java b/src/main/java/appeng/core/features/registries/WorldGenRegistry.java index 53820a58..1884edac 100644 --- a/src/main/java/appeng/core/features/registries/WorldGenRegistry.java +++ b/src/main/java/appeng/core/features/registries/WorldGenRegistry.java @@ -60,12 +60,12 @@ public class WorldGenRegistry implements IWorldGen } @Override - public void disableWorldGenForDimension(WorldGenType type, int dimid) + public void disableWorldGenForDimension(WorldGenType type, int dimensionID) { if ( type == null ) throw new IllegalArgumentException( "Bad Type Passed" ); - types[type.ordinal()].badDimensions.add( dimid ); + types[type.ordinal()].badDimensions.add( dimensionID ); } } diff --git a/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java b/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java index 1386c0ae..ed9db3a4 100644 --- a/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java +++ b/src/main/java/appeng/core/sync/AppEngPacketHandlerBase.java @@ -51,13 +51,13 @@ public class AppEngPacketHandlerBase PACKET_MULTIPART(PacketMultiPart.class), - PACKET_PARTPLACEMENT(PacketPartPlacement.class), + PACKET_PART_PLACEMENT(PacketPartPlacement.class), PACKET_LIGHTNING(PacketLightning.class), - PACKET_MATTERCANNON(PacketMatterCannon.class), + PACKET_MATTER_CANNON(PacketMatterCannon.class), - PACKET_MOCKEXPLOSION(PacketMockExplosion.class), + PACKET_MOCK_EXPLOSION(PacketMockExplosion.class), PACKET_VALUE_CONFIG(PacketValueConfig.class), diff --git a/src/main/java/appeng/core/sync/GuiBridge.java b/src/main/java/appeng/core/sync/GuiBridge.java index 041e5b73..615e8e98 100644 --- a/src/main/java/appeng/core/sync/GuiBridge.java +++ b/src/main/java/appeng/core/sync/GuiBridge.java @@ -128,7 +128,7 @@ public enum GuiBridge implements IGuiHandler GUI_DRIVE(ContainerDrive.class, TileDrive.class, WORLD, SecurityPermissions.BUILD), - GUI_VIBRATIONCHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null), + GUI_VIBRATION_CHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null), GUI_CONDENSER(ContainerCondenser.class, TileCondenser.class, WORLD, null), @@ -140,7 +140,7 @@ public enum GuiBridge implements IGuiHandler GUI_STORAGEBUS(ContainerStorageBus.class, PartStorageBus.class, WORLD, SecurityPermissions.BUILD), - GUI_FPLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD), + GUI_FORMATION_PLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD), GUI_PRIORITY(ContainerPriority.class, IPriorityHost.class, WORLD, SecurityPermissions.BUILD), @@ -151,13 +151,13 @@ public enum GuiBridge implements IGuiHandler GUI_PATTERN_TERMINAL(ContainerPatternTerm.class, PartPatternTerminal.class, WORLD, SecurityPermissions.CRAFT), // extends (Container/Gui) + Bus - GUI_LEVELEMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD), + GUI_LEVEL_EMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD), - GUI_SPATIALIOPORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD), + GUI_SPATIAL_IO_PORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD), GUI_INSCRIBER(ContainerInscriber.class, TileInscriber.class, WORLD, null), - GUI_CELLWORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null), + GUI_CELL_WORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null), GUI_MAC(ContainerMAC.class, TileMolecularAssembler.class, WORLD, null), @@ -335,9 +335,9 @@ public enum GuiBridge implements IGuiHandler { ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 ); GuiBridge ID = values()[ID_ORDINAL >> 4]; - boolean istem = ((ID_ORDINAL >> 3) & 1) == 1; + boolean stem = ((ID_ORDINAL >> 3) & 1) == 1; - if ( ID.type.isItem() && istem ) + if ( ID.type.isItem() && stem ) { ItemStack it = player.inventory.getCurrentItem(); Object myItem = getGuiObject( it, player, w, x, y, z ); @@ -387,9 +387,9 @@ public enum GuiBridge implements IGuiHandler { ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 ); GuiBridge ID = values()[ID_ORDINAL >> 4]; - boolean istem = ((ID_ORDINAL >> 3) & 1) == 1; + boolean stem = ((ID_ORDINAL >> 3) & 1) == 1; - if ( ID.type.isItem() && istem ) + if ( ID.type.isItem() && stem ) { ItemStack it = player.inventory.getCurrentItem(); Object myItem = getGuiObject( it, player, w, x, y, z ); diff --git a/src/main/java/appeng/core/sync/packets/PacketConfigButton.java b/src/main/java/appeng/core/sync/packets/PacketConfigButton.java index 4f416b91..010b1e9c 100644 --- a/src/main/java/appeng/core/sync/packets/PacketConfigButton.java +++ b/src/main/java/appeng/core/sync/packets/PacketConfigButton.java @@ -31,10 +31,10 @@ public class PacketConfigButton extends AppEngPacket public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player) { EntityPlayerMP sender = (EntityPlayerMP) player; - AEBaseContainer aebc = (AEBaseContainer) sender.openContainer; - if ( aebc.getTarget() instanceof IConfigurableObject ) + AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer; + if ( baseContainer.getTarget() instanceof IConfigurableObject ) { - IConfigManager cm = ((IConfigurableObject) aebc.getTarget()).getConfigManager(); + IConfigManager cm = ((IConfigurableObject) baseContainer.getTarget()).getConfigManager(); Enum newState = Platform.rotateEnum( cm.getSetting( option ), rotationDirection, option.getPossibleValues() ); cm.putSetting( option, newState ); } diff --git a/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java b/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java index 7281a484..6a1be972 100644 --- a/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java +++ b/src/main/java/appeng/core/sync/packets/PacketCraftRequest.java @@ -41,10 +41,10 @@ public class PacketCraftRequest extends AppEngPacket if ( player.openContainer instanceof ContainerCraftAmount ) { ContainerCraftAmount cca = (ContainerCraftAmount) player.openContainer; - Object targ = cca.getTarget(); - if ( targ instanceof IGridHost ) + Object target = cca.getTarget(); + if ( target instanceof IGridHost ) { - IGridHost gh = (IGridHost) targ; + IGridHost gh = (IGridHost) target; IGridNode gn = gh.getGridNode( ForgeDirection.UNKNOWN ); if ( gn == null ) return; diff --git a/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java b/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java index ea092475..146bef59 100644 --- a/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java +++ b/src/main/java/appeng/core/sync/packets/PacketInventoryAction.java @@ -46,23 +46,23 @@ public class PacketInventoryAction extends AppEngPacket EntityPlayerMP sender = (EntityPlayerMP) player; if ( sender.openContainer instanceof AEBaseContainer ) { - AEBaseContainer aebc = (AEBaseContainer) sender.openContainer; - if ( action == InventoryAction.AUTOCRAFT ) + AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer; + if ( action == InventoryAction.AUTO_CRAFT ) { - ContainerOpenContext context = aebc.openContext; + ContainerOpenContext context = baseContainer.openContext; if ( context != null ) { TileEntity te = context.getTile(); - Platform.openGUI( sender, te, aebc.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT ); + Platform.openGUI( sender, te, baseContainer.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT ); if ( sender.openContainer instanceof ContainerCraftAmount ) { ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer; - if ( aebc.getTargetStack() != null ) + if ( baseContainer.getTargetStack() != null ) { - cca.craftingItem.putStack( aebc.getTargetStack().getItemStack() ); - cca.whatToMake = aebc.getTargetStack(); + cca.craftingItem.putStack( baseContainer.getTargetStack().getItemStack() ); + cca.whatToMake = baseContainer.getTargetStack(); } cca.detectAndSendChanges(); @@ -71,7 +71,7 @@ public class PacketInventoryAction extends AppEngPacket } else { - aebc.doAction( sender, action, slot, id ); + baseContainer.doAction( sender, action, slot, id ); } } } diff --git a/src/main/java/appeng/core/sync/packets/PacketMEInventoryUpdate.java b/src/main/java/appeng/core/sync/packets/PacketMEInventoryUpdate.java index c35f42d7..4be0187a 100644 --- a/src/main/java/appeng/core/sync/packets/PacketMEInventoryUpdate.java +++ b/src/main/java/appeng/core/sync/packets/PacketMEInventoryUpdate.java @@ -76,7 +76,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket gzReader.close(); // int uncompressedBytes = uncompressed.readableBytes(); - // AELog.info( "Recv: " + originalBytes + " -> " + uncompressedBytes ); + // AELog.info( "Receiver: " + originalBytes + " -> " + uncompressedBytes ); while (uncompressed.readableBytes() > 0) list.add( AEItemStack.loadItemStackFromPacket( uncompressed ) ); diff --git a/src/main/java/appeng/core/sync/packets/PacketNEIRecipe.java b/src/main/java/appeng/core/sync/packets/PacketNEIRecipe.java index bf81588b..9ded4cb7 100644 --- a/src/main/java/appeng/core/sync/packets/PacketNEIRecipe.java +++ b/src/main/java/appeng/core/sync/packets/PacketNEIRecipe.java @@ -108,8 +108,8 @@ public class PacketNEIRecipe extends AppEngPacket if ( is != null ) { - IMEMonitor stor = inv.getItemInventory(); - IItemList all = stor.getStorageList(); + IMEMonitor storage = inv.getItemInventory(); + IItemList all = storage.getStorageList(); IPartitionList filter = ItemViewCell.createFilter( cct.getViewCells() ); for (int x = 0; x < craftMatrix.getSizeInventory(); x++) @@ -120,15 +120,15 @@ public class PacketNEIRecipe extends AppEngPacket if ( currentItem != null ) { ic.setInventorySlotContents( x, currentItem ); - ItemStack newis = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null; + ItemStack newItemStack = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null; ic.setInventorySlotContents( x, PatternItem ); - if ( newis == null || !Platform.isSameItemPrecise( newis, is ) ) + if ( newItemStack == null || !Platform.isSameItemPrecise( newItemStack, is ) ) { IAEItemStack in = AEItemStack.create( currentItem ); if ( in != null ) { - IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, stor, in, + IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, storage, in, cct.getSource() ); if ( out != null ) craftMatrix.setInventorySlotContents( x, out.getItemStack() ); @@ -142,7 +142,7 @@ public class PacketNEIRecipe extends AppEngPacket if ( PatternItem != null && currentItem == null ) { - ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), stor, player.worldObj, r, is, ic, + ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), storage, player.worldObj, r, is, ic, PatternItem, x, all, realForFake, filter ); if ( whichItem == null ) @@ -155,7 +155,7 @@ public class PacketNEIRecipe extends AppEngPacket if ( filter == null || filter.isListed( request ) ) { request.setStackSize( 1 ); - IAEItemStack out = Platform.poweredExtraction( energy, stor, request, cct.getSource() ); + IAEItemStack out = Platform.poweredExtraction( energy, storage, request, cct.getSource() ); if ( out != null ) { whichItem = out.getItemStack(); @@ -183,11 +183,11 @@ public class PacketNEIRecipe extends AppEngPacket ByteBuf data = Unpooled.buffer(); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); - DataOutputStream datao = new DataOutputStream( bytes ); + DataOutputStream outputStream = new DataOutputStream( bytes ); data.writeInt( getPacketID() ); - CompressedStreamTools.writeCompressed( recipe, datao ); + CompressedStreamTools.writeCompressed( recipe, outputStream ); data.writeBytes( bytes.toByteArray() ); configureWrite( data ); diff --git a/src/main/java/appeng/core/sync/packets/PacketPatternSlot.java b/src/main/java/appeng/core/sync/packets/PacketPatternSlot.java index b26bea24..a2ad4d7b 100644 --- a/src/main/java/appeng/core/sync/packets/PacketPatternSlot.java +++ b/src/main/java/appeng/core/sync/packets/PacketPatternSlot.java @@ -51,8 +51,8 @@ public class PacketPatternSlot extends AppEngPacket EntityPlayerMP sender = (EntityPlayerMP) player; if ( sender.openContainer instanceof ContainerPatternTerm ) { - ContainerPatternTerm aebc = (ContainerPatternTerm) sender.openContainer; - aebc.craftOrGetItem( this ); + ContainerPatternTerm patternTerminal = (ContainerPatternTerm) sender.openContainer; + patternTerminal.craftOrGetItem( this ); } } diff --git a/src/main/java/appeng/crafting/CraftingJob.java b/src/main/java/appeng/crafting/CraftingJob.java index 28b8773d..3bda22a6 100644 --- a/src/main/java/appeng/crafting/CraftingJob.java +++ b/src/main/java/appeng/crafting/CraftingJob.java @@ -139,15 +139,15 @@ public class CraftingJob implements Runnable, ICraftingJob try { TickHandler.instance.registerCraftingSimulation( world, this ); - handlepausing(); + handlePausing(); Stopwatch timer = Stopwatch.createStarted(); - MECraftingInventory meci = new MECraftingInventory( original, true, false, true ); - meci.ignore( output ); + MECraftingInventory craftingInventory = new MECraftingInventory( original, true, false, true ); + craftingInventory.ignore( output ); availableCheck = new MECraftingInventory( original, false, false, false ); - tree.request( meci, output.getStackSize(), actionSrc ); + tree.request( craftingInventory, output.getStackSize(), actionSrc ); tree.dive( this ); for (String s : opsAndMultiplier.keySet()) @@ -158,7 +158,7 @@ public class CraftingJob implements Runnable, ICraftingJob AELog.crafting( "------------- " + getByteTotal() + "b real" + timer.elapsed( TimeUnit.MILLISECONDS ) + "ms" ); // if ( mode == Actionable.MODULATE ) - // meci.moveItemsToStorage( storage ); + // craftingInventory.moveItemsToStorage( storage ); } catch (CraftBranchFailure e) { @@ -167,13 +167,13 @@ public class CraftingJob implements Runnable, ICraftingJob try { Stopwatch timer = Stopwatch.createStarted(); - MECraftingInventory meci = new MECraftingInventory( original, true, false, true ); - meci.ignore( output ); + MECraftingInventory craftingInventory = new MECraftingInventory( original, true, false, true ); + craftingInventory.ignore( output ); availableCheck = new MECraftingInventory( original, false, false, false ); tree.setSimulate(); - tree.request( meci, output.getStackSize(), actionSrc ); + tree.request( craftingInventory, output.getStackSize(), actionSrc ); tree.dive( this ); for (String s : opsAndMultiplier.keySet()) @@ -300,7 +300,7 @@ public class CraftingJob implements Runnable, ICraftingJob private int incTime = Integer.MAX_VALUE; - public void handlepausing() throws InterruptedException + public void handlePausing() throws InterruptedException { if ( incTime++ > 100 ) { diff --git a/src/main/java/appeng/crafting/CraftingTreeNode.java b/src/main/java/appeng/crafting/CraftingTreeNode.java index 864c9231..8c113a27 100644 --- a/src/main/java/appeng/crafting/CraftingTreeNode.java +++ b/src/main/java/appeng/crafting/CraftingTreeNode.java @@ -93,7 +93,7 @@ public class CraftingTreeNode public IAEItemStack request(MECraftingInventory inv, long l, BaseActionSource src) throws CraftBranchFailure, InterruptedException { - job.handlepausing(); + job.handlePausing(); List thingsUsed = new LinkedList(); diff --git a/src/main/java/appeng/crafting/CraftingTreeProcess.java b/src/main/java/appeng/crafting/CraftingTreeProcess.java index 52c89a95..dc18961b 100644 --- a/src/main/java/appeng/crafting/CraftingTreeProcess.java +++ b/src/main/java/appeng/crafting/CraftingTreeProcess.java @@ -31,7 +31,7 @@ public class CraftingTreeProcess long crafts = 0; boolean containerItems; boolean limitQty; - boolean fullsimulation; + boolean fullSimulation; private long bytes = 0; final private int depth; @@ -61,7 +61,7 @@ public class CraftingTreeProcess { ItemStack g = ic.getStackInSlot( x ); if ( g != null && g.stackSize > 1 ) - fullsimulation = true; + fullSimulation = true; } for ( IAEItemStack part : details.getCondensedInputs() ) @@ -100,8 +100,8 @@ public class CraftingTreeProcess { for (int x = 0; x < list.length; x++) { - IAEItemStack ppart = list[x]; - if ( part != null && part.equals( ppart ) ) + IAEItemStack comparePart = list[x]; + if ( part != null && part.equals( comparePart ) ) { // use the first slot... nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() ); @@ -142,7 +142,7 @@ public class CraftingTreeProcess long getTimes(long remaining, long stackSize) { - if ( limitQty || fullsimulation ) + if ( limitQty || fullSimulation ) return 1; return (remaining / stackSize) + (remaining % stackSize != 0 ? 1 : 0); } @@ -175,9 +175,9 @@ public class CraftingTreeProcess public void request(MECraftingInventory inv, long i, BaseActionSource src) throws CraftBranchFailure, InterruptedException { - job.handlepausing(); + job.handlePausing(); - if ( fullsimulation ) + if ( fullSimulation ) { InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 ); diff --git a/src/main/java/appeng/entity/EntityGrowingCrystal.java b/src/main/java/appeng/entity/EntityGrowingCrystal.java index e80c65a6..e32931d5 100644 --- a/src/main/java/appeng/entity/EntityGrowingCrystal.java +++ b/src/main/java/appeng/entity/EntityGrowingCrystal.java @@ -121,28 +121,28 @@ final public class EntityGrowingCrystal extends EntityItem int qty = 0; - if ( isAccel( x + 1, y, z ) ) + if ( isAccelerated( x + 1, y, z ) ) qty += per + qty * mul; - if ( isAccel( x, y + 1, z ) ) + if ( isAccelerated( x, y + 1, z ) ) qty += per + qty * mul; - if ( isAccel( x, y, z + 1 ) ) + if ( isAccelerated( x, y, z + 1 ) ) qty += per + qty * mul; - if ( isAccel( x - 1, y, z ) ) + if ( isAccelerated( x - 1, y, z ) ) qty += per + qty * mul; - if ( isAccel( x, y - 1, z ) ) + if ( isAccelerated( x, y - 1, z ) ) qty += per + qty * mul; - if ( isAccel( x, y, z - 1 ) ) + if ( isAccelerated( x, y, z - 1 ) ) qty += per + qty * mul; return qty; } - private boolean isAccel(int x, int y, int z) + private boolean isAccelerated(int x, int y, int z) { TileEntity te = worldObj.getTileEntity( x, y, z ); if ( te instanceof ICrystalGrowthAccelerator ) diff --git a/src/main/java/appeng/entity/EntityTinyTNTPrimed.java b/src/main/java/appeng/entity/EntityTinyTNTPrimed.java index 8fecfe5c..0b8d93f9 100644 --- a/src/main/java/appeng/entity/EntityTinyTNTPrimed.java +++ b/src/main/java/appeng/entity/EntityTinyTNTPrimed.java @@ -30,8 +30,8 @@ final public class EntityTinyTNTPrimed extends EntityTNTPrimed implements IEntit this.setSize( 0.35F, 0.35F ); } - public EntityTinyTNTPrimed(World w, double x, double y, double z, EntityLivingBase ignitor) { - super( w, x, y, z, ignitor ); + public EntityTinyTNTPrimed(World w, double x, double y, double z, EntityLivingBase igniter) { + super( w, x, y, z, igniter ); this.setSize( 0.55F, 0.55F ); this.yOffset = this.height / 2.0F; } diff --git a/src/main/java/appeng/facade/FacadeContainer.java b/src/main/java/appeng/facade/FacadeContainer.java index 58c6dc42..a83f0367 100644 --- a/src/main/java/appeng/facade/FacadeContainer.java +++ b/src/main/java/appeng/facade/FacadeContainer.java @@ -79,7 +79,7 @@ public class FacadeContainer implements IFacadeContainer else if ( !isBC ) { ItemFacade ifa = (ItemFacade) AEApi.instance().items().itemFacade.item(); - ItemStack facade = ifa.createFromInts( ids ); + ItemStack facade = ifa.createFromIDs( ids ); if ( facade != null ) { changed = changed || storage.getFacade( x ) == null; @@ -180,18 +180,18 @@ public class FacadeContainer implements IFacadeContainer public void rotateLeft() { - IFacadePart newfacades[] = new FacadePart[6]; + IFacadePart newFacades[] = new FacadePart[6]; - newfacades[ForgeDirection.UP.ordinal()] = storage.getFacade( ForgeDirection.UP.ordinal() ); - newfacades[ForgeDirection.DOWN.ordinal()] = storage.getFacade( ForgeDirection.DOWN.ordinal() ); + newFacades[ForgeDirection.UP.ordinal()] = storage.getFacade( ForgeDirection.UP.ordinal() ); + newFacades[ForgeDirection.DOWN.ordinal()] = storage.getFacade( ForgeDirection.DOWN.ordinal() ); - newfacades[ForgeDirection.EAST.ordinal()] = storage.getFacade( ForgeDirection.NORTH.ordinal() ); - newfacades[ForgeDirection.SOUTH.ordinal()] = storage.getFacade( ForgeDirection.EAST.ordinal() ); + newFacades[ForgeDirection.EAST.ordinal()] = storage.getFacade( ForgeDirection.NORTH.ordinal() ); + newFacades[ForgeDirection.SOUTH.ordinal()] = storage.getFacade( ForgeDirection.EAST.ordinal() ); - newfacades[ForgeDirection.WEST.ordinal()] = storage.getFacade( ForgeDirection.SOUTH.ordinal() ); - newfacades[ForgeDirection.NORTH.ordinal()] = storage.getFacade( ForgeDirection.WEST.ordinal() ); + newFacades[ForgeDirection.WEST.ordinal()] = storage.getFacade( ForgeDirection.SOUTH.ordinal() ); + newFacades[ForgeDirection.NORTH.ordinal()] = storage.getFacade( ForgeDirection.WEST.ordinal() ); for (int x = 0; x < facades; x++) - storage.setFacade( x, newfacades[x] ); + storage.setFacade( x, newFacades[x] ); } } diff --git a/src/main/java/appeng/fmp/CableBusPart.java b/src/main/java/appeng/fmp/CableBusPart.java index 1b0d9b5a..1e7034c2 100644 --- a/src/main/java/appeng/fmp/CableBusPart.java +++ b/src/main/java/appeng/fmp/CableBusPart.java @@ -154,8 +154,8 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds { if ( len > 0 ) { - ByteBuf bybuff = Unpooled.wrappedBuffer( data ); - cb.readFromStream( bybuff ); + ByteBuf byteBuffer = Unpooled.wrappedBuffer( data ); + cb.readFromStream( byteBuffer ); } } catch (IOException e) @@ -169,7 +169,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds { AxisAlignedBB b = null; - for (AxisAlignedBB bx : cb.getSelectedBoundingBoxsFromPool( false, true, null, true )) + for (AxisAlignedBB bx : cb.getSelectedBoundingBoxesFromPool( false, true, null, true )) { if ( b == null ) b = bx; @@ -403,16 +403,16 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds } @Override - public boolean occlusionTest(TMultiPart npart) + public boolean occlusionTest(TMultiPart part) { - return NormalOcclusionTest.apply( this, npart ); + return NormalOcclusionTest.apply( this, part ); } @Override public Iterable getCollisionBoxes() { LinkedList l = new LinkedList(); - for (AxisAlignedBB b : cb.getSelectedBoundingBoxsFromPool( false, true, null, false )) + for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( false, true, null, false )) { l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) ); } @@ -435,7 +435,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds public Iterable getOcclusionBoxes() { LinkedList l = new LinkedList(); - for (AxisAlignedBB b : cb.getSelectedBoundingBoxsFromPool( true, disableFacadeOcclusion.get() == null, null, true )) + for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( true, disableFacadeOcclusion.get() == null, null, true )) { l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) ); } diff --git a/src/main/java/appeng/helpers/DualityInterface.java b/src/main/java/appeng/helpers/DualityInterface.java index 4c4d8e99..90477062 100644 --- a/src/main/java/appeng/helpers/DualityInterface.java +++ b/src/main/java/appeng/helpers/DualityInterface.java @@ -58,7 +58,7 @@ import appeng.core.settings.TickRates; import appeng.me.GridAccessException; import appeng.me.helpers.AENetworkProxy; import appeng.me.storage.MEMonitorIInventory; -import appeng.me.storage.MEMonitorPassthu; +import appeng.me.storage.MEMonitorPassThrough; import appeng.me.storage.NullInventory; import appeng.parts.automation.UpgradeInventory; import appeng.tile.inventory.AppEngInternalAEInventory; @@ -196,8 +196,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt } } - public DualityInterface(AENetworkProxy prox, IInterfaceHost ih) { - gridProxy = prox; + public DualityInterface(AENetworkProxy networkProxy, IInterfaceHost ih) { + gridProxy = networkProxy; gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL ); upgrades = new UpgradeInventory( gridProxy.getMachineRepresentation(), this, 1 ); @@ -250,7 +250,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt } } - notifyNeightbors(); + notifyNeighbors(); } public void writeToNBT(NBTTagCompound data) @@ -513,8 +513,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt return patterns; } - MEMonitorPassthu items = new MEMonitorPassthu( new NullInventory(), StorageChannel.ITEMS ); - MEMonitorPassthu fluids = new MEMonitorPassthu( new NullInventory(), StorageChannel.FLUIDS ); + MEMonitorPassThrough items = new MEMonitorPassThrough( new NullInventory(), StorageChannel.ITEMS ); + MEMonitorPassThrough fluids = new MEMonitorPassThrough( new NullInventory(), StorageChannel.FLUIDS ); public void gridChanged() { @@ -529,7 +529,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt fluids.setInternal( new NullInventory() ); } - notifyNeightbors(); + notifyNeighbors(); } public AECableType getCableConnectionType(ForgeDirection dir) @@ -936,7 +936,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt drops.add( is ); } - public void notifyNeightbors() + public void notifyNeighbors() { if ( gridProxy.isActive() ) { diff --git a/src/main/java/appeng/helpers/InventoryAction.java b/src/main/java/appeng/helpers/InventoryAction.java index 26e689e0..09a1f82b 100644 --- a/src/main/java/appeng/helpers/InventoryAction.java +++ b/src/main/java/appeng/helpers/InventoryAction.java @@ -3,11 +3,11 @@ package appeng.helpers; public enum InventoryAction { // standard vanilla mechanics. - PICKUP_OR_SETDOWN, SPLIT_OR_PLACESINGLE, CREATIVE_DUPLICATE, SHIFT_CLICK, + PICKUP_OR_SET_DOWN, SPLIT_OR_PLACE_SINGLE, CREATIVE_DUPLICATE, SHIFT_CLICK, // crafting term CRAFT_STACK, CRAFT_ITEM, CRAFT_SHIFT, // extra... - MOVE_REGION, PICKUP_SINGLE, UPDATE_HAND, ROLLUP, ROLLDOWN, AUTOCRAFT, PLACE_SINGLE + MOVE_REGION, PICKUP_SINGLE, UPDATE_HAND, ROLL_UP, ROLL_DOWN, AUTO_CRAFT, PLACE_SINGLE } diff --git a/src/main/java/appeng/helpers/MeteoritePlacer.java b/src/main/java/appeng/helpers/MeteoritePlacer.java index 65a5c1b4..39405214 100644 --- a/src/main/java/appeng/helpers/MeteoritePlacer.java +++ b/src/main/java/appeng/helpers/MeteoritePlacer.java @@ -30,7 +30,7 @@ public class MeteoritePlacer private class Fallout { - public int adjustCrator() + public int adjustCrater() { return 0; } @@ -111,7 +111,7 @@ public class MeteoritePlacer super( w, x, y, z ); } - public int adjustCrator() + public int adjustCrater() { return 2; } @@ -131,7 +131,7 @@ public class MeteoritePlacer super( w, x, y, z ); } - public int adjustCrator() + public int adjustCrater() { return 2; } @@ -381,10 +381,10 @@ public class MeteoritePlacer Block skychest; double real_sizeOfMeteorite = (Math.random() * 6.0) + 2; - double real_crator = real_sizeOfMeteorite * 2 + 5; + double realCrater = real_sizeOfMeteorite * 2 + 5; double sizeOfMeteorite = real_sizeOfMeteorite * real_sizeOfMeteorite; - double crator = real_crator * real_crator; + double crater = realCrater * realCrater; public MeteoritePlacer() { @@ -431,9 +431,9 @@ public class MeteoritePlacer int z = settings.getInteger( "z" ); real_sizeOfMeteorite = settings.getDouble( "real_sizeOfMeteorite" ); - real_crator = settings.getDouble( "real_crator" ); + realCrater = settings.getDouble( "realCrater" ); sizeOfMeteorite = settings.getDouble( "sizeOfMeteorite" ); - crator = settings.getDouble( "crator" ); + crater = settings.getDouble( "crater" ); Block blk = Block.getBlockById( settings.getInteger( "blk" ) ); @@ -448,7 +448,7 @@ public class MeteoritePlacer // creator if ( skyMode > 10 ) - placeCrator( w, x, y, z ); + placeCrater( w, x, y, z ); placeMeteorite( w, x, y, z ); @@ -486,9 +486,9 @@ public class MeteoritePlacer settings.setInteger( "blk", Block.getIdFromBlock( blk ) ); settings.setDouble( "real_sizeOfMeteorite", real_sizeOfMeteorite ); - settings.setDouble( "real_crator", real_crator ); + settings.setDouble( "realCrater", realCrater ); settings.setDouble( "sizeOfMeteorite", sizeOfMeteorite ); - settings.setDouble( "crator", crator ); + settings.setDouble( "crater", crater ); settings.setBoolean( "lava", Math.random() > 0.9 ); @@ -547,7 +547,7 @@ public class MeteoritePlacer // creator if ( skyMode > 10 ) - placeCrator( w, x, y, z ); + placeCrater( w, x, y, z ); placeMeteorite( w, x, y, z ); @@ -564,7 +564,7 @@ public class MeteoritePlacer return false; } - private void placeCrator(IMeteoriteWorld w, int x, int y, int z) + private void placeCrater(IMeteoriteWorld w, int x, int y, int z) { boolean lava = settings.getBoolean( "lava" ); @@ -583,7 +583,7 @@ public class MeteoritePlacer { double dx = i - x; double dz = k - z; - double h = y - real_sizeOfMeteorite + 1 + type.adjustCrator(); + double h = y - real_sizeOfMeteorite + 1 + type.adjustCrater(); double distanceFrom = dx * dx + dz * dz; @@ -610,15 +610,15 @@ public class MeteoritePlacer private void placeMeteorite(IMeteoriteWorld w, int x, int y, int z) { - int Xmeteor_l = w.minX( x - 8 ); - int Xmeteor_h = w.maxX( x + 8 ); - int Zmeteor_l = w.minZ( z - 8 ); - int Zmeteor_h = w.maxZ( z + 8 ); + int meteorXLength = w.minX( x - 8 ); + int meteorXHeight = w.maxX( x + 8 ); + int meteorZLength = w.minZ( z - 8 ); + int meteorZHeight = w.maxZ( z + 8 ); - // spawn metor - for (int i = Xmeteor_l; i < Xmeteor_h; i++) + // spawn meteor + for (int i = meteorXLength; i < meteorXHeight; i++) for (int j = y - 8; j < y + 8; j++) - for (int k = Zmeteor_l; k < Zmeteor_h; k++) + for (int k = meteorZLength; k < meteorZHeight; k++) { double dx = i - x; double dy = j - y; @@ -724,13 +724,13 @@ public class MeteoritePlacer { double randomShit = 0; - int Xmeteor_l = w.minX( x - 30 ); - int Xmeteor_h = w.maxX( x + 30 ); - int Zmeteor_l = w.minZ( z - 30 ); - int Zmeteor_h = w.maxZ( z + 30 ); + int meteorXLength = w.minX( x - 30 ); + int meteorXHeight = w.maxX( x + 30 ); + int meteorZLength = w.minZ( z - 30 ); + int meteorZHeight = w.maxZ( z + 30 ); - for (int i = Xmeteor_l; i < Xmeteor_h; i++) - for (int k = Zmeteor_l; k < Zmeteor_h; k++) + for (int i = meteorXLength; i < meteorXHeight; i++) + for (int k = meteorZLength; k < meteorZHeight; k++) for (int j = y - 9; j < y + 30; j++) { Block blk = w.getBlock( i, j, k ); @@ -749,7 +749,7 @@ public class MeteoritePlacer w.setBlock( i, j, k, blk_b, meta_b, 3 ); w.setBlock( i, j + 1, k, blk ); } - else if ( randomShit < 100 * crator ) + else if ( randomShit < 100 * crater ) { double dx = i - x; double dy = j - y; @@ -759,8 +759,8 @@ public class MeteoritePlacer Block xf = w.getBlock( i, j - 1, k ); if ( !xf.isReplaceable( w.getWorld(), i, j - 1, k ) ) { - double extrRange = Math.random() * 0.6; - double height = crator * (extrRange + 0.2) - Math.abs( dist - crator * 1.7 ); + double extraRange = Math.random() * 0.6; + double height = crater * (extraRange + 0.2) - Math.abs( dist - crater * 1.7 ); if ( xf != blk && height > 0 && Math.random() > 0.6 ) { @@ -782,7 +782,7 @@ public class MeteoritePlacer double dy = j - y; double dz = k - z; - if ( dx * dx + dy * dy + dz * dz < crator * 1.6 ) + if ( dx * dx + dy * dy + dz * dz < crater * 1.6 ) { type.getRandomInset( w, i, j, k ); } diff --git a/src/main/java/appeng/helpers/MultiCraftingTracker.java b/src/main/java/appeng/helpers/MultiCraftingTracker.java index 48f6748b..433597e8 100644 --- a/src/main/java/appeng/helpers/MultiCraftingTracker.java +++ b/src/main/java/appeng/helpers/MultiCraftingTracker.java @@ -62,19 +62,19 @@ public class MultiCraftingTracker { if ( ais != null && d.simulateAdd( ais.getItemStack() ) == null ) { - Future cjob = getJob( x ); + Future craftingJob = getJob( x ); if ( getLink( x ) != null ) { return false; } - else if ( cjob != null ) + else if ( craftingJob != null ) { ICraftingJob job = null; try { - if ( cjob.isDone() ) - job = cjob.get(); - else if ( cjob.isCancelled() ) + if ( craftingJob.isDone() ) + job = craftingJob.get(); + else if ( craftingJob.isCancelled() ) job = null; if ( job != null ) diff --git a/src/main/java/appeng/helpers/PatternHelper.java b/src/main/java/appeng/helpers/PatternHelper.java index 14fa708b..d0e62712 100644 --- a/src/main/java/appeng/helpers/PatternHelper.java +++ b/src/main/java/appeng/helpers/PatternHelper.java @@ -25,7 +25,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable in = new ArrayList(); List out = new ArrayList(); @@ -331,13 +331,13 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable> 4; cdy = y >> 5; @@ -38,25 +38,25 @@ public class CompassManager @Override public boolean equals(Object obj) { - CompassReq b = (CompassReq) obj; + CompassRequest b = (CompassRequest) obj; return attunement == b.attunement && cx == b.cx && cdy == b.cdy && cz == b.cz; } } - HashMap reqs = new HashMap(); + HashMap requests = new HashMap(); - public void postResult(long attunement, int x, int y, int z, CompassResult res) + public void postResult(long attunement, int x, int y, int z, CompassResult result) { - CompassReq r = new CompassReq( attunement, x, y, z ); - reqs.put( r, res ); + CompassRequest r = new CompassRequest( attunement, x, y, z ); + requests.put( r, result ); } public CompassResult getCompassDirection(long attunement, int x, int y, int z) { long now = System.currentTimeMillis(); - Iterator i = reqs.values().iterator(); + Iterator i = requests.values().iterator(); while (i.hasNext()) { CompassResult res = i.next(); @@ -65,13 +65,13 @@ public class CompassManager i.remove(); } - CompassReq r = new CompassReq( attunement, x, y, z ); - CompassResult res = reqs.get( r ); + CompassRequest r = new CompassRequest( attunement, x, y, z ); + CompassResult res = requests.get( r ); if ( res == null ) { res = new CompassResult( false, true, 0 ); - reqs.put( r, res ); + requests.put( r, res ); requestUpdate( r ); } else if ( now - res.time > 1000 * 3 ) @@ -86,7 +86,7 @@ public class CompassManager return res; } - private void requestUpdate(CompassReq r) + private void requestUpdate(CompassRequest r) { try diff --git a/src/main/java/appeng/hooks/DispenserBehaviorTinyTNT.java b/src/main/java/appeng/hooks/DispenserBehaviorTinyTNT.java index 80172afa..b7ec16a9 100644 --- a/src/main/java/appeng/hooks/DispenserBehaviorTinyTNT.java +++ b/src/main/java/appeng/hooks/DispenserBehaviorTinyTNT.java @@ -20,9 +20,9 @@ final public class DispenserBehaviorTinyTNT extends BehaviorDefaultDispenseItem int i = dispenser.getXInt() + enumfacing.getFrontOffsetX(); int j = dispenser.getYInt() + enumfacing.getFrontOffsetY(); int k = dispenser.getZInt() + enumfacing.getFrontOffsetZ(); - EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), + EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), (EntityLiving) null ); - world.spawnEntityInWorld( entitytntprimed ); + world.spawnEntityInWorld( primedTinyTNTEntity ); --dispensedItem.stackSize; return dispensedItem; } diff --git a/src/main/java/appeng/hooks/IBlockTool.java b/src/main/java/appeng/hooks/IBlockTool.java index ee707ae0..9b80dd02 100644 --- a/src/main/java/appeng/hooks/IBlockTool.java +++ b/src/main/java/appeng/hooks/IBlockTool.java @@ -7,6 +7,6 @@ import net.minecraft.world.World; public interface IBlockTool { - boolean onItemUse(ItemStack dispensedItem, EntityPlayer player, World w, int x, int y, int z, int ordinal, float hitx, float hity, float hitz); + boolean onItemUse(ItemStack dispensedItem, EntityPlayer player, World w, int x, int y, int z, int ordinal, float hitX, float hitY, float hitZ); } diff --git a/src/main/java/appeng/hooks/QuartzWorldGen.java b/src/main/java/appeng/hooks/QuartzWorldGen.java index f13b1c7b..851eeef3 100644 --- a/src/main/java/appeng/hooks/QuartzWorldGen.java +++ b/src/main/java/appeng/hooks/QuartzWorldGen.java @@ -35,19 +35,19 @@ final public class QuartzWorldGen implements IWorldGenerator @Override public void generate(Random r, int chunkX, int chunkZ, World w, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - int sealevel = w.provider.getAverageGroundLevel() + 1; + int seaLevel = w.provider.getAverageGroundLevel() + 1; - if ( sealevel < 20 ) + if ( seaLevel < 20 ) { int x = (chunkX << 4) + 8; int z = (chunkZ << 4) + 8; - sealevel = w.getHeightValue( x, z ); + seaLevel = w.getHeightValue( x, z ); } if ( oreNormal == null || oreCharged == null ) return; - double oreDepthMultiplier = AEConfig.instance.quartzOresClusterAmount * sealevel / 64; + double oreDepthMultiplier = AEConfig.instance.quartzOresClusterAmount * seaLevel / 64; int scale = (int) Math.round( r.nextGaussian() * Math.sqrt( oreDepthMultiplier ) + oreDepthMultiplier ); for (int x = 0; x < (r.nextBoolean() ? scale * 2 : scale) / 2; ++x) @@ -58,7 +58,7 @@ final public class QuartzWorldGen implements IWorldGenerator if ( WorldGenRegistry.instance.isWorldGenEnabled( isCharged ? WorldGenType.ChargedCertusQuartz : WorldGenType.CertusQuartz, w ) ) { int cx = chunkX * 16 + r.nextInt( 22 ); - int cy = r.nextInt( 40 * sealevel / 64 ) + r.nextInt( 22 * sealevel / 64 ) + 12 * sealevel / 64; + int cy = r.nextInt( 40 * seaLevel / 64 ) + r.nextInt( 22 * seaLevel / 64 ) + 12 * seaLevel / 64; int cz = chunkZ * 16 + r.nextInt( 22 ); whichOre.generate( w, r, cx, cy, cz ); } diff --git a/src/main/java/appeng/integration/IntegrationNode.java b/src/main/java/appeng/integration/IntegrationNode.java index 5f728dd3..776475be 100644 --- a/src/main/java/appeng/integration/IntegrationNode.java +++ b/src/main/java/appeng/integration/IntegrationNode.java @@ -10,8 +10,8 @@ import cpw.mods.fml.common.Loader; public class IntegrationNode { - IntegrationStage state = IntegrationStage.PREINIT; - IntegrationStage failedStage = IntegrationStage.PREINIT; + IntegrationStage state = IntegrationStage.PRE_INIT; + IntegrationStage failedStage = IntegrationStage.PRE_INIT; Throwable exception = null; String displayName; @@ -23,11 +23,11 @@ public class IntegrationNode Object instance; IIntegrationModule mod = null; - public IntegrationNode(String dspname, String _modID, IntegrationType sName, String n) { - displayName = dspname; - shortName = sName; - modID = _modID; - name = n; + public IntegrationNode(String displayName, String modID, IntegrationType shortName, String name) { + this.displayName = displayName; + this.shortName = shortName; + this.modID = modID; + this.name = name; } @Override @@ -47,7 +47,7 @@ public class IntegrationNode { switch (stage) { - case PREINIT: + case PRE_INIT: boolean enabled = modID == null || Loader.isModLoaded( modID ); @@ -77,10 +77,10 @@ public class IntegrationNode break; case INIT: mod.Init(); - state = IntegrationStage.POSTINIT; + state = IntegrationStage.POST_INIT; break; - case POSTINIT: + case POST_INIT: mod.PostInit(); state = IntegrationStage.READY; @@ -98,7 +98,7 @@ public class IntegrationNode } } - if ( stage == IntegrationStage.POSTINIT ) + if ( stage == IntegrationStage.POST_INIT ) { if ( state == IntegrationStage.FAILED ) { @@ -115,8 +115,8 @@ public class IntegrationNode public boolean isActive() { - if ( state == IntegrationStage.PREINIT ) - Call( IntegrationStage.PREINIT ); + if ( state == IntegrationStage.PRE_INIT ) + Call( IntegrationStage.PRE_INIT ); return state != IntegrationStage.FAILED; } diff --git a/src/main/java/appeng/integration/IntegrationRegistry.java b/src/main/java/appeng/integration/IntegrationRegistry.java index 9d459317..b21f3c44 100644 --- a/src/main/java/appeng/integration/IntegrationRegistry.java +++ b/src/main/java/appeng/integration/IntegrationRegistry.java @@ -29,16 +29,16 @@ public class IntegrationRegistry public void init() { for (IntegrationNode node : modules) - node.Call( IntegrationStage.PREINIT ); + node.Call( IntegrationStage.PRE_INIT ); for (IntegrationNode node : modules) node.Call( IntegrationStage.INIT ); } - public void postinit() + public void postInit() { for (IntegrationNode node : modules) - node.Call( IntegrationStage.POSTINIT ); + node.Call( IntegrationStage.POST_INIT ); } public String getStatus() diff --git a/src/main/java/appeng/integration/IntegrationStage.java b/src/main/java/appeng/integration/IntegrationStage.java index 24b0ece0..ea11e163 100644 --- a/src/main/java/appeng/integration/IntegrationStage.java +++ b/src/main/java/appeng/integration/IntegrationStage.java @@ -3,7 +3,7 @@ package appeng.integration; public enum IntegrationStage { - PREINIT, INIT, POSTINIT, + PRE_INIT, INIT, POST_INIT, FAILED, READY diff --git a/src/main/java/appeng/integration/abstraction/INEI.java b/src/main/java/appeng/integration/abstraction/INEI.java index 1c69dceb..5fa2c7dd 100644 --- a/src/main/java/appeng/integration/abstraction/INEI.java +++ b/src/main/java/appeng/integration/abstraction/INEI.java @@ -8,6 +8,6 @@ public interface INEI void drawSlot(Slot s); - RenderItem setItemRender(RenderItem aeri2); + RenderItem setItemRender(RenderItem renderItem); } diff --git a/src/main/java/appeng/integration/abstraction/helpers/BaseMJperdition.java b/src/main/java/appeng/integration/abstraction/helpers/BaseMJperdition.java index c56ff065..12da6724 100644 --- a/src/main/java/appeng/integration/abstraction/helpers/BaseMJperdition.java +++ b/src/main/java/appeng/integration/abstraction/helpers/BaseMJperdition.java @@ -4,7 +4,7 @@ import net.minecraft.nbt.NBTTagCompound; import appeng.transformer.annotations.integration.Method; import buildcraft.api.power.PowerHandler.PowerReceiver; -public abstract class BaseMJperdition +public abstract class BaseMJPerdition { @Method(iname = "MJ5") diff --git a/src/main/java/appeng/integration/modules/BC.java b/src/main/java/appeng/integration/modules/BC.java index 31f17d86..51c6e48e 100644 --- a/src/main/java/appeng/integration/modules/BC.java +++ b/src/main/java/appeng/integration/modules/BC.java @@ -237,14 +237,14 @@ public class BC extends BaseModule implements IBC { SchematicRegistry.declareBlueprintSupport( AppEng.modid ); - Blocks blks = AEApi.instance().blocks(); - Block cable = blks.blockMultiPart.block(); - for (Field f : blks.getClass().getFields()) + Blocks blocks = AEApi.instance().blocks(); + Block cable = blocks.blockMultiPart.block(); + for (Field f : blocks.getClass().getFields()) { AEItemDefinition def; try { - def = (AEItemDefinition) f.get( blks ); + def = (AEItemDefinition) f.get( blocks ); if ( def != null ) { Block myBlock = def.block(); diff --git a/src/main/java/appeng/integration/modules/DSU.java b/src/main/java/appeng/integration/modules/DSU.java index 83002ef1..b76d9a3e 100644 --- a/src/main/java/appeng/integration/modules/DSU.java +++ b/src/main/java/appeng/integration/modules/DSU.java @@ -1,12 +1,12 @@ package appeng.integration.modules; +import appeng.integration.modules.helpers.MinefactoryReloadedDeepStorageUnit; import net.minecraft.tileentity.TileEntity; import powercrystals.minefactoryreloaded.api.IDeepStorageUnit; import appeng.api.AEApi; import appeng.api.storage.IMEInventory; import appeng.integration.BaseModule; import appeng.integration.abstraction.IDSU; -import appeng.integration.modules.helpers.MFRDSU; import appeng.integration.modules.helpers.MFRDSUHandler; public class DSU extends BaseModule implements IDSU @@ -17,7 +17,7 @@ public class DSU extends BaseModule implements IDSU @Override public IMEInventory getDSU(TileEntity te) { - return new MFRDSU( te ); + return new MinefactoryReloadedDeepStorageUnit( te ); } @Override diff --git a/src/main/java/appeng/integration/modules/ImmibisMicroblocks.java b/src/main/java/appeng/integration/modules/ImmibisMicroblocks.java index 400f5e31..68cb31a1 100644 --- a/src/main/java/appeng/integration/modules/ImmibisMicroblocks.java +++ b/src/main/java/appeng/integration/modules/ImmibisMicroblocks.java @@ -88,7 +88,7 @@ public class ImmibisMicroblocks extends BaseModule implements IImmibisMicroblock catch (Throwable e) { canConvertTiles = false; - return null; // nevermind.. + return null; } TileEntity tx = w.getTileEntity( x, y, z ); diff --git a/src/main/java/appeng/integration/modules/MJ6.java b/src/main/java/appeng/integration/modules/MJ6.java index 83534c76..b34a596b 100644 --- a/src/main/java/appeng/integration/modules/MJ6.java +++ b/src/main/java/appeng/integration/modules/MJ6.java @@ -40,8 +40,8 @@ public class MJ6 extends BaseModule implements IMJ6 { if ( te instanceof IPowerReceptor ) { - final IPowerReceptor recp = (IPowerReceptor) te; - final PowerReceiver ph = recp.getPowerReceiver( side ); + final IPowerReceptor receptor = (IPowerReceptor) te; + final PowerReceiver ph = receptor.getPowerReceiver( side ); if ( ph == null ) return null; diff --git a/src/main/java/appeng/integration/modules/NEI.java b/src/main/java/appeng/integration/modules/NEI.java index 80898676..58e12107 100644 --- a/src/main/java/appeng/integration/modules/NEI.java +++ b/src/main/java/appeng/integration/modules/NEI.java @@ -114,12 +114,12 @@ public class NEI extends BaseModule implements IIntegrationModule, INEI, IContai } @Override - public RenderItem setItemRender(RenderItem aeri2) + public RenderItem setItemRender(RenderItem renderItem) { try { RenderItem ri = GuiContainerManager.drawItems; - GuiContainerManager.drawItems = aeri2; + GuiContainerManager.drawItems = renderItem; return ri; } catch (Throwable t) @@ -135,12 +135,12 @@ public class NEI extends BaseModule implements IIntegrationModule, INEI, IContai } @Override - public List handleItemTooltip(GuiContainer guiScreen, ItemStack stack, int mousex, int mousey, List currenttip) + public List handleItemTooltip(GuiContainer guiScreen, ItemStack stack, int mouseX, int mouseY, List currentToolTip) { if ( guiScreen instanceof AEBaseMEGui ) - return ((AEBaseMEGui) guiScreen).handleItemTooltip( stack, mousex, mousey, currenttip ); + return ((AEBaseMEGui) guiScreen).handleItemTooltip( stack, mouseX, mouseY, currentToolTip ); - return currenttip; + return currentToolTip; } @Override diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java index 00296175..5037ccc3 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapedRecipeHandler.java @@ -50,16 +50,16 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler { if ( (outputId.equals( "crafting" )) && (getClass() == NEIAEShapedRecipeHandler.class) ) { - List allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) + List recipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe recipe : recipes) { - if ( (irecipe instanceof ShapedRecipe) ) + if ( (recipe instanceof ShapedRecipe) ) { - if ( ((ShapedRecipe) irecipe).isEnabled() ) + if ( ((ShapedRecipe) recipe).isEnabled() ) { - CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe ); - recipe.computeVisuals(); - arecipes.add( recipe ); + CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe ); + cachedRecipe.computeVisuals(); + arecipes.add( cachedRecipe ); } } } @@ -72,16 +72,16 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler public void loadCraftingRecipes(ItemStack result) { - List allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) + List recipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe recipe : recipes) { - if ( (irecipe instanceof ShapedRecipe) ) + if ( (recipe instanceof ShapedRecipe) ) { - if ( ((ShapedRecipe) irecipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( irecipe.getRecipeOutput(), result ) ) + if ( ((ShapedRecipe) recipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( recipe.getRecipeOutput(), result ) ) { - CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe ); - recipe.computeVisuals(); - arecipes.add( recipe ); + CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe ); + cachedRecipe.computeVisuals(); + arecipes.add( cachedRecipe ); } } } @@ -89,20 +89,20 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler public void loadUsageRecipes(ItemStack ingredient) { - List allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) + List recipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe recipe : recipes) { - if ( (irecipe instanceof ShapedRecipe) ) + if ( (recipe instanceof ShapedRecipe) ) { - CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe ); + CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe ); - if ( ((ShapedRecipe) irecipe).isEnabled() && recipe.contains( recipe.ingredients, ingredient.getItem() ) ) + if ( ((ShapedRecipe) recipe).isEnabled() && cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() ) ) { - recipe.computeVisuals(); - if ( recipe.contains( recipe.ingredients, ingredient ) ) + cachedRecipe.computeVisuals(); + if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) ) { - recipe.setIngredientPermutation( recipe.ingredients, ingredient ); - arecipes.add( recipe ); + cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient ); + arecipes.add( cachedRecipe ); } } } @@ -165,10 +165,10 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler public ArrayList ingredients; public PositionedStack result; - public CachedShapedRecipe(ShapedRecipe irecipe) { - result = new PositionedStack( irecipe.getRecipeOutput(), 119, 24 ); + public CachedShapedRecipe(ShapedRecipe recipe) { + result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 ); ingredients = new ArrayList(); - setIngredients( irecipe.getWidth(), irecipe.getHeight(), irecipe.getIngredients() ); + setIngredients( recipe.getWidth(), recipe.getHeight(), recipe.getIngredients() ); } public void setIngredients(int width, int height, Object[] items) diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java index 2d4f3537..4705f47e 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIAEShapelessRecipeHandler.java @@ -50,16 +50,16 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler { if ( (outputId.equals( "crafting" )) && (getClass() == NEIAEShapelessRecipeHandler.class) ) { - List allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) + List recipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe recipe : recipes) { - if ( (irecipe instanceof ShapelessRecipe) ) + if ( (recipe instanceof ShapelessRecipe) ) { - if ( ((ShapelessRecipe) irecipe).isEnabled() ) + if ( ((ShapelessRecipe) recipe).isEnabled() ) { - CachedShapelessRecipe recipe = new CachedShapelessRecipe( (ShapelessRecipe) irecipe ); - recipe.computeVisuals(); - this.arecipes.add( recipe ); + CachedShapelessRecipe cachedRecipe = new CachedShapelessRecipe( (ShapelessRecipe) recipe ); + cachedRecipe.computeVisuals(); + this.arecipes.add( cachedRecipe ); } } } @@ -72,16 +72,16 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler public void loadCraftingRecipes(ItemStack result) { - List allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) + List recipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe recipe : recipes) { - if ( (irecipe instanceof ShapelessRecipe) ) + if ( (recipe instanceof ShapelessRecipe) ) { - if ( ((ShapelessRecipe) irecipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( irecipe.getRecipeOutput(), result ) ) + if ( ((ShapelessRecipe) recipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( recipe.getRecipeOutput(), result ) ) { - CachedShapelessRecipe recipe = new CachedShapelessRecipe( (ShapelessRecipe) irecipe ); - recipe.computeVisuals(); - arecipes.add( recipe ); + CachedShapelessRecipe cachedRecipe = new CachedShapelessRecipe( (ShapelessRecipe) recipe ); + cachedRecipe.computeVisuals(); + arecipes.add( cachedRecipe ); } } } @@ -89,20 +89,20 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler public void loadUsageRecipes(ItemStack ingredient) { - List allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) + List recipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe recipe : recipes) { - if ( (irecipe instanceof ShapelessRecipe) ) + if ( (recipe instanceof ShapelessRecipe) ) { - CachedShapelessRecipe recipe = new CachedShapelessRecipe( (ShapelessRecipe) irecipe ); + CachedShapelessRecipe cachedRecipe = new CachedShapelessRecipe( (ShapelessRecipe) recipe ); - if ( ((ShapelessRecipe) irecipe).isEnabled() && recipe.contains( recipe.ingredients, ingredient.getItem() ) ) + if ( ((ShapelessRecipe) recipe).isEnabled() && cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() ) ) { - recipe.computeVisuals(); - if ( recipe.contains( recipe.ingredients, ingredient ) ) + cachedRecipe.computeVisuals(); + if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) ) { - recipe.setIngredientPermutation( recipe.ingredients, ingredient ); - this.arecipes.add( recipe ); + cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient ); + this.arecipes.add( cachedRecipe ); } } } @@ -165,10 +165,10 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler public ArrayList ingredients; public PositionedStack result; - public CachedShapelessRecipe(ShapelessRecipe irecipe) { - result = new PositionedStack( irecipe.getRecipeOutput(), 119, 24 ); + public CachedShapelessRecipe(ShapelessRecipe recipe) { + result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 ); ingredients = new ArrayList(); - setIngredients( irecipe.getInput().toArray() ); + setIngredients( recipe.getInput().toArray() ); } public void setIngredients(Object[] items) diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java index 166f7bb7..e3b54847 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEICraftingHandler.java @@ -24,12 +24,12 @@ public class NEICraftingHandler implements IOverlayHandler public NEICraftingHandler(int x, int y) { - offsetx = x; - offsety = y; + offsetX = x; + offsetY = y; } - int offsetx; - int offsety; + int offsetX; + int offsetY; @Override public void overlayRecipe(GuiContainer gui, IRecipeHandler recipe, int recipeIndex, boolean shift) @@ -57,10 +57,10 @@ public class NEICraftingHandler implements IOverlayHandler { for (int i = 0; i < ingredients.size(); i++)// identify slots { - PositionedStack pstack = ingredients.get( i ); - int col = (pstack.relx - 25) / 18; - int row = (pstack.rely - 6) / 18; - if ( pstack.items != null && pstack.items.length > 0 ) + PositionedStack positionedStack = ingredients.get( i ); + int col = (positionedStack.relx - 25) / 18; + int row = (positionedStack.rely - 6) / 18; + if ( positionedStack.items != null && positionedStack.items.length > 0 ) { for (Slot slot : (List) gui.inventorySlots.inventorySlots) { @@ -69,26 +69,26 @@ public class NEICraftingHandler implements IOverlayHandler Slot ctSlot = (Slot) slot; if ( ctSlot.getSlotIndex() == col + row * 3 ) { - NBTTagList ilist = new NBTTagList(); + NBTTagList tags = new NBTTagList(); List list = new LinkedList(); // prefer pure crystals. - for (int x = 0; x < pstack.items.length; x++) + for (int x = 0; x < positionedStack.items.length; x++) { - if ( Platform.isRecipePrioritized( pstack.items[x] ) ) - list.add( 0, pstack.items[x] ); + if ( Platform.isRecipePrioritized( positionedStack.items[x] ) ) + list.add( 0, positionedStack.items[x] ); else - list.add( pstack.items[x] ); + list.add( positionedStack.items[x] ); } for (ItemStack is : list) { - NBTTagCompound inbt = new NBTTagCompound(); - is.writeToNBT( inbt ); - ilist.appendTag( inbt ); + NBTTagCompound tag = new NBTTagCompound(); + is.writeToNBT( tag ); + tags.appendTag( tag ); } - recipe.setTag( "#" + ctSlot.getSlotIndex(), ilist ); + recipe.setTag( "#" + ctSlot.getSlotIndex(), tags ); break; } } diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java index 0e9a646e..f99e8d0b 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler.java @@ -45,12 +45,12 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler CachedRecipe cr = this.arecipes.get( recipe ); if ( cr instanceof CachedGrindStoneRecipe ) { - CachedGrindStoneRecipe cgsr = (CachedGrindStoneRecipe) cr; - if ( cgsr.hasOptional ) + CachedGrindStoneRecipe cachedRecipe = (CachedGrindStoneRecipe) cr; + if ( cachedRecipe.hasOptional ) { FontRenderer fr = Minecraft.getMinecraft().fontRenderer; - int width = fr.getStringWidth( cgsr.Chance ); - fr.drawString( cgsr.Chance, (168 - width) / 2, 5, 0 ); + int width = fr.getStringWidth( cachedRecipe.Chance ); + fr.drawString( cachedRecipe.Chance, (168 - width) / 2, 5, 0 ); } else { @@ -83,13 +83,13 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler { if ( (outputId.equals( "grindstone" )) && (getClass() == NEIGrinderRecipeHandler.class) ) { - for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes()) + for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes()) { - CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe ); - if ( recipe != null ) + CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe ); + if ( cachedRecipe != null ) { - recipe.computeVisuals(); - this.arecipes.add( recipe ); + cachedRecipe.computeVisuals(); + this.arecipes.add( cachedRecipe ); } } } @@ -101,30 +101,30 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler public void loadCraftingRecipes(ItemStack result) { - for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes()) + for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes()) { - if ( NEIServerUtils.areStacksSameTypeCrafting( irecipe.getOutput(), result ) ) + if ( NEIServerUtils.areStacksSameTypeCrafting( recipe.getOutput(), result ) ) { - CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe ); - recipe.computeVisuals(); - this.arecipes.add( recipe ); + CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe ); + cachedRecipe.computeVisuals(); + this.arecipes.add( cachedRecipe ); } } } public void loadUsageRecipes(ItemStack ingredient) { - for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes()) + for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes()) { - CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe ); + CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe ); - if ( (recipe != null) && (recipe.contains( recipe.ingredients, ingredient.getItem() )) ) + if ( (cachedRecipe != null) && (cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() )) ) { - recipe.computeVisuals(); - if ( recipe.contains( recipe.ingredients, ingredient ) ) + cachedRecipe.computeVisuals(); + if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) ) { - recipe.setIngredientPermutation( recipe.ingredients, ingredient ); - this.arecipes.add( recipe ); + cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient ); + this.arecipes.add( cachedRecipe ); } } } @@ -169,19 +169,19 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler boolean hasOptional = false; public String Chance; - public CachedGrindStoneRecipe(IGrinderEntry irecipe) { - result = new PositionedStack( irecipe.getOutput(), -30 + 107, 47 ); + public CachedGrindStoneRecipe(IGrinderEntry recipe) { + result = new PositionedStack( recipe.getOutput(), -30 + 107, 47 ); ingredients = new ArrayList(); - if ( irecipe.getOptionalOutput() != null ) + if ( recipe.getOptionalOutput() != null ) { hasOptional = true; - Chance = ((int) (irecipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal(); - ingredients.add( new PositionedStack( irecipe.getOptionalOutput(), -30 + 107 + 18, 47 ) ); + Chance = ((int) (recipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal(); + ingredients.add( new PositionedStack( recipe.getOptionalOutput(), -30 + 107 + 18, 47 ) ); } - if ( irecipe.getInput() != null ) - ingredients.add( new PositionedStack( irecipe.getInput(), 45, 24 ) ); + if ( recipe.getInput() != null ) + ingredients.add( new PositionedStack( recipe.getInput(), 45, 24 ) ); } @Override diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java index 586a19ee..2da80904 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler.java @@ -55,13 +55,13 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler { if ( (outputId.equals( "inscriber" )) && (getClass() == NEIInscriberRecipeHandler.class) ) { - for (InscriberRecipe irecipe : Inscribe.recipes) + for (InscriberRecipe recipe : Inscribe.recipes) { - CachedInscriberRecipe recipe = new CachedInscriberRecipe( irecipe ); - if ( recipe != null ) + CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe ); + if ( cachedRecipe != null ) { - recipe.computeVisuals(); - this.arecipes.add( recipe ); + cachedRecipe.computeVisuals(); + this.arecipes.add( cachedRecipe ); } } } @@ -73,30 +73,30 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler public void loadCraftingRecipes(ItemStack result) { - for (InscriberRecipe irecipe : Inscribe.recipes) + for (InscriberRecipe recipe : Inscribe.recipes) { - if ( NEIServerUtils.areStacksSameTypeCrafting( irecipe.output, result ) ) + if ( NEIServerUtils.areStacksSameTypeCrafting( recipe.output, result ) ) { - CachedInscriberRecipe recipe = new CachedInscriberRecipe( irecipe ); - recipe.computeVisuals(); - this.arecipes.add( recipe ); + CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe ); + cachedRecipe.computeVisuals(); + this.arecipes.add( cachedRecipe ); } } } public void loadUsageRecipes(ItemStack ingredient) { - for (InscriberRecipe irecipe : Inscribe.recipes) + for (InscriberRecipe recipe : Inscribe.recipes) { - CachedInscriberRecipe recipe = new CachedInscriberRecipe( irecipe ); + CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe ); - if ( (recipe != null) && (recipe.contains( recipe.ingredients, ingredient.getItem() )) ) + if ( (cachedRecipe != null) && (cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() )) ) { - recipe.computeVisuals(); - if ( recipe.contains( recipe.ingredients, ingredient ) ) + cachedRecipe.computeVisuals(); + if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) ) { - recipe.setIngredientPermutation( recipe.ingredients, ingredient ); - this.arecipes.add( recipe ); + cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient ); + this.arecipes.add( cachedRecipe ); } } } @@ -138,18 +138,18 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler public ArrayList ingredients; public PositionedStack result; - public CachedInscriberRecipe(InscriberRecipe irecipe) { - result = new PositionedStack( irecipe.output, 108, 29 ); + public CachedInscriberRecipe(InscriberRecipe recipe) { + result = new PositionedStack( recipe.output, 108, 29 ); ingredients = new ArrayList(); - if ( irecipe.plateA != null ) - ingredients.add( new PositionedStack( irecipe.plateA, 40, 5 ) ); + if ( recipe.plateA != null ) + ingredients.add( new PositionedStack( recipe.plateA, 40, 5 ) ); - if ( irecipe.imprintable != null ) - ingredients.add( new PositionedStack( irecipe.imprintable, 40 + 18, 28 ) ); + if ( recipe.imprintable != null ) + ingredients.add( new PositionedStack( recipe.imprintable, 40 + 18, 28 ) ); - if ( irecipe.plateB != null ) - ingredients.add( new PositionedStack( irecipe.plateB, 40, 51 ) ); + if ( recipe.plateB != null ) + ingredients.add( new PositionedStack( recipe.plateB, 40, 51 ) ); } @Override diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java index b60069d3..cc5fb976 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEIWorldCraftingHandler.java @@ -106,13 +106,13 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler } @Override - public List getIngredientStacks(int recipe) + public List getIngredientStacks(int recipeIndex) { return new ArrayList(); } @Override - public List getOtherStacks(int recipetype) + public List getOtherStacks(int recipeIndex) { return new ArrayList(); } @@ -154,15 +154,15 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler } @Override - public List handleTooltip(GuiRecipe gui, List currenttip, int recipe) + public List handleTooltip(GuiRecipe gui, List currentToolTip, int recipe) { - return currenttip; + return currentToolTip; } @Override - public List handleItemTooltip(GuiRecipe gui, ItemStack stack, List currenttip, int recipe) + public List handleItemTooltip(GuiRecipe gui, ItemStack stack, List currentToolTip, int recipe) { - return currenttip; + return currentToolTip; } @Override diff --git a/src/main/java/appeng/integration/modules/Waila.java b/src/main/java/appeng/integration/modules/Waila.java index 440495b0..1b30a55c 100644 --- a/src/main/java/appeng/integration/modules/Waila.java +++ b/src/main/java/appeng/integration/modules/Waila.java @@ -75,7 +75,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr } @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) + public List getWailaBody(ItemStack itemStack, List currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { TileEntity te = accessor.getTileEntity(); MovingObjectPosition mop = accessor.getPosition(); @@ -90,11 +90,11 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr { } - return getBody( itemStack, currenttip, accessor.getPlayer(), nbt, te, mop ); + return getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop ); } @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config) + public List getWailaBody(ItemStack itemStack, List currentToolTip, IWailaFMPAccessor accessor, IWailaConfigHandler config) { TileEntity te = accessor.getTileEntity(); MovingObjectPosition mop = accessor.getPosition(); @@ -109,10 +109,10 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr { } - return getBody( itemStack, currenttip, accessor.getPlayer(), nbt, te, mop ); + return getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop ); } - public List getBody(ItemStack itemStack, List currenttip, EntityPlayer player, NBTTagCompound nbt, TileEntity te, MovingObjectPosition mop) + public List getBody(ItemStack itemStack, List currentToolTip, EntityPlayer player, NBTTagCompound nbt, TileEntity te, MovingObjectPosition mop) { Object ThingOfInterest = te; @@ -143,7 +143,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr if ( ic != null && ic.hasKey( "usedChannels" ) ) { int channels = ic.getByte( "usedChannels" ); - currenttip.add( channels + " " + GuiText.Of.getLocal() + " " + (ThingOfInterest instanceof PartDenseCable ? 32 : 8) + " " + currentToolTip.add( channels + " " + GuiText.Of.getLocal() + " " + (ThingOfInterest instanceof PartDenseCable ? 32 : 8) + " " + WailaText.Channels.getLocal() ); } } @@ -156,7 +156,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr { TileEnergyCell tec = (TileEnergyCell) ThingOfInterest; long power = (long) (100 * c.getDouble( "internalCurrentPower" )); - currenttip.add( WailaText.Contains + ": " + Platform.formatPowerLong( power, false ) + " / " + currentToolTip.add( WailaText.Contains + ": " + Platform.formatPowerLong( power, false ) + " / " + Platform.formatPowerLong( (long) (100 * tec.getAEMaxPower()), false ) ); } } @@ -175,19 +175,19 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr if ( stack instanceof IAEItemStack ) { IAEItemStack ais = (IAEItemStack) stack; - currenttip.add( WailaText.Showing.getLocal() + ": " + ais.getItemStack().getDisplayName() ); + currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.getItemStack().getDisplayName() ); } if ( stack instanceof IAEFluidStack ) { IAEFluidStack ais = (IAEFluidStack) stack; - currenttip.add( WailaText.Showing.getLocal() + ": " + ais.getFluid().getLocalizedName( ais.getFluidStack() ) ); + currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.getFluid().getLocalizedName( ais.getFluidStack() ) ); } if ( isLocked ) - currenttip.add( WailaText.Locked.getLocal() ); + currentToolTip.add( WailaText.Locked.getLocal() ); else - currenttip.add( WailaText.Unlocked.getLocal() ); + currentToolTip.add( WailaText.Unlocked.getLocal() ); } if ( ThingOfInterest instanceof TileCharger ) @@ -197,8 +197,8 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr ItemStack is = inv.getStackInSlot( 0 ); if ( is != null ) { - currenttip.add( WailaText.Contains + ": " + is.getDisplayName() ); - is.getItem().addInformation( is, player, currenttip, true ); + currentToolTip.add( WailaText.Contains + ": " + is.getDisplayName() ); + is.getItem().addInformation( is, player, currentToolTip, true ); } } @@ -206,40 +206,38 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr { IPowerChannelState pbs = (IPowerChannelState) ThingOfInterest; if ( pbs.isActive() && pbs.isPowered() ) - currenttip.add( WailaText.DeviceOnline.getLocal() ); + currentToolTip.add( WailaText.DeviceOnline.getLocal() ); else if ( pbs.isPowered() ) - currenttip.add( WailaText.DeviceMissingChannel.getLocal() ); + currentToolTip.add( WailaText.DeviceMissingChannel.getLocal() ); else - currenttip.add( WailaText.DeviceOffline.getLocal() ); + currentToolTip.add( WailaText.DeviceOffline.getLocal() ); } - return currenttip; + return currentToolTip; } @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) + public List getWailaHead(ItemStack itemStack, List currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - - return currenttip; + return currentToolTip; } @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) + public List getWailaTail(ItemStack itemStack, List currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - - return currenttip; + return currentToolTip; } @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config) + public List getWailaHead(ItemStack itemStack, List currentToolTip, IWailaFMPAccessor accessor, IWailaConfigHandler config) { - return currenttip; + return currentToolTip; } @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config) + public List getWailaTail(ItemStack itemStack, List currentToolTip, IWailaFMPAccessor accessor, IWailaConfigHandler config) { - return currenttip; + return currentToolTip; } } diff --git a/src/main/java/appeng/integration/modules/helpers/MJPerdition.java b/src/main/java/appeng/integration/modules/helpers/MJPerdition.java index a527bcb2..5a4479fc 100644 --- a/src/main/java/appeng/integration/modules/helpers/MJPerdition.java +++ b/src/main/java/appeng/integration/modules/helpers/MJPerdition.java @@ -1,13 +1,13 @@ package appeng.integration.modules.helpers; +import appeng.integration.abstraction.helpers.BaseMJPerdition; import net.minecraft.nbt.NBTTagCompound; -import appeng.integration.abstraction.helpers.BaseMJperdition; import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.PowerHandler; import buildcraft.api.power.PowerHandler.PowerReceiver; import buildcraft.api.power.PowerHandler.Type; -public class MJPerdition extends BaseMJperdition +public class MJPerdition extends BaseMJPerdition { final protected PowerHandler bcPowerHandler; diff --git a/src/main/java/appeng/integration/modules/helpers/MFRDSU.java b/src/main/java/appeng/integration/modules/helpers/MinefactoryReloadedDeepStorageUnit.java similarity index 94% rename from src/main/java/appeng/integration/modules/helpers/MFRDSU.java rename to src/main/java/appeng/integration/modules/helpers/MinefactoryReloadedDeepStorageUnit.java index e019edd7..90c2f3a9 100644 --- a/src/main/java/appeng/integration/modules/helpers/MFRDSU.java +++ b/src/main/java/appeng/integration/modules/helpers/MinefactoryReloadedDeepStorageUnit.java @@ -11,13 +11,13 @@ import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IItemList; import appeng.util.item.AEItemStack; -public class MFRDSU implements IMEInventory +public class MinefactoryReloadedDeepStorageUnit implements IMEInventory { IDeepStorageUnit dsu; TileEntity te; - public MFRDSU(TileEntity ta) { + public MinefactoryReloadedDeepStorageUnit(TileEntity ta) { te = ta; dsu = (IDeepStorageUnit) ta; } diff --git a/src/main/java/appeng/items/AEBaseItem.java b/src/main/java/appeng/items/AEBaseItem.java index b018b839..3bc62e8b 100644 --- a/src/main/java/appeng/items/AEBaseItem.java +++ b/src/main/java/appeng/items/AEBaseItem.java @@ -11,14 +11,14 @@ import appeng.core.features.IAEFeature; public class AEBaseItem extends Item implements IAEFeature { - String FeatureFullname; - String FeatureSubname; + String featureFullName; + String featureSubName; AEFeatureHandler feature; @Override public String toString() { - return FeatureFullname; + return featureFullName; } @Override @@ -29,7 +29,7 @@ public class AEBaseItem extends Item implements IAEFeature public void setFeature(EnumSet f) { - feature = new AEFeatureHandler( f, this, FeatureSubname ); + feature = new AEFeatureHandler( f, this, featureSubName ); } public AEBaseItem(Class c) { @@ -37,9 +37,9 @@ public class AEBaseItem extends Item implements IAEFeature canRepair = false; } - public AEBaseItem(Class c, String subname) { - FeatureSubname = subname; - FeatureFullname = AEFeatureHandler.getName( c, subname ); + public AEBaseItem(Class c, String subName) { + featureSubName = subName; + featureFullName = AEFeatureHandler.getName( c, subName ); } @Override diff --git a/src/main/java/appeng/items/contents/NetworkToolViewer.java b/src/main/java/appeng/items/contents/NetworkToolViewer.java index dd09f1f0..d0e1b1e4 100644 --- a/src/main/java/appeng/items/contents/NetworkToolViewer.java +++ b/src/main/java/appeng/items/contents/NetworkToolViewer.java @@ -19,7 +19,7 @@ public class NetworkToolViewer implements INetworkTool this.is = is; gh = gHost; inv = new AppEngInternalInventory( null, 9 ); - if ( is.hasTagCompound() ) // prevent crash when opening network status creen. + if ( is.hasTagCompound() ) // prevent crash when opening network status screen. inv.readFromNBT( Platform.openNbtData( is ), "inv" ); } diff --git a/src/main/java/appeng/items/materials/ItemMultiMaterial.java b/src/main/java/appeng/items/materials/ItemMultiMaterial.java index a47b75d5..e2c52c9b 100644 --- a/src/main/java/appeng/items/materials/ItemMultiMaterial.java +++ b/src/main/java/appeng/items/materials/ItemMultiMaterial.java @@ -92,9 +92,9 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, } @Override - public void addInformation(ItemStack is, EntityPlayer player, List details, boolean moar) + public void addInformation(ItemStack is, EntityPlayer player, List details, boolean displayAdditionalInformation) { - super.addInformation( is, player, details, moar ); + super.addInformation( is, player, details, displayAdditionalInformation ); MaterialType mt = getTypeByStack( is ); if ( mt == null ) @@ -168,7 +168,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, throw new RuntimeException( "Cannot create the same material twice..." ); } - public void unduplicate() + public void makeUnique() { for (MaterialType mt : ImmutableSet.copyOf( dmgToMaterial.values() )) { diff --git a/src/main/java/appeng/items/parts/ItemFacade.java b/src/main/java/appeng/items/parts/ItemFacade.java index f1e5de6c..20726c7a 100644 --- a/src/main/java/appeng/items/parts/ItemFacade.java +++ b/src/main/java/appeng/items/parts/ItemFacade.java @@ -88,7 +88,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte list.addAll( subTypes ); } - public ItemStack createFromInts(int[] ids) + public ItemStack createFromIDs(int[] ids) { ItemStack is = new ItemStack( AEApi.instance().items().itemFacade.item() ); NBTTagCompound data = new NBTTagCompound(); diff --git a/src/main/java/appeng/items/parts/ItemMultiPart.java b/src/main/java/appeng/items/parts/ItemMultiPart.java index ff59731c..37c4f408 100644 --- a/src/main/java/appeng/items/parts/ItemMultiPart.java +++ b/src/main/java/appeng/items/parts/ItemMultiPart.java @@ -142,10 +142,10 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup @Override public String getUnlocalizedName(ItemStack is) { - return "item.appliedenergistics2." + getname( is ); + return "item.appliedenergistics2." + getName( is ); } - public String getname(ItemStack is) + public String getName(ItemStack is) { return AEFeatureHandler.getName( ItemMultiPart.class, getTypeByStack( is ).name() ); } @@ -173,7 +173,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup { for (Entry part : dmgToPart.entrySet()) { - String tex = "appliedenergistics2:" + getname( new ItemStack( this, 1, part.getKey() ) ); + String tex = "appliedenergistics2:" + getName( new ItemStack( this, 1, part.getKey() ) ); part.getValue().ico = par1IconRegister.registerIcon( tex ); } } @@ -266,7 +266,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup return null; } - public ItemStack getStackFromTypeAndVarient(PartType mt, int variant) + public ItemStack getStackFromTypeAndVariant(PartType mt, int variant) { return new ItemStack( this, 1, mt.baseDamage + variant ); } diff --git a/src/main/java/appeng/items/storage/ItemBasicStorageCell.java b/src/main/java/appeng/items/storage/ItemBasicStorageCell.java index d02471e7..082613f7 100644 --- a/src/main/java/appeng/items/storage/ItemBasicStorageCell.java +++ b/src/main/java/appeng/items/storage/ItemBasicStorageCell.java @@ -111,7 +111,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II } @Override - public int BytePerType(ItemStack iscellItem) + public int BytePerType(ItemStack cell) { return 8; } @@ -197,15 +197,15 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II if ( Platform.isClient() ) return false; - InventoryPlayer pinv = player.inventory; + InventoryPlayer playerInventory = player.inventory; IMEInventory inv = AEApi.instance().registries().cell().getCellInventory( stack, null, StorageChannel.ITEMS ); - if ( inv != null && pinv.getCurrentItem() == stack ) + if ( inv != null && playerInventory.getCurrentItem() == stack ) { InventoryAdaptor ia = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN ); IItemList list = inv.getAvailableItems( StorageChannel.ITEMS.createList() ); if ( list.isEmpty() && ia != null ) { - pinv.setInventorySlotContents( pinv.currentItem, null ); + playerInventory.setInventorySlotContents( playerInventory.currentItem, null ); ItemStack extraB = ia.addItems( component.stack( 1 ) ); ItemStack extraA = ia.addItems( AEApi.instance().materials().materialEmptyStorageCell.stack( 1 ) ); diff --git a/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java b/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java index 761b98f6..2cfdf6f8 100644 --- a/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java +++ b/src/main/java/appeng/items/tools/powered/ToolChargedStaff.java @@ -19,7 +19,7 @@ public class ToolChargedStaff extends AEBasePoweredItem public ToolChargedStaff() { super( ToolChargedStaff.class, null ); setFeature( EnumSet.of( AEFeature.ChargedStaff, AEFeature.PoweredTools ) ); - maxStoredPower = AEConfig.instance.staff_battery; + maxStoredPower = AEConfig.instance.chargedStaffBattery; } @Override diff --git a/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java b/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java index 8f710f67..fbc19d14 100644 --- a/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java +++ b/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java @@ -76,7 +76,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe public ToolColorApplicator() { super( ToolColorApplicator.class, null ); setFeature( EnumSet.of( AEFeature.ColorApplicator, AEFeature.PoweredTools ) ); - maxStoredPower = AEConfig.instance.colorapplicator_battery; + maxStoredPower = AEConfig.instance.colorApplicatorBattery; if ( Platform.isClient() ) MinecraftForgeClient.registerItemRenderer( this, new ToolColorApplicatorRender() ); } @@ -207,7 +207,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe } @Override - public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int side, float hitx, float hity, float hitz) + public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { Block blk = w.getBlock( x, y, z ); double powerPerUse = 100; @@ -232,14 +232,14 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe if ( paintBall != null && paintBall.getItem() instanceof ItemSnowball ) { - ForgeDirection oside = ForgeDirection.getOrientation( side ); + ForgeDirection orientation = ForgeDirection.getOrientation( side ); TileEntity te = w.getTileEntity( x, y, z ); // clean cables. if ( te instanceof IColorableTile ) { if ( getAECurrentPower( is ) > powerPerUse && ((IColorableTile) te).getColor() != AEColor.Transparent ) { - if ( ((IColorableTile) te).recolourBlock( oside, AEColor.Transparent, p ) ) + if ( ((IColorableTile) te).recolourBlock( orientation, AEColor.Transparent, p ) ) { inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() ); extractAEPower( is, powerPerUse ); @@ -249,13 +249,13 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe } // clean paint balls.. - Block testBlk = w.getBlock( x + oside.offsetX, y + oside.offsetY, z + oside.offsetZ ); - TileEntity painted = w.getTileEntity( x + oside.offsetX, y + oside.offsetY, z + oside.offsetZ ); + Block testBlk = w.getBlock( x + orientation.offsetX, y + orientation.offsetY, z + orientation.offsetZ ); + TileEntity painted = w.getTileEntity( x + orientation.offsetX, y + orientation.offsetY, z + orientation.offsetZ ); if ( getAECurrentPower( is ) > powerPerUse && testBlk instanceof BlockPaint && painted instanceof TilePaint ) { inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() ); extractAEPower( is, powerPerUse ); - ((TilePaint) painted).cleanSide( oside.getOpposite() ); + ((TilePaint) painted).cleanSide( orientation.getOpposite() ); return true; } } @@ -390,7 +390,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe } @Override - public int BytePerType(ItemStack iscellItem) + public int BytePerType(ItemStack cell) { return 8; } diff --git a/src/main/java/appeng/items/tools/powered/ToolEntropyManipulator.java b/src/main/java/appeng/items/tools/powered/ToolEntropyManipulator.java index bfecffed..65d0b199 100644 --- a/src/main/java/appeng/items/tools/powered/ToolEntropyManipulator.java +++ b/src/main/java/appeng/items/tools/powered/ToolEntropyManipulator.java @@ -137,7 +137,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT public ToolEntropyManipulator() { super( ToolEntropyManipulator.class, null ); setFeature( EnumSet.of( AEFeature.EntropyManipulator, AEFeature.PoweredTools ) ); - maxStoredPower = AEConfig.instance.manipulator_battery; + maxStoredPower = AEConfig.instance.entropyManipulatorBattery; coolDown = new Hashtable(); coolDown.put( new Combo( Blocks.stone, 0 ), new InWorldToolOperationResult( new ItemStack( Blocks.cobblestone ) ) ); diff --git a/src/main/java/appeng/items/tools/powered/ToolMassCannon.java b/src/main/java/appeng/items/tools/powered/ToolMassCannon.java index 8b0756d9..c2538a8a 100644 --- a/src/main/java/appeng/items/tools/powered/ToolMassCannon.java +++ b/src/main/java/appeng/items/tools/powered/ToolMassCannon.java @@ -61,7 +61,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell public ToolMassCannon() { super( ToolMassCannon.class, null ); setFeature( EnumSet.of( AEFeature.MatterCannon, AEFeature.PoweredTools ) ); - maxStoredPower = AEConfig.instance.mattercannon_battery; + maxStoredPower = AEConfig.instance.matterCannonBattery; } @Override @@ -104,10 +104,10 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell if ( inv != null ) { IItemList itemList = inv.getAvailableItems( AEApi.instance().storage().createItemList() ); - IAEStack aeammo = itemList.getFirstItem(); - if ( aeammo instanceof IAEItemStack ) + IAEStack aeAmmo = itemList.getFirstItem(); + if ( aeAmmo instanceof IAEItemStack ) { - shots = Math.min( shots, (int) aeammo.getStackSize() ); + shots = Math.min( shots, (int) aeAmmo.getStackSize() ); for (int sh = 0; sh < shots; sh++) { extractAEPower( item, 1600 ); @@ -115,14 +115,14 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell if ( Platform.isClient() ) return item; - aeammo.setStackSize( 1 ); - ItemStack ammo = ((IAEItemStack) aeammo).getItemStack(); + aeAmmo.setStackSize( 1 ); + ItemStack ammo = ((IAEItemStack) aeAmmo).getItemStack(); if ( ammo == null ) return item; ammo.stackSize = 1; - aeammo = inv.extractItems( aeammo, Actionable.MODULATE, new PlayerSource( p, null ) ); - if ( aeammo == null ) + aeAmmo = inv.extractItems( aeAmmo, Actionable.MODULATE, new PlayerSource( p, null ) ); + if ( aeAmmo == null ) return item; float f = 1.0F; @@ -147,7 +147,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell float penetration = AEApi.instance().registries().matterCannon().getPenetration( ammo ); // 196.96655f; if ( penetration <= 0 ) { - ItemStack type = ((IAEItemStack) aeammo).getItemStack(); + ItemStack type = ((IAEItemStack) aeAmmo).getItemStack(); if ( type.getItem() instanceof ItemPaintBall ) { shootPaintBalls( type, w, p, vec3, vec31, direction, d0, d1, d2 ); diff --git a/src/main/java/appeng/items/tools/powered/ToolPortableCell.java b/src/main/java/appeng/items/tools/powered/ToolPortableCell.java index b2d6da42..a0cc81ad 100644 --- a/src/main/java/appeng/items/tools/powered/ToolPortableCell.java +++ b/src/main/java/appeng/items/tools/powered/ToolPortableCell.java @@ -37,7 +37,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, public ToolPortableCell() { super( ToolPortableCell.class, null ); setFeature( EnumSet.of( AEFeature.PortableCell, AEFeature.StorageCells, AEFeature.PoweredTools ) ); - maxStoredPower = AEConfig.instance.portablecell_battery; + maxStoredPower = AEConfig.instance.portableCellBattery; } @Override @@ -49,7 +49,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, @Override public boolean onItemUse(ItemStack item, EntityPlayer player, World w, int x, int y, int z, int side, - float hitx, float hity, float hitz) + float hitX, float hitY, float hitZ) { onItemRightClick( item, w, player ); return true; @@ -80,7 +80,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, } @Override - public int BytePerType(ItemStack iscellItem) + public int BytePerType(ItemStack cell) { return 8; } diff --git a/src/main/java/appeng/items/tools/powered/ToolWirelessTerminal.java b/src/main/java/appeng/items/tools/powered/ToolWirelessTerminal.java index 37f08b58..a077519b 100644 --- a/src/main/java/appeng/items/tools/powered/ToolWirelessTerminal.java +++ b/src/main/java/appeng/items/tools/powered/ToolWirelessTerminal.java @@ -29,7 +29,7 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless public ToolWirelessTerminal() { super( ToolWirelessTerminal.class, null ); setFeature( EnumSet.of( AEFeature.WirelessAccessTerminal, AEFeature.PoweredTools ) ); - maxStoredPower = AEConfig.instance.wireless_battery; + maxStoredPower = AEConfig.instance.wirelessTerminalBattery; } @Override @@ -41,7 +41,7 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless @Override public boolean onItemUse(ItemStack item, EntityPlayer player, World w, int x, int y, int z, int side, - float hitx, float hity, float hitz) + float hitX, float hitY, float hitZ) { onItemRightClick( item, w, player ); return true; diff --git a/src/main/java/appeng/items/tools/powered/powersink/AEBasePoweredItem.java b/src/main/java/appeng/items/tools/powered/powersink/AEBasePoweredItem.java index b2ed3b6c..b29478a6 100644 --- a/src/main/java/appeng/items/tools/powered/powersink/AEBasePoweredItem.java +++ b/src/main/java/appeng/items/tools/powered/powersink/AEBasePoweredItem.java @@ -3,8 +3,8 @@ package appeng.items.tools.powered.powersink; public class AEBasePoweredItem extends RedstoneFlux { - public AEBasePoweredItem(Class c, String subname) { - super( c, subname ); + public AEBasePoweredItem(Class c, String subName) { + super( c, subName ); setMaxStackSize( 1 ); } } diff --git a/src/main/java/appeng/items/tools/powered/powersink/AERootPoweredItem.java b/src/main/java/appeng/items/tools/powered/powersink/AERootPoweredItem.java index 0cbd1781..7d60ddfb 100644 --- a/src/main/java/appeng/items/tools/powered/powersink/AERootPoweredItem.java +++ b/src/main/java/appeng/items/tools/powered/powersink/AERootPoweredItem.java @@ -25,8 +25,8 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage public double maxStoredPower = 200000; - public AERootPoweredItem(Class c, String subname) { - super( c, subname ); + public AERootPoweredItem(Class c, String subName) { + super( c, subName ); setMaxDamage( 32 ); hasSubtypes = false; } diff --git a/src/main/java/appeng/items/tools/powered/powersink/IC2.java b/src/main/java/appeng/items/tools/powered/powersink/IC2.java index f43760f1..a6187e62 100644 --- a/src/main/java/appeng/items/tools/powered/powersink/IC2.java +++ b/src/main/java/appeng/items/tools/powered/powersink/IC2.java @@ -15,8 +15,8 @@ import appeng.transformer.annotations.integration.Method; public class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpecialElectricItem { - public IC2(Class c, String subname) { - super( c, subname ); + public IC2(Class c, String subName) { + super( c, subName ); } @Override diff --git a/src/main/java/appeng/items/tools/powered/powersink/RedstoneFlux.java b/src/main/java/appeng/items/tools/powered/powersink/RedstoneFlux.java index b371c258..6d63740c 100644 --- a/src/main/java/appeng/items/tools/powered/powersink/RedstoneFlux.java +++ b/src/main/java/appeng/items/tools/powered/powersink/RedstoneFlux.java @@ -9,8 +9,8 @@ import cofh.api.energy.IEnergyContainerItem; public class RedstoneFlux extends IC2 implements IEnergyContainerItem { - public RedstoneFlux(Class c, String subname) { - super( c, subname ); + public RedstoneFlux(Class c, String subName) { + super( c, subName ); } @Override diff --git a/src/main/java/appeng/items/tools/powered/powersink/UniversalElectricity.java b/src/main/java/appeng/items/tools/powered/powersink/UniversalElectricity.java index ff2ce9d1..7e914998 100644 --- a/src/main/java/appeng/items/tools/powered/powersink/UniversalElectricity.java +++ b/src/main/java/appeng/items/tools/powered/powersink/UniversalElectricity.java @@ -5,7 +5,7 @@ package appeng.items.tools.powered.powersink; public class UniversalElectricity extends ThermalExpansion implements IItemElectric { * - * public UniversalElectricity(Class c, String subname) { super( c, subname ); } + * public UniversalElectricity(Class c, String subName) { super( c, subName ); } * * @Override public float recharge(ItemStack is, float energy, boolean * doRecharge) { return (float) (energy - injectExternalPower( PowerUnits.KJ, diff --git a/src/main/java/appeng/items/tools/quartz/ToolQuartzCuttingKnife.java b/src/main/java/appeng/items/tools/quartz/ToolQuartzCuttingKnife.java index 7f476dfb..83b5dd34 100644 --- a/src/main/java/appeng/items/tools/quartz/ToolQuartzCuttingKnife.java +++ b/src/main/java/appeng/items/tools/quartz/ToolQuartzCuttingKnife.java @@ -59,7 +59,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem } @Override - public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int s, float hitx, float hity, float hitz) + public boolean onItemUse(ItemStack is, EntityPlayer p, World w, int x, int y, int z, int s, float hitX, float hitY, float hitZ) { if ( Platform.isServer() ) Platform.openGUI( p, null, ForgeDirection.UNKNOWN, GuiBridge.GUI_QUARTZ_KNIFE ); diff --git a/src/main/java/appeng/me/GridNode.java b/src/main/java/appeng/me/GridNode.java index 816f6278..061b83cb 100644 --- a/src/main/java/appeng/me/GridNode.java +++ b/src/main/java/appeng/me/GridNode.java @@ -401,11 +401,11 @@ public class GridNode implements IGridNode, IPathItem return new ReadOnlyCollection( Connections ); } - public boolean hasConnection(IGridNode otherside) + public boolean hasConnection(IGridNode otherSide) { for (IGridConnection gc : Connections) { - if ( gc.a() == otherside || gc.b() == otherside ) + if ( gc.a() == otherSide || gc.b() == otherSide ) return true; } return false; diff --git a/src/main/java/appeng/me/GridStorage.java b/src/main/java/appeng/me/GridStorage.java index e64e3d50..cc9e68dc 100644 --- a/src/main/java/appeng/me/GridStorage.java +++ b/src/main/java/appeng/me/GridStorage.java @@ -22,7 +22,7 @@ public class GridStorage implements IGridStorage final NBTTagCompound data; public boolean isDirty = false; - private WeakHashMap divlist = new WeakHashMap(); + private WeakHashMap divided = new WeakHashMap(); final GridStorageSearch mySearchEntry; // keep myself in the list until I'm // lost... @@ -52,8 +52,8 @@ public class GridStorage implements IGridStorage try { - byte[] dbata = javax.xml.bind.DatatypeConverter.parseBase64Binary( input ); - myTag = CompressedStreamTools.readCompressed( new ByteArrayInputStream( dbata ) ); + byte[] byteData = javax.xml.bind.DatatypeConverter.parseBase64Binary( input ); + myTag = CompressedStreamTools.readCompressed( new ByteArrayInputStream( byteData ) ); } catch (Throwable t) { @@ -125,12 +125,12 @@ public class GridStorage implements IGridStorage public void addDivided(GridStorage gs) { - divlist.put( gs, true ); + divided.put( gs, true ); } public boolean hasDivided(GridStorage myStorage) { - return divlist.containsKey( myStorage ); + return divided.containsKey( myStorage ); } public void remove() diff --git a/src/main/java/appeng/me/cache/CraftingGridCache.java b/src/main/java/appeng/me/cache/CraftingGridCache.java index fd2bd626..41df9e71 100644 --- a/src/main/java/appeng/me/cache/CraftingGridCache.java +++ b/src/main/java/appeng/me/cache/CraftingGridCache.java @@ -261,13 +261,13 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper for (IGridNode cst : grid.getMachines( TileCraftingStorageTile.class )) { TileCraftingStorageTile tile = (TileCraftingStorageTile) cst.getMachine(); - CraftingCPUCluster clust = (CraftingCPUCluster) tile.getCluster(); - if ( clust != null ) + CraftingCPUCluster cluster = (CraftingCPUCluster) tile.getCluster(); + if ( cluster != null ) { - cpuClusters.add( clust ); + cpuClusters.add( cluster ); - if ( clust.myLastLink != null ) - addLink( (CraftingLink) clust.myLastLink ); + if ( cluster.myLastLink != null ) + addLink( (CraftingLink) cluster.myLastLink ); } } } @@ -424,10 +424,10 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper if ( job.isSimulation() ) return null; - CraftingCPUCluster cpuClust = null; + CraftingCPUCluster cpuCluster = null; if ( target instanceof CraftingCPUCluster ) - cpuClust = (CraftingCPUCluster) target; + cpuCluster = (CraftingCPUCluster) target; if ( target == null ) { @@ -462,12 +462,12 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper } ); if ( !validCpusClusters.isEmpty() ) - cpuClust = validCpusClusters.get( 0 ); + cpuCluster = validCpusClusters.get( 0 ); } - if ( cpuClust != null ) + if ( cpuCluster != null ) { - return cpuClust.submitJob( grid, job, src, requestingMachine ); + return cpuCluster.submitJob( grid, job, src, requestingMachine ); } return null; diff --git a/src/main/java/appeng/me/cache/EnergyGridCache.java b/src/main/java/appeng/me/cache/EnergyGridCache.java index 69839567..c7baa690 100644 --- a/src/main/java/appeng/me/cache/EnergyGridCache.java +++ b/src/main/java/appeng/me/cache/EnergyGridCache.java @@ -73,7 +73,7 @@ public class EnergyGridCache implements IEnergyGrid IAEPowerStorage lastProvider; final Set providers = new LinkedHashSet(); - IAEPowerStorage lastRequestor; + IAEPowerStorage lastRequester; final Set requesters = new LinkedHashSet(); final public TreeSet interests = new TreeSet(); @@ -86,15 +86,15 @@ public class EnergyGridCache implements IEnergyGrid return providers.isEmpty() ? 1000.0 : 0.0; } - private IAEPowerStorage getFirstRequestor() + private IAEPowerStorage getFirstRequester() { - if ( lastRequestor == null ) + if ( lastRequester == null ) { Iterator i = requesters.iterator(); - lastRequestor = i.hasNext() ? i.next() : null; + lastRequester = i.hasNext() ? i.next() : null; } - return lastRequestor; + return lastRequester; } private IAEPowerStorage getFirstProvider() @@ -108,7 +108,7 @@ public class EnergyGridCache implements IEnergyGrid return lastProvider; } - final Multiset gproviders = HashMultiset.create(); + final Multiset energyGridProviders = HashMultiset.create(); final IGrid myGrid; PathGridCache pgc; @@ -182,7 +182,7 @@ public class EnergyGridCache implements IEnergyGrid required += Math.max( 0.0, node.getAEMaxPower() - node.getAECurrentPower() ); } - Iterator ix = gproviders.iterator(); + Iterator ix = energyGridProviders.iterator(); while (required < maxRequired && ix.hasNext()) { IEnergyGridProvider node = ix.next(); @@ -216,7 +216,7 @@ public class EnergyGridCache implements IEnergyGrid amt = node.injectAEPower( amt, Actionable.SIMULATE ); } - Iterator i = gproviders.iterator(); + Iterator i = energyGridProviders.iterator(); while (amt > 0 && i.hasNext()) amt = i.next().injectAEPower( amt, mode, seen ); } @@ -227,17 +227,17 @@ public class EnergyGridCache implements IEnergyGrid while (amt > 0 && !requesters.isEmpty()) { - IAEPowerStorage node = getFirstRequestor(); + IAEPowerStorage node = getFirstRequester(); amt = node.injectAEPower( amt, Actionable.MODULATE ); if ( amt > 0 ) { requesters.remove( node ); - lastRequestor = null; + lastRequester = null; } } - Iterator i = gproviders.iterator(); + Iterator i = energyGridProviders.iterator(); while (amt > 0 && i.hasNext()) { IEnergyGridProvider what = i.next(); @@ -267,13 +267,13 @@ public class EnergyGridCache implements IEnergyGrid public void addNode(IGridNode node, IGridHost machine) { if ( machine instanceof IEnergyGridProvider ) - gproviders.add( (IEnergyGridProvider) machine ); + energyGridProviders.add( (IEnergyGridProvider) machine ); // idle draw... - GridNode gnode = (GridNode) node; - IGridBlock gb = gnode.getGridBlock(); - gnode.previousDraw = gb.getIdlePowerUsage(); - drainPerTick += gnode.previousDraw; + GridNode gridNode = (GridNode) node; + IGridBlock gb = gridNode.getGridBlock(); + gridNode.previousDraw = gb.getIdlePowerUsage(); + drainPerTick += gridNode.previousDraw; // power storage if ( machine instanceof IAEPowerStorage ) @@ -315,11 +315,11 @@ public class EnergyGridCache implements IEnergyGrid public void removeNode(IGridNode node, IGridHost machine) { if ( machine instanceof IEnergyGridProvider ) - gproviders.remove( machine ); + energyGridProviders.remove( machine ); // idle draw. - GridNode gnode = (GridNode) node; - drainPerTick -= gnode.previousDraw; + GridNode gridNode = (GridNode) node; + drainPerTick -= gridNode.previousDraw; // power storage. if ( machine instanceof IAEPowerStorage ) @@ -336,8 +336,8 @@ public class EnergyGridCache implements IEnergyGrid if ( lastProvider == machine ) lastProvider = null; - if ( lastRequestor == machine ) - lastRequestor = null; + if ( lastRequester == machine ) + lastRequester = null; providers.remove( machine ); requesters.remove( machine ); @@ -464,7 +464,7 @@ public class EnergyGridCache implements IEnergyGrid if ( extractedPower < amt ) { - Iterator i = gproviders.iterator(); + Iterator i = energyGridProviders.iterator(); while (extractedPower < amt && i.hasNext()) extractedPower += i.next().extractAEPower( amt - extractedPower, mode, seen ); } @@ -489,7 +489,7 @@ public class EnergyGridCache implements IEnergyGrid if ( extractedPower < amt ) { - Iterator i = gproviders.iterator(); + Iterator i = energyGridProviders.iterator(); while (extractedPower < amt && i.hasNext()) extractedPower += i.next().extractAEPower( amt - extractedPower, mode, seen ); } diff --git a/src/main/java/appeng/me/cache/NetworkMonitor.java b/src/main/java/appeng/me/cache/NetworkMonitor.java index 522714d2..8e2c5bb7 100644 --- a/src/main/java/appeng/me/cache/NetworkMonitor.java +++ b/src/main/java/appeng/me/cache/NetworkMonitor.java @@ -31,10 +31,10 @@ public class NetworkMonitor> extends MEMonitorHandler while (i.hasNext()) { Entry, Object> o = i.next(); - IMEMonitorHandlerReceiver recv = o.getKey(); + IMEMonitorHandlerReceiver receiver = o.getKey(); - if ( recv.isValid( o.getValue() ) ) - recv.onListUpdate(); + if ( receiver.isValid( o.getValue() ) ) + receiver.onListUpdate(); else i.remove(); } diff --git a/src/main/java/appeng/me/cache/P2PCache.java b/src/main/java/appeng/me/cache/P2PCache.java index e884f030..addaa316 100644 --- a/src/main/java/appeng/me/cache/P2PCache.java +++ b/src/main/java/appeng/me/cache/P2PCache.java @@ -33,7 +33,7 @@ public class P2PCache implements IGridCache } @MENetworkEventSubscribe - public void bootComplete(MENetworkBootingStatusChange bootstat) + public void bootComplete(MENetworkBootingStatusChange bootStatus) { ITickManager tm = myGrid.getCache( ITickManager.class ); for (PartP2PTunnel me : inputs.values()) diff --git a/src/main/java/appeng/me/cache/SpatialPylonCache.java b/src/main/java/appeng/me/cache/SpatialPylonCache.java index cac5ab50..9102b9c4 100644 --- a/src/main/java/appeng/me/cache/SpatialPylonCache.java +++ b/src/main/java/appeng/me/cache/SpatialPylonCache.java @@ -167,7 +167,7 @@ public class SpatialPylonCache implements IGridCache, ISpatialCache efficiency = 0.0; minPower = (double) reqX * (double) reqY * reqZ * AEConfig.instance.spatialPowerMultiplier; - maxPower = Math.pow( minPower, AEConfig.instance.spatialPowerScaler ); + maxPower = Math.pow( minPower, AEConfig.instance.spatialPowerExponent ); } double affective_efficiency = Math.pow( efficiency, 0.25 ); diff --git a/src/main/java/appeng/me/cache/helpers/TunnelCollection.java b/src/main/java/appeng/me/cache/helpers/TunnelCollection.java index 05921caa..c7dc50f7 100644 --- a/src/main/java/appeng/me/cache/helpers/TunnelCollection.java +++ b/src/main/java/appeng/me/cache/helpers/TunnelCollection.java @@ -10,24 +10,24 @@ public class TunnelCollection implements Iterable { final Class clz; - Collection tunnelsource; + Collection tunnelSources; public TunnelCollection(Collection src, Class c) { - tunnelsource = src; + tunnelSources = src; clz = c; } @Override public Iterator iterator() { - if ( tunnelsource == null ) + if ( tunnelSources == null ) return new NullIterator(); - return new TunnelIterator( tunnelsource, clz ); + return new TunnelIterator( tunnelSources, clz ); } public void setSource(Collection c) { - tunnelsource = c; + tunnelSources = c; } public boolean isEmpty() diff --git a/src/main/java/appeng/me/cache/helpers/TunnelIterator.java b/src/main/java/appeng/me/cache/helpers/TunnelIterator.java index a4ec4676..e752ec3f 100644 --- a/src/main/java/appeng/me/cache/helpers/TunnelIterator.java +++ b/src/main/java/appeng/me/cache/helpers/TunnelIterator.java @@ -22,8 +22,8 @@ public class TunnelIterator implements Iterator } } - public TunnelIterator(Collection tunnelsource, Class clz) { - wrapped = tunnelsource.iterator(); + public TunnelIterator(Collection tunnelSources, Class clz) { + wrapped = tunnelSources.iterator(); targetType = clz; findNext(); } diff --git a/src/main/java/appeng/me/cluster/MBCalculator.java b/src/main/java/appeng/me/cluster/MBCalculator.java index f3bd6a72..d3cc27be 100644 --- a/src/main/java/appeng/me/cluster/MBCalculator.java +++ b/src/main/java/appeng/me/cluster/MBCalculator.java @@ -35,7 +35,7 @@ public abstract class MBCalculator public abstract IAECluster createCluster(World w, WorldCoord min, WorldCoord max); /** - * configure the mutli-block tiles, most of the important stuff is in here. + * configure the multi-block tiles, most of the important stuff is in here. * * @param c updated cluster * @param w in world @@ -110,15 +110,15 @@ public abstract class MBCalculator } boolean updateGrid = false; - IAECluster clust = target.getCluster(); - if ( clust == null ) + IAECluster cluster = target.getCluster(); + if ( cluster == null ) { updateTiles( c, w, min, max ); updateGrid = true; } else - c = clust; + c = cluster; c.updateStatus( updateGrid ); return; @@ -135,43 +135,43 @@ public abstract class MBCalculator public abstract boolean verifyInternalStructure(World worldObj, WorldCoord min, WorldCoord max); - public boolean verifyUnownedRegionInner(World w, int minx, int miny, int minz, int maxx, int maxy, int maxz, ForgeDirection side) + public boolean verifyUnownedRegionInner(World w, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, ForgeDirection side) { switch (side) { case WEST: - minx -= 1; - maxx = minx; + minX -= 1; + maxX = minX; break; case EAST: - maxx += 1; - minx = maxx; + maxX += 1; + minX = maxX; break; case DOWN: - miny -= 1; - maxy = miny; + minY -= 1; + maxY = minY; break; case NORTH: - maxz += 1; - minz = maxz; + maxZ += 1; + minZ = maxZ; break; case SOUTH: - minz -= 1; - maxz = minz; + minZ -= 1; + maxZ = minZ; break; case UP: - maxy += 1; - miny = maxy; + maxY += 1; + minY = maxY; break; case UNKNOWN: return false; } - for (int x = minx; x <= maxx; x++) + for (int x = minX; x <= maxX; x++) { - for (int y = miny; y <= maxy; y++) + for (int y = minY; y <= maxY; y++) { - for (int z = minz; z <= maxz; z++) + for (int z = minZ; z <= maxZ; z++) { TileEntity te = w.getTileEntity( x, y, z ); if ( isValidTile( te ) ) diff --git a/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java b/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java index e03e328e..e83dc042 100644 --- a/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java +++ b/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java @@ -118,9 +118,9 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU while (i.hasNext()) { Entry, Object> o = i.next(); - IMEMonitorHandlerReceiver recv = o.getKey(); - if ( recv.isValid( o.getValue() ) ) - recv.postChange( null, single, src ); + IMEMonitorHandlerReceiver receiver = o.getKey(); + if ( receiver.isValid( o.getValue() ) ) + receiver.postChange( null, single, src ); else i.remove(); } @@ -552,21 +552,21 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU { do { - didsomething = false; + somethingChanged = false; executeCrafting( eg, cc ); } - while (didsomething && remainingOperations > 0); + while (somethingChanged && remainingOperations > 0); } usedOps[2] = usedOps[1]; usedOps[1] = usedOps[0]; usedOps[0] = started - remainingOperations; - if ( remainingOperations > 0 && didsomething == false ) + if ( remainingOperations > 0 && somethingChanged == false ) waiting = true; } private int remainingOperations; - private boolean didsomething; + private boolean somethingChanged; private void executeCrafting(IEnergyGrid eg, CraftingGridCache cc) { @@ -677,7 +677,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU if ( m.pushPattern( details, ic ) ) { - didsomething = true; + somethingChanged = true; remainingOperations--; for (IAEItemStack out : details.getCondensedOutputs()) diff --git a/src/main/java/appeng/me/pathfinding/PathSegment.java b/src/main/java/appeng/me/pathfinding/PathSegment.java index 0f514ea0..fd191ac4 100644 --- a/src/main/java/appeng/me/pathfinding/PathSegment.java +++ b/src/main/java/appeng/me/pathfinding/PathSegment.java @@ -25,17 +25,17 @@ public class PathSegment PathGridCache pgc; - public PathSegment(PathGridCache myPGC, List open, Set semiopen, Set closed) + public PathSegment(PathGridCache myPGC, List open, Set semiOpen, Set closed) { this.open = open; - this.semiopen = semiopen; + this.semiOpen = semiOpen; this.closed = closed; pgc = myPGC; isDead = false; } List open; - Set semiopen; + Set semiOpen; Set closed; public boolean step() @@ -56,7 +56,7 @@ public class PathSegment if ( flags.contains( GridFlags.REQUIRE_CHANNEL ) ) { // close the semi open. - if ( !semiopen.contains( pi ) ) + if ( !semiOpen.contains( pi ) ) { boolean worked = false; @@ -72,14 +72,14 @@ public class PathSegment { IGridNode otherNodes = oni.next(); if ( otherNodes != pi ) - semiopen.add( (IPathItem) otherNodes ); + semiOpen.add( (IPathItem) otherNodes ); } } } else { pi.incrementChannelCount( 1 ); // give a channel. - semiopen.remove( pi ); + semiOpen.remove( pi ); } } diff --git a/src/main/java/appeng/me/storage/CellInventory.java b/src/main/java/appeng/me/storage/CellInventory.java index 770342a3..d487f37a 100644 --- a/src/main/java/appeng/me/storage/CellInventory.java +++ b/src/main/java/appeng/me/storage/CellInventory.java @@ -31,14 +31,14 @@ public class CellInventory implements ICellInventory static final String ITEM_TYPE_TAG = "it"; static final String ITEM_COUNT_TAG = "ic"; static final String ITEM_SLOT = "#"; - static final String ITEM_SLOTCOUNT = "@"; + static final String ITEM_SLOT_COUNT = "@"; static final String ITEM_PRE_FORMATTED_COUNT = "PF"; static final String ITEM_PRE_FORMATTED_SLOT = "PF#"; static final String ITEM_PRE_FORMATTED_NAME = "PN"; static final String ITEM_PRE_FORMATTED_FUZZY = "FP"; static protected String[] ITEM_SLOT_ARR; - static protected String[] ITEM_SLOTCOUNT_ARR; + static protected String[] ITEM_SLOT_COUNT_ARR; final protected NBTTagCompound tagCompound; protected int MAX_ITEM_TYPES = 63; @@ -70,7 +70,7 @@ public class CellInventory implements ICellInventory ItemStack t = ItemStack.loadItemStackFromNBT( tagCompound.getCompoundTag( ITEM_SLOT_ARR[x] ) ); if ( t != null ) { - t.stackSize = tagCompound.getInteger( ITEM_SLOTCOUNT_ARR[x] ); + t.stackSize = tagCompound.getInteger( ITEM_SLOT_COUNT_ARR[x] ); if ( t.stackSize > 0 ) { @@ -106,17 +106,17 @@ public class CellInventory implements ICellInventory } /* - * NBTBase tagSlotCount = tagCompound.getTag( ITEM_SLOTCOUNT_ARR[x] ); if ( tagSlotCount instanceof + * NBTBase tagSlotCount = tagCompound.getTag( ITEM_SLOT_COUNT_ARR[x] ); if ( tagSlotCount instanceof * NBTTagInt ) ((NBTTagInt) tagSlotCount).data = (int) v.getStackSize(); else */ - tagCompound.setInteger( ITEM_SLOTCOUNT_ARR[x], (int) v.getStackSize() ); + tagCompound.setInteger( ITEM_SLOT_COUNT_ARR[x], (int) v.getStackSize() ); x++; } // NBTBase tagType = tagCompound.getTag( ITEM_TYPE_TAG ); // NBTBase tagCount = tagCompound.getTag( ITEM_COUNT_TAG ); - short oldStoreditems = storedItems; + short oldStoredItems = storedItems; /* * if ( tagType instanceof NBTTagShort ) ((NBTTagShort) tagType).data = storedItems = (short) cellItems.size(); @@ -130,10 +130,10 @@ public class CellInventory implements ICellInventory tagCompound.setInteger( ITEM_COUNT_TAG, storedItemCount = itemCount ); // clean any old crusty stuff... - for (; x < oldStoreditems && x < MAX_ITEM_TYPES; x++) + for (; x < oldStoredItems && x < MAX_ITEM_TYPES; x++) { tagCompound.removeTag( ITEM_SLOT_ARR[x] ); - tagCompound.removeTag( ITEM_SLOTCOUNT_ARR[x] ); + tagCompound.removeTag( ITEM_SLOT_COUNT_ARR[x] ); } if ( container != null ) @@ -144,12 +144,12 @@ public class CellInventory implements ICellInventory if ( ITEM_SLOT_ARR == null ) { ITEM_SLOT_ARR = new String[MAX_ITEM_TYPES]; - ITEM_SLOTCOUNT_ARR = new String[MAX_ITEM_TYPES]; + ITEM_SLOT_COUNT_ARR = new String[MAX_ITEM_TYPES]; for (int x = 0; x < MAX_ITEM_TYPES; x++) { ITEM_SLOT_ARR[x] = ITEM_SLOT + x; - ITEM_SLOTCOUNT_ARR[x] = ITEM_SLOTCOUNT + x; + ITEM_SLOT_COUNT_ARR[x] = ITEM_SLOT_COUNT + x; } } @@ -349,9 +349,9 @@ public class CellInventory implements ICellInventory return blackList.contains( (input.getItemDamage() << Platform.DEF_OFFSET) | Item.getIdFromItem( input.getItem() ) ); } - private boolean isEmpty(IMEInventory meinv) + private boolean isEmpty(IMEInventory meInventory) { - return meinv.getAvailableItems( AEApi.instance().storage().createItemList() ).isEmpty(); + return meInventory.getAvailableItems( AEApi.instance().storage().createItemList() ).isEmpty(); } @Override @@ -369,8 +369,8 @@ public class CellInventory implements ICellInventory if ( CellInventory.isStorageCell( sharedItemStack ) ) { - IMEInventory meinv = getCell( sharedItemStack, null ); - if ( meinv != null && !isEmpty( meinv ) ) + IMEInventory meInventory = getCell( sharedItemStack, null ); + if ( meInventory != null && !isEmpty( meInventory ) ) return input; } diff --git a/src/main/java/appeng/me/storage/CellInventoryHandler.java b/src/main/java/appeng/me/storage/CellInventoryHandler.java index e5f35a09..98623a01 100644 --- a/src/main/java/appeng/me/storage/CellInventoryHandler.java +++ b/src/main/java/appeng/me/storage/CellInventoryHandler.java @@ -32,8 +32,8 @@ public class CellInventoryHandler extends MEInventoryHandler imple { Object o = this.internal; - if ( o instanceof MEPassthru ) - o = ((MEPassthru) o).getInternal(); + if ( o instanceof MEPassThrough ) + o = ((MEPassThrough) o).getInternal(); return (ICellInventory) (o instanceof ICellInventory ? o : null); } diff --git a/src/main/java/appeng/me/storage/MEInventoryHandler.java b/src/main/java/appeng/me/storage/MEInventoryHandler.java index 8bc33a73..0cf66a94 100644 --- a/src/main/java/appeng/me/storage/MEInventoryHandler.java +++ b/src/main/java/appeng/me/storage/MEInventoryHandler.java @@ -31,7 +31,7 @@ public class MEInventoryHandler> implements IMEInventoryHa if ( i instanceof IMEInventoryHandler ) internal = (IMEInventoryHandler) i; else - internal = new MEPassthru( i, channel ); + internal = new MEPassThrough( i, channel ); monitor = internal instanceof IMEMonitor ? (IMEMonitor) internal : null; } diff --git a/src/main/java/appeng/me/storage/MEMonitorPassthu.java b/src/main/java/appeng/me/storage/MEMonitorPassThrough.java similarity index 85% rename from src/main/java/appeng/me/storage/MEMonitorPassthu.java rename to src/main/java/appeng/me/storage/MEMonitorPassThrough.java index 36614907..a2907b2a 100644 --- a/src/main/java/appeng/me/storage/MEMonitorPassthu.java +++ b/src/main/java/appeng/me/storage/MEMonitorPassThrough.java @@ -15,7 +15,7 @@ import appeng.api.storage.data.IItemList; import appeng.util.Platform; import appeng.util.inv.ItemListIgnoreCrafting; -public class MEMonitorPassthu> extends MEPassthru implements IMEMonitor, IMEMonitorHandlerReceiver +public class MEMonitorPassThrough> extends MEPassThrough implements IMEMonitor, IMEMonitorHandlerReceiver { HashMap, Object> listeners = new HashMap(); @@ -23,7 +23,7 @@ public class MEMonitorPassthu> extends MEPassthru imple public BaseActionSource changeSource; - public MEMonitorPassthu(IMEInventory i, StorageChannel channel) { + public MEMonitorPassThrough(IMEInventory i, StorageChannel channel) { super( i, channel ); if ( i instanceof IMEMonitor ) monitor = (IMEMonitor) i; @@ -96,9 +96,9 @@ public class MEMonitorPassthu> extends MEPassthru imple while (i.hasNext()) { Entry, Object> e = i.next(); - IMEMonitorHandlerReceiver recv = e.getKey(); - if ( recv.isValid( e.getValue() ) ) - recv.postChange( this, change, source ); + IMEMonitorHandlerReceiver receiver = e.getKey(); + if ( receiver.isValid( e.getValue() ) ) + receiver.postChange( this, change, source ); else i.remove(); } @@ -111,9 +111,9 @@ public class MEMonitorPassthu> extends MEPassthru imple while (i.hasNext()) { Entry, Object> e = i.next(); - IMEMonitorHandlerReceiver recv = e.getKey(); - if ( recv.isValid( e.getValue() ) ) - recv.onListUpdate(); + IMEMonitorHandlerReceiver receiver = e.getKey(); + if ( receiver.isValid( e.getValue() ) ) + receiver.onListUpdate(); else i.remove(); } diff --git a/src/main/java/appeng/me/storage/MEPassthru.java b/src/main/java/appeng/me/storage/MEPassThrough.java similarity index 91% rename from src/main/java/appeng/me/storage/MEPassthru.java rename to src/main/java/appeng/me/storage/MEPassThrough.java index 1763c816..c95dfcec 100644 --- a/src/main/java/appeng/me/storage/MEPassthru.java +++ b/src/main/java/appeng/me/storage/MEPassThrough.java @@ -9,7 +9,7 @@ import appeng.api.storage.StorageChannel; import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IItemList; -public class MEPassthru> implements IMEInventoryHandler +public class MEPassThrough> implements IMEInventoryHandler { private IMEInventory internal; @@ -20,7 +20,7 @@ public class MEPassthru> implements IMEInventoryHandler return internal; } - public MEPassthru(IMEInventory i, StorageChannel channel) { + public MEPassThrough(IMEInventory i, StorageChannel channel) { this.channel = channel; setInternal( i ); } diff --git a/src/main/java/appeng/parts/AEBasePart.java b/src/main/java/appeng/parts/AEBasePart.java index 1381bda3..626dd9ec 100644 --- a/src/main/java/appeng/parts/AEBasePart.java +++ b/src/main/java/appeng/parts/AEBasePart.java @@ -372,7 +372,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea if ( memCardIS != null && useStandardMemoryCard() && memCardIS.getItem() instanceof IMemoryCard ) { - IMemoryCard memc = (IMemoryCard) memCardIS.getItem(); + IMemoryCard memoryCard = (IMemoryCard) memCardIS.getItem(); ItemStack is = getItemStack( PartItemStack.Network ); @@ -387,21 +387,21 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea NBTTagCompound data = downloadSettings( SettingsFrom.MEMORY_CARD ); if ( data != null ) { - memc.setMemoryCardContents( memCardIS, name, data ); - memc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED ); + memoryCard.setMemoryCardContents( memCardIS, name, data ); + memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED ); } } else { - String storedName = memc.getSettingsName( memCardIS ); - NBTTagCompound data = memc.getData( memCardIS ); + String storedName = memoryCard.getSettingsName( memCardIS ); + NBTTagCompound data = memoryCard.getData( memCardIS ); if ( name.equals( storedName ) ) { uploadSettings( SettingsFrom.MEMORY_CARD, data ); - memc.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED ); + memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED ); } else - memc.notifyUser( player, MemoryCardMessages.INVALID_MACHINE ); + memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE ); } return true; } diff --git a/src/main/java/appeng/parts/CableBusContainer.java b/src/main/java/appeng/parts/CableBusContainer.java index 06c690ce..705cbfbc 100644 --- a/src/main/java/appeng/parts/CableBusContainer.java +++ b/src/main/java/appeng/parts/CableBusContainer.java @@ -431,7 +431,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I return null; } - public Iterable getSelectedBoundingBoxsFromPool(boolean ignoreCableConnections, boolean includeFacades, Entity e, boolean visual) + public Iterable getSelectedBoundingBoxesFromPool(boolean ignoreCableConnections, boolean includeFacades, Entity e, boolean visual) { List boxes = new LinkedList(); diff --git a/src/main/java/appeng/parts/automation/PartFormationPlane.java b/src/main/java/appeng/parts/automation/PartFormationPlane.java index f668c382..d018bf07 100644 --- a/src/main/java/appeng/parts/automation/PartFormationPlane.java +++ b/src/main/java/appeng/parts/automation/PartFormationPlane.java @@ -83,7 +83,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine if ( Platform.isClient() ) return true; - Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_FPLANE ); + Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_FORMATION_PLANE ); return true; } @@ -117,7 +117,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine } @MENetworkEventSubscribe - public void updateChannels(MENetworkChannelsChanged chann) + public void updateChannels(MENetworkChannelsChanged changedChannels) { boolean currentActive = proxy.isActive(); if ( wasActive != currentActive ) diff --git a/src/main/java/appeng/parts/automation/PartLevelEmitter.java b/src/main/java/appeng/parts/automation/PartLevelEmitter.java index 31d9563a..8d49d3d6 100644 --- a/src/main/java/appeng/parts/automation/PartLevelEmitter.java +++ b/src/main/java/appeng/parts/automation/PartLevelEmitter.java @@ -270,7 +270,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH if ( Platform.isClient() ) return true; - Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_LEVELEMITTER ); + Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_LEVEL_EMITTER ); return true; } @@ -363,17 +363,17 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH // rh.renderInventoryBox( renderer ); } - double cenx; - double ceny; - double cenz; + double centerX; + double centerY; + double centerZ; public void addVertexWithUV(double x, double y, double z, double u, double v) { Tessellator var12 = Tessellator.instance; - x -= cenx; - y -= ceny; - z -= cenz; + x -= centerX; + y -= centerY; + z -= centerZ; if ( side == ForgeDirection.DOWN ) { @@ -411,9 +411,9 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH y = m; } - x += cenx;// + orientation.offsetX * 0.4; - y += ceny;// + orientation.offsetY * 0.4; - z += cenz;// + orientation.offsetZ * 0.4; + x += centerX;// + orientation.offsetX * 0.4; + y += centerY;// + orientation.offsetY * 0.4; + z += centerZ;// + orientation.offsetZ * 0.4; var12.addVertexWithUV( x, y, z, u, v ); } @@ -439,9 +439,9 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH IIcon offTexture = is.getIconIndex(); IIcon IIcon = (isOn ? CableBusTextures.LevelEmitterTorchOn.getIcon() : offTexture); // - cenx = baseX + 0.5; - ceny = baseY + 0.5; - cenz = baseZ + 0.5; + centerX = baseX + 0.5; + centerY = baseY + 0.5; + centerZ = baseZ + 0.5; baseY += 7.0 / 16.0; ; diff --git a/src/main/java/appeng/parts/automation/UpgradeInventory.java b/src/main/java/appeng/parts/automation/UpgradeInventory.java index cf077f20..2e82b3ac 100644 --- a/src/main/java/appeng/parts/automation/UpgradeInventory.java +++ b/src/main/java/appeng/parts/automation/UpgradeInventory.java @@ -16,7 +16,7 @@ import appeng.util.Platform; public class UpgradeInventory extends AppEngInternalInventory implements IAEAppEngInventory { - private final Object itemorblock; + private final Object itemOrBlock; private final IAEAppEngInventory parent; private boolean cached = false; @@ -31,7 +31,7 @@ public class UpgradeInventory extends AppEngInternalInventory implements IAEAppE super( null, s ); te = this; parent = _te; - itemorblock = itemOrBlock; + this.itemOrBlock = itemOrBlock; } @Override @@ -68,17 +68,17 @@ public class UpgradeInventory extends AppEngInternalInventory implements IAEAppE Integer max = null; for (ItemStack is : u.getSupported().keySet()) { - if ( is.getItem() == itemorblock ) + if ( is.getItem() == itemOrBlock ) { max = u.getSupported().get( is ); break; } - else if ( is.getItem() instanceof ItemBlock && Block.getBlockFromItem( is.getItem() ) == itemorblock ) + else if ( is.getItem() instanceof ItemBlock && Block.getBlockFromItem( is.getItem() ) == itemOrBlock ) { max = u.getSupported().get( is ); break; } - else if ( itemorblock instanceof ItemStack && Platform.isSameItem( (ItemStack) itemorblock, is ) ) + else if ( itemOrBlock instanceof ItemStack && Platform.isSameItem( (ItemStack) itemOrBlock, is ) ) { max = u.getSupported().get( is ); break; diff --git a/src/main/java/appeng/parts/layers/InvLayerData.java b/src/main/java/appeng/parts/layers/InvLayerData.java index aca4db67..40837a30 100644 --- a/src/main/java/appeng/parts/layers/InvLayerData.java +++ b/src/main/java/appeng/parts/layers/InvLayerData.java @@ -14,12 +14,12 @@ public class InvLayerData // cache of inventory state. final private int sides[][]; - final private List invs; + final private List inventories; final private List slots; public InvLayerData(int a[][], List b, List c) { sides = a; - invs = b; + inventories = b; slots = c; } @@ -34,10 +34,10 @@ public class InvLayerData return slots != null && slot >= 0 && slot < slots.size(); } - public ItemStack decrStackSize(int slot, int amount) + public ItemStack decreaseStackSize(int slot, int amount) { if ( isSlotValid( slot ) ) - return slots.get( slot ).decrStackSize( amount ); + return slots.get( slot ).decreaseStackSize( amount ); return null; } @@ -90,9 +90,9 @@ public class InvLayerData public void markDirty() { - if ( invs != null ) + if ( inventories != null ) { - for (IInventory inv : invs) + for (IInventory inv : inventories) inv.markDirty(); } } diff --git a/src/main/java/appeng/parts/layers/InvSot.java b/src/main/java/appeng/parts/layers/InvSot.java index 493492c7..dc90d52d 100644 --- a/src/main/java/appeng/parts/layers/InvSot.java +++ b/src/main/java/appeng/parts/layers/InvSot.java @@ -14,7 +14,7 @@ public class InvSot index = slot; } - public ItemStack decrStackSize(int j) + public ItemStack decreaseStackSize(int j) { return partInv.decrStackSize( index, j ); } diff --git a/src/main/java/appeng/parts/layers/LayerIEnergySink.java b/src/main/java/appeng/parts/layers/LayerIEnergySink.java index 213b35e8..64a1d496 100644 --- a/src/main/java/appeng/parts/layers/LayerIEnergySink.java +++ b/src/main/java/appeng/parts/layers/LayerIEnergySink.java @@ -85,7 +85,7 @@ public class LayerIEnergySink extends LayerBase implements IEnergySink interested++; } } - return interested == 1;// if more then one tile is interested we need to abandonship... + return interested == 1;// if more then one tile is interested we need to abandon... } @Override diff --git a/src/main/java/appeng/parts/layers/LayerIEnergySource.java b/src/main/java/appeng/parts/layers/LayerIEnergySource.java index a110e89b..8cb9a0d5 100644 --- a/src/main/java/appeng/parts/layers/LayerIEnergySource.java +++ b/src/main/java/appeng/parts/layers/LayerIEnergySource.java @@ -84,7 +84,7 @@ public class LayerIEnergySource extends LayerBase implements IEnergySource interested++; } } - return interested == 1;// if more then one tile is interested we need to abandonship... + return interested == 1;// if more then one tile is interested we need to abandon... } @Override diff --git a/src/main/java/appeng/parts/layers/LayerISidedInventory.java b/src/main/java/appeng/parts/layers/LayerISidedInventory.java index 805747a5..940a66ec 100644 --- a/src/main/java/appeng/parts/layers/LayerISidedInventory.java +++ b/src/main/java/appeng/parts/layers/LayerISidedInventory.java @@ -39,10 +39,10 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory { // cache of inventory state. int sideData[][] = null; - List invs = null; + List inventories = null; List slots = null; - invs = new ArrayList(); + inventories = new ArrayList(); int slotCount = 0; for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) @@ -52,13 +52,13 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory { ISidedInventory part = (ISidedInventory) bp; slotCount += part.getSizeInventory(); - invs.add( part ); + inventories.add( part ); } } - if ( invs.isEmpty() || slotCount == 0 ) + if ( inventories.isEmpty() || slotCount == 0 ) { - invs = null; + inventories = null; sideData = null; slots = null; } @@ -69,7 +69,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory int offsetForLayer = 0; int offsetForPart = 0; - for (ISidedInventory sides : invs) + for (ISidedInventory sides : inventories) { offsetForPart = 0; slotCount = sides.getSizeInventory(); @@ -94,7 +94,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory if ( sideData == null || slots == null ) invLayer = null; else - invLayer = new InvLayerData( sideData, invs, slots ); + invLayer = new InvLayerData( sideData, inventories, slots ); // make sure inventory is updated before we call FMP. super.notifyNeighbors(); @@ -106,7 +106,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory if ( invLayer == null ) return null; - return invLayer.decrStackSize( slot, amount ); + return invLayer.decreaseStackSize( slot, amount ); } @Override diff --git a/src/main/java/appeng/parts/misc/PartInterface.java b/src/main/java/appeng/parts/misc/PartInterface.java index 58e8db7e..3dc2ab53 100644 --- a/src/main/java/appeng/parts/misc/PartInterface.java +++ b/src/main/java/appeng/parts/misc/PartInterface.java @@ -72,13 +72,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg @MENetworkEventSubscribe public void stateChange(MENetworkChannelsChanged c) { - duality.notifyNeightbors(); + duality.notifyNeighbors(); } @MENetworkEventSubscribe public void stateChange(MENetworkPowerStatusChange c) { - duality.notifyNeightbors(); + duality.notifyNeighbors(); } @Override diff --git a/src/main/java/appeng/parts/misc/PartStorageBus.java b/src/main/java/appeng/parts/misc/PartStorageBus.java index a83df64b..7f2a372a 100644 --- a/src/main/java/appeng/parts/misc/PartStorageBus.java +++ b/src/main/java/appeng/parts/misc/PartStorageBus.java @@ -98,7 +98,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC } @MENetworkEventSubscribe - public void updateChannels(MENetworkChannelsChanged chann) + public void updateChannels(MENetworkChannelsChanged changedChannels) { updateStatus(); } @@ -340,21 +340,21 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC private void checkInterfaceVsStorageBus(TileEntity target, ForgeDirection side) { - IInterfaceHost achiv = null; + IInterfaceHost achievement = null; if ( target instanceof IInterfaceHost ) - achiv = (IInterfaceHost) target; + achievement = (IInterfaceHost) target; if ( target instanceof IPartHost ) { Object part = ((IPartHost) target).getPart( side ); if ( part instanceof IInterfaceHost ) - achiv = (IInterfaceHost) part; + achievement = (IInterfaceHost) part; } - if ( achiv != null ) + if ( achievement != null ) { - Platform.addStat( achiv.getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() ); + Platform.addStat( achievement.getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() ); Platform.addStat( getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() ); } } diff --git a/src/main/java/appeng/parts/networking/PartCable.java b/src/main/java/appeng/parts/networking/PartCable.java index b72b6258..ed60c474 100644 --- a/src/main/java/appeng/parts/networking/PartCable.java +++ b/src/main/java/appeng/parts/networking/PartCable.java @@ -312,7 +312,7 @@ public class PartCable extends AEBasePart implements IPartCable EnumSet myC = connections.clone(); boolean wasPowered = powered; powered = false; - boolean chchanged = false; + boolean channelsChanged = false; for (ForgeDirection d : ForgeDirection.values()) { @@ -321,7 +321,7 @@ public class PartCable extends AEBasePart implements IPartCable int ch = (sideOut >> (d.ordinal() * 4)) & 0xF; if ( ch != channelsOnSide[d.ordinal()] ) { - chchanged = true; + channelsChanged = true; channelsOnSide[d.ordinal()] = ch; } } @@ -342,7 +342,7 @@ public class PartCable extends AEBasePart implements IPartCable } } - return !myC.equals( connections ) || wasPowered != powered || chchanged; + return !myC.equals( connections ) || wasPowered != powered || channelsChanged; } @Override @@ -450,15 +450,15 @@ public class PartCable extends AEBasePart implements IPartCable public void renderGlassConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, ForgeDirection of) { TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ ); - IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null; + IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null; IGridHost gh = te instanceof IGridHost ? (IGridHost) te : null; rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) ); - if ( gh != null && ccph != null && gh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getColor() != AEColor.Transparent - && ccph.getPart( of.getOpposite() ) == null ) - rh.setTexture( getTexture( ccph.getColor() ) ); - else if ( ccph == null && gh != null && gh.getCableConnectionType( of ) != AECableType.GLASS ) + if ( gh != null && partHost != null && gh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getColor() != AEColor.Transparent + && partHost.getPart( of.getOpposite() ) == null ) + rh.setTexture( getTexture( partHost.getColor() ) ); + else if ( partHost == null && gh != null && gh.getCableConnectionType( of ) != AECableType.GLASS ) { rh.setTexture( getCoveredTexture( getCableColor() ) ); switch (of) @@ -562,15 +562,15 @@ public class PartCable extends AEBasePart implements IPartCable public void renderCoveredConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of) { TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ ); - IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null; + IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null; IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null; boolean isSmart = false; rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) ); - if ( ghh != null && ccph != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null - && ccph.getColor() != AEColor.Transparent ) - rh.setTexture( getGlassTexture( ccph.getColor() ) ); - else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) + if ( ghh != null && partHost != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && partHost.getPart( of.getOpposite() ) == null + && partHost.getColor() != AEColor.Transparent ) + rh.setTexture( getGlassTexture( partHost.getColor() ) ); + else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) { rh.setTexture( getCoveredTexture( getCableColor() ) ); switch (of) @@ -601,10 +601,10 @@ public class PartCable extends AEBasePart implements IPartCable rh.setTexture( getTexture( getCableColor() ) ); } - else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.COVERED && ccph.getColor() != AEColor.Transparent - && ccph.getPart( of.getOpposite() ) == null ) - rh.setTexture( getCoveredTexture( ccph.getColor() ) ); - else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.SMART && ccph.getPart( of.getOpposite() ) == null ) + else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.COVERED && partHost.getColor() != AEColor.Transparent + && partHost.getPart( of.getOpposite() ) == null ) + rh.setTexture( getCoveredTexture( partHost.getColor() ) ); + else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.SMART && partHost.getPart( of.getOpposite() ) == null ) { isSmart = true; rh.setTexture( getSmartTexture( getCableColor() ) ); @@ -642,8 +642,8 @@ public class PartCable extends AEBasePart implements IPartCable if ( isSmart ) { setSmartConnectionRotations( of, renderer ); - IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); - IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); + IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); + IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { @@ -654,11 +654,11 @@ public class PartCable extends AEBasePart implements IPartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( defa, defa, defa, defa, defa, defa ); + rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( defb, defb, defb, defb, defb, defb ); + rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0; @@ -668,23 +668,23 @@ public class PartCable extends AEBasePart implements IPartCable } @SideOnly(Side.CLIENT) - public void renderSmartConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of) + public void renderSmartConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of) { TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ ); - IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null; + IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null; IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null; boolean isGlass = false; AEColor myColor = getCableColor(); rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) ); - if ( ghh != null && ccph != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null - && ccph.getColor() != AEColor.Transparent ) + if ( ghh != null && partHost != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && partHost.getPart( of.getOpposite() ) == null + && partHost.getColor() != AEColor.Transparent ) { isGlass = true; - rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) ); + rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) ); } - else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of.getOpposite() ) != AECableType.GLASS ) + else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of.getOpposite() ) != AECableType.GLASS ) { rh.setTexture( getSmartTexture( myColor ) ); switch (of) @@ -715,8 +715,8 @@ public class PartCable extends AEBasePart implements IPartCable if ( true ) { setSmartConnectionRotations( of, renderer ); - IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); - IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); + IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); + IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { @@ -727,11 +727,11 @@ public class PartCable extends AEBasePart implements IPartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( myColor.blackVariant ); - rh.setTexture( defa, defa, defa, defa, defa, defa ); + rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); - rh.setTexture( defb, defb, defb, defb, defb, defb ); + rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0; @@ -740,9 +740,9 @@ public class PartCable extends AEBasePart implements IPartCable rh.setTexture( getTexture( getCableColor() ) ); } - else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent - && ccph.getPart( of.getOpposite() ) == null ) - rh.setTexture( getSmartTexture( myColor = ccph.getColor() ) ); + else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && partHost.getColor() != AEColor.Transparent + && partHost.getPart( of.getOpposite() ) == null ) + rh.setTexture( getSmartTexture( myColor = partHost.getColor() ) ); else rh.setTexture( getSmartTexture( getCableColor() ) ); @@ -777,16 +777,16 @@ public class PartCable extends AEBasePart implements IPartCable { setSmartConnectionRotations( of, renderer ); - IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); - IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); + IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); + IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( myColor.blackVariant ); - rh.setTexture( defa, defa, defa, defa, defa, defa ); + rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); - rh.setTexture( defb, defb, defb, defb, defb, defb ); + rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0; @@ -867,9 +867,9 @@ public class PartCable extends AEBasePart implements IPartCable else if ( connections.contains( dir ) ) { TileEntity te = this.tile.getWorldObj().getTileEntity( x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ ); - IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null; + IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null; IGridHost gh = te instanceof IGridHost ? (IGridHost) te : null; - if ( ccph == null && gh != null && gh.getCableConnectionType( dir ) != AECableType.GLASS ) + if ( partHost == null && gh != null && gh.getCableConnectionType( dir ) != AECableType.GLASS ) requireDetailed = true; } } diff --git a/src/main/java/appeng/parts/networking/PartCableCovered.java b/src/main/java/appeng/parts/networking/PartCableCovered.java index 36f461d8..80678aec 100644 --- a/src/main/java/appeng/parts/networking/PartCableCovered.java +++ b/src/main/java/appeng/parts/networking/PartCableCovered.java @@ -109,19 +109,19 @@ public class PartCableCovered extends PartCable GL11.glTranslated( -0.0, -0.0, 0.3 ); rh.setBounds( 5.0f, 5.0f, 2.0f, 11.0f, 11.0f, 14.0f ); - float offu = 0; - float offv = 9; + float offU = 0; + float offV = 9; - OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv ); + OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV ); for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN )) { rh.renderInventoryFace( main, side, renderer ); } - offu = 9; - offv = 0; - main = new OffsetIcon( getTexture( getCableColor() ), offu, offv ); + offU = 9; + offV = 0; + main = new OffsetIcon( getTexture( getCableColor() ), offU, offV ); for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST )) { diff --git a/src/main/java/appeng/parts/networking/PartCableSmart.java b/src/main/java/appeng/parts/networking/PartCableSmart.java index 517ed49e..0eca86ab 100644 --- a/src/main/java/appeng/parts/networking/PartCableSmart.java +++ b/src/main/java/appeng/parts/networking/PartCableSmart.java @@ -70,12 +70,12 @@ public class PartCableSmart extends PartCable { GL11.glTranslated( -0.0, -0.0, 0.3 ); - float offu = 0; - float offv = 9; + float offU = 0; + float offV = 9; - OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv ); - OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv ); - OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv ); + OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV ); + OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV ); + OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV ); for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN )) { @@ -85,11 +85,11 @@ public class PartCableSmart extends PartCable rh.renderInventoryFace( ch2, side, renderer ); } - offu = 9; - offv = 0; - main = new OffsetIcon( getTexture( getCableColor() ), offu, offv ); - ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv ); - ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv ); + offU = 9; + offV = 0; + main = new OffsetIcon( getTexture( getCableColor() ), offU, offV ); + ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV ); + ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV ); for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST )) { @@ -207,8 +207,8 @@ public class PartCableSmart extends PartCable rh.renderBlock( x, y, z, renderer ); setSmartConnectionRotations( of, renderer ); - IIcon defa = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f ); - IIcon defb = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f ); + IIcon firstIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f ); + IIcon secondIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f ); if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { @@ -219,11 +219,11 @@ public class PartCableSmart extends PartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( defa, defa, defa, defa, defa, defa ); + rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( defb, defb, defb, defb, defb, defb ); + rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0; @@ -237,7 +237,7 @@ public class PartCableSmart extends PartCable { for (ForgeDirection of : connections) { - renderSmartConection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of ); + renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of ); } rh.setTexture( getCoveredTexture( getCableColor() ) ); @@ -258,11 +258,11 @@ public class PartCableSmart extends PartCable IIcon def = getTexture( getCableColor() ); IIcon off = new OffsetIcon( def, 0, -12 ); - IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); - IIcon offa = new OffsetIcon( defa, 0, -12 ); + IIcon firstTaughtIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); + IIcon firstOffsetIcon = new OffsetIcon( firstTaughtIcon, 0, -12 ); - IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); - IIcon offb = new OffsetIcon( defb, 0, -12 ); + IIcon secondTaughtIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); + IIcon secondOffsetIcon = new OffsetIcon( secondTaughtIcon, 0, -12 ); switch (selectedSide) { @@ -280,11 +280,11 @@ public class PartCableSmart extends PartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( defa, defa, offa, offa, offa, offa ); + rh.setTexture( firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( defb, defb, offb, offb, offb, offb ); + rh.setTexture( secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); break; case EAST: @@ -306,21 +306,21 @@ public class PartCableSmart extends PartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); - FlippableIcon fpA = new FlippableIcon( defa ); - FlippableIcon fpB = new FlippableIcon( defb ); + FlippableIcon fpA = new FlippableIcon( firstTaughtIcon ); + FlippableIcon fpB = new FlippableIcon( secondTaughtIcon ); - fpA = new FlippableIcon( defa ); - fpB = new FlippableIcon( defb ); + fpA = new FlippableIcon( firstTaughtIcon ); + fpB = new FlippableIcon( secondTaughtIcon ); fpA.setFlip( true, false ); fpB.setFlip( true, false ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( offa, offa, offa, offa, defa, fpA ); + rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, fpA ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( offb, offb, offb, offb, defb, fpB ); + rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, fpB ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); break; case NORTH: @@ -337,11 +337,11 @@ public class PartCableSmart extends PartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( offa, offa, defa, defa, offa, offa ); + rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( offb, offb, defb, defb, offb, offb ); + rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); break; default: diff --git a/src/main/java/appeng/parts/networking/PartDenseCable.java b/src/main/java/appeng/parts/networking/PartDenseCable.java index 0116a747..6e61431d 100644 --- a/src/main/java/appeng/parts/networking/PartDenseCable.java +++ b/src/main/java/appeng/parts/networking/PartDenseCable.java @@ -85,12 +85,12 @@ public class PartDenseCable extends PartCable GL11.glTranslated( -0.0, -0.0, 0.3 ); rh.setBounds( 4.0f, 4.0f, 2.0f, 12.0f, 12.0f, 14.0f ); - float offu = 0; - float offv = 9; + float offU = 0; + float offV = 9; - OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv ); - OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv ); - OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv ); + OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV ); + OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV ); + OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV ); for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN )) { @@ -99,11 +99,11 @@ public class PartDenseCable extends PartCable rh.renderInventoryFace( ch2, side, renderer ); } - offu = 9; - offv = 0; - main = new OffsetIcon( getTexture( getCableColor() ), offu, offv ); - ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv ); - ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv ); + offU = 9; + offV = 0; + main = new OffsetIcon( getTexture( getCableColor() ), offU, offV ); + ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV ); + ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV ); for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST )) { @@ -227,22 +227,22 @@ public class PartDenseCable extends PartCable public void renderDenseConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of) { TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ ); - IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null; + IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null; IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null; boolean isGlass = false; AEColor myColor = getCableColor(); /* - * ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getPart( - * of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) ); - * } else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) { + * ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getPart( + * of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) ); + * } else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) { * rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN: rh.setBounds( 3, 0, 3, 13, 4, 13 ); * break; case EAST: rh.setBounds( 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13, 13, 4 * ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 ); break; case UP: rh.setBounds( 3, 12, 3, 13, 16, * 13 ); break; case WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; } rh.renderBlock( x, y, * z, renderer ); * - * if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon defa = new TaughtIcon( getChannelTex( - * channels, false ).getIcon(), -0.2f ); IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), + * if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon firstIcon = new TaughtIcon( getChannelTex( + * channels, false ).getIcon(), -0.2f ); IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), * -0.2f ); * * if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { AEBaseBlock blk = (AEBaseBlock) @@ -250,11 +250,11 @@ public class PartDenseCable extends PartCable * false, true ); } * * Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.instance.setColorOpaque_I( - * myColor.mediumVariant ); rh.setTexture( defa, defa, defa, defa, defa, defa ); renderAllFaces( (AEBaseBlock) + * myColor.mediumVariant ); rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock) * rh.getBlock(), x, y, z, renderer ); * - * Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( defb, defb, defb, defb, defb, - * defb ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer ); + * Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, + * secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer ); * * renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = * renderer.uvRotateTop = renderer.uvRotateWest = 0; } @@ -263,9 +263,9 @@ public class PartDenseCable extends PartCable */ rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of, of.getOpposite() ) ) ); - if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent - && ccph.getPart( of.getOpposite() ) == null ) - rh.setTexture( getTexture( myColor = ccph.getColor() ) ); + if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && partHost.getColor() != AEColor.Transparent + && partHost.getPart( of.getOpposite() ) == null ) + rh.setTexture( getTexture( myColor = partHost.getColor() ) ); else rh.setTexture( getTexture( getCableColor() ) ); @@ -300,16 +300,16 @@ public class PartDenseCable extends PartCable { setSmartConnectionRotations( of, renderer ); - IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); - IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); + IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); + IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( myColor.blackVariant ); - rh.setTexture( defa, defa, defa, defa, defa, defa ); + rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); - rh.setTexture( defb, defb, defb, defb, defb, defb ); + rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0; @@ -339,7 +339,7 @@ public class PartDenseCable extends PartCable if ( isDense( of ) ) renderDenseConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of ); else if ( isSmart( of ) ) - renderSmartConection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of ); + renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of ); else renderCoveredConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of ); } @@ -362,11 +362,11 @@ public class PartDenseCable extends PartCable IIcon def = getTexture( getCableColor() ); IIcon off = new OffsetIcon( def, 0, -12 ); - IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); - IIcon offa = new OffsetIcon( defa, 0, -12 ); + IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f ); + IIcon firstOffset = new OffsetIcon( firstIcon, 0, -12 ); - IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); - IIcon offb = new OffsetIcon( defb, 0, -12 ); + IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f ); + IIcon secondOffset = new OffsetIcon( secondIcon, 0, -12 ); switch (selectedSide) { @@ -384,11 +384,11 @@ public class PartDenseCable extends PartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( defa, defa, offa, offa, offa, offa ); + rh.setTexture( firstIcon, firstIcon, firstOffset, firstOffset, firstOffset, firstOffset ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( defb, defb, offb, offb, offb, offb ); + rh.setTexture( secondIcon, secondIcon, secondOffset, secondOffset, secondOffset, secondOffset ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); break; case EAST: @@ -410,21 +410,18 @@ public class PartDenseCable extends PartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); - FlippableIcon fpA = new FlippableIcon( defa ); - FlippableIcon fpB = new FlippableIcon( defb ); - - fpA = new FlippableIcon( defa ); - fpB = new FlippableIcon( defb ); + FlippableIcon fpA = new FlippableIcon( firstIcon ); + FlippableIcon fpB = new FlippableIcon( secondIcon ); fpA.setFlip( true, false ); fpB.setFlip( true, false ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( offa, offa, offa, offa, defa, fpA ); + rh.setTexture( firstOffset, firstOffset, firstOffset, firstOffset, firstIcon, fpA ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( offb, offb, offb, offb, defb, fpB ); + rh.setTexture( secondOffset, secondOffset, secondOffset, secondOffset, secondIcon, fpB ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); break; case NORTH: @@ -441,11 +438,11 @@ public class PartDenseCable extends PartCable Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 ); Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant ); - rh.setTexture( offa, offa, defa, defa, offa, offa ); + rh.setTexture( firstOffset, firstOffset, firstIcon, firstIcon, firstOffset, firstOffset ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant ); - rh.setTexture( offb, offb, defb, defb, offb, offb ); + rh.setTexture( secondOffset, secondOffset, secondIcon, secondIcon, secondOffset, secondOffset ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer ); break; default: diff --git a/src/main/java/appeng/parts/p2p/PartP2PBCPower.java b/src/main/java/appeng/parts/p2p/PartP2PBCPower.java index c62b01e6..ec07e913 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PBCPower.java +++ b/src/main/java/appeng/parts/p2p/PartP2PBCPower.java @@ -1,5 +1,6 @@ package appeng.parts.p2p; +import appeng.integration.abstraction.helpers.BaseMJPerdition; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -18,7 +19,6 @@ import appeng.core.settings.TickRates; import appeng.integration.IntegrationType; import appeng.integration.abstraction.IMJ5; import appeng.integration.abstraction.IMJ6; -import appeng.integration.abstraction.helpers.BaseMJperdition; import appeng.me.GridAccessException; import appeng.me.cache.helpers.TunnelCollection; import appeng.transformer.annotations.integration.Interface; @@ -40,7 +40,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class PartP2PBCPower extends PartP2PTunnel implements IPowerReceptor, ISidedBatteryProvider, IBatteryObject, IGridTickable { - BaseMJperdition pp; + BaseMJPerdition pp; public TunnelType getTunnelType() { @@ -55,7 +55,7 @@ public class PartP2PBCPower extends PartP2PTunnel implements IPo if ( AppEng.instance.isIntegrationEnabled( IntegrationType.MJ5 ) ) { - pp = (BaseMJperdition) ((IMJ5) AppEng.instance.getIntegration( IntegrationType.MJ5 )).createPerdition( this ); + pp = (BaseMJPerdition) ((IMJ5) AppEng.instance.getIntegration( IntegrationType.MJ5 )).createPerdition( this ); if ( pp != null ) pp.configure( 1, 380, 1.0f / 5.0f, 1000 ); } @@ -75,18 +75,18 @@ public class PartP2PBCPower extends PartP2PTunnel implements IPo if ( !output && proxy.isActive() ) { float totalRequiredPower = 0.0f; - TunnelCollection tunnelset; + TunnelCollection tunnels; try { - tunnelset = getOutputs(); + tunnels = getOutputs(); } catch (GridAccessException e) { return TickRateModulation.IDLE; } - for (PartP2PBCPower o : tunnelset) + for (PartP2PBCPower o : tunnels) { IPowerReceptor target = o.getPowerTarget(); if ( target != null ) @@ -94,14 +94,14 @@ public class PartP2PBCPower extends PartP2PTunnel implements IPo PowerReceiver tp = target.getPowerReceiver( side.getOpposite() ); if ( tp != null ) { - double howmuch = tp.powerRequest(); + double request = tp.powerRequest(); - if ( howmuch > tp.getMaxEnergyReceived() ) - howmuch = tp.getMaxEnergyReceived(); + if ( request > tp.getMaxEnergyReceived() ) + request = tp.getMaxEnergyReceived(); - if ( howmuch > 0.01 && howmuch > tp.getMinEnergyReceived() ) + if ( request > 0.01 && request > tp.getMinEnergyReceived() ) { - totalRequiredPower += howmuch; + totalRequiredPower += request; } } } @@ -114,7 +114,7 @@ public class PartP2PBCPower extends PartP2PTunnel implements IPo if ( currentTotal < 0.01 ) return TickRateModulation.SLOWER; - for (PartP2PBCPower o : tunnelset) + for (PartP2PBCPower o : tunnels) { IPowerReceptor target = o.getPowerTarget(); if ( target != null ) @@ -122,14 +122,14 @@ public class PartP2PBCPower extends PartP2PTunnel implements IPo PowerReceiver tp = target.getPowerReceiver( side.getOpposite() ); if ( tp != null ) { - double howmuch = tp.powerRequest(); + double request = tp.powerRequest(); - if ( howmuch > tp.getMaxEnergyReceived() ) - howmuch = tp.getMaxEnergyReceived(); + if ( request > tp.getMaxEnergyReceived() ) + request = tp.getMaxEnergyReceived(); - if ( howmuch > 0.01 && howmuch > tp.getMinEnergyReceived() ) + if ( request > 0.01 && request > tp.getMinEnergyReceived() ) { - double toPull = currentTotal * (howmuch / totalRequiredPower); + double toPull = currentTotal * (request / totalRequiredPower); double pulled = pp.useEnergy( 0, toPull, true ); QueueTunnelDrain( PowerUnits.MJ, pulled ); @@ -204,7 +204,7 @@ public class PartP2PBCPower extends PartP2PTunnel implements IPo public PowerReceiver getPowerReceiver(ForgeDirection side) { if ( side.equals( side ) ) - return ((BaseMJperdition) pp).getPowerReceiver(); + return ((BaseMJPerdition) pp).getPowerReceiver(); return null; } diff --git a/src/main/java/appeng/parts/p2p/PartP2PLiquids.java b/src/main/java/appeng/parts/p2p/PartP2PLiquids.java index 19250665..98939ac8 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PLiquids.java +++ b/src/main/java/appeng/parts/p2p/PartP2PLiquids.java @@ -93,10 +93,10 @@ public class PartP2PLiquids extends PartP2PTunnel implements IFl { for (PartP2PLiquids l : getOutputs()) { - IFluidHandler targ = l.getTarget(); - if ( targ != null ) + IFluidHandler handler = l.getTarget(); + if ( handler != null ) { - if ( targ.canFill( l.side.getOpposite(), input ) ) + if ( handler.canFill( l.side.getOpposite(), input ) ) outs.add( l ); } } diff --git a/src/main/java/appeng/parts/p2p/PartP2PRFPower.java b/src/main/java/appeng/parts/p2p/PartP2PRFPower.java index 2c5d5766..6d740177 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PRFPower.java +++ b/src/main/java/appeng/parts/p2p/PartP2PRFPower.java @@ -114,9 +114,9 @@ public class PartP2PRFPower extends PartP2PTunnel implements cof { if ( Platform.getRandomInt() % 2 > 0 ) { - int recv = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate ); - maxReceive -= recv; - total += recv; + int receiver = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate ); + maxReceive -= receiver; + total += receiver; if ( maxReceive <= 0 ) break; @@ -127,9 +127,9 @@ public class PartP2PRFPower extends PartP2PTunnel implements cof { for (PartP2PRFPower t : getOutputs()) { - int recv = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate ); - maxReceive -= recv; - total += recv; + int receiver = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate ); + maxReceive -= receiver; + total += receiver; if ( maxReceive <= 0 ) break; diff --git a/src/main/java/appeng/parts/p2p/PartP2PTunnel.java b/src/main/java/appeng/parts/p2p/PartP2PTunnel.java index 97f9ac2b..88dcd677 100644 --- a/src/main/java/appeng/parts/p2p/PartP2PTunnel.java +++ b/src/main/java/appeng/parts/p2p/PartP2PTunnel.java @@ -118,7 +118,7 @@ public class PartP2PTunnel extends PartBasicState } mc.notifyUser( player, MemoryCardMessages.INVALID_MACHINE ); } - else if ( tt != null ) // attune-ment + else if ( tt != null ) // attunement { ItemStack newType = null; @@ -268,12 +268,12 @@ public class PartP2PTunnel extends PartBasicState if ( freq == 0 ) return null; - PartP2PTunnel tunn; + PartP2PTunnel tunnel; try { - tunn = proxy.getP2P().getInput( freq ); - if ( getClass().isInstance( tunn ) ) - return (T) tunn; + tunnel = proxy.getP2P().getInput( freq ); + if ( getClass().isInstance( tunnel ) ) + return (T) tunnel; } catch (GridAccessException e) { diff --git a/src/main/java/appeng/parts/reporting/PartConversionMonitor.java b/src/main/java/appeng/parts/reporting/PartConversionMonitor.java index e5fafea0..a600ddba 100644 --- a/src/main/java/appeng/parts/reporting/PartConversionMonitor.java +++ b/src/main/java/appeng/parts/reporting/PartConversionMonitor.java @@ -23,10 +23,10 @@ public class PartConversionMonitor extends PartStorageMonitor public PartConversionMonitor(ItemStack is) { super( PartConversionMonitor.class, is ); - frontBright = CableBusTextures.PartConvMonitor_Bright; - frontColored = CableBusTextures.PartConvMonitor_Colored; - frontDark = CableBusTextures.PartConvMonitor_Dark; - // frontSolid = CableBusTextures.PartConvMonitor_Solid; + frontBright = CableBusTextures.PartConversionMonitor_Bright; + frontColored = CableBusTextures.PartConversionMonitor_Colored; + frontDark = CableBusTextures.PartConversionMonitor_Dark; + // frontSolid = CableBusTextures.PartConversionMonitor_Solid; } @Override diff --git a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java index 04d75c47..4007df53 100644 --- a/src/main/java/appeng/parts/reporting/PartPatternTerminal.java +++ b/src/main/java/appeng/parts/reporting/PartPatternTerminal.java @@ -94,14 +94,14 @@ public class PartPatternTerminal extends PartTerminal implements IAEAppEngInvent for (int x = 0; x < crafting.getSizeInventory() && x < details.getInputs().length; x++) { - IAEItemStack aeis = details.getInputs()[x]; - crafting.setInventorySlotContents( x, aeis == null ? null : aeis.getItemStack() ); + IAEItemStack item = details.getInputs()[x]; + crafting.setInventorySlotContents( x, item == null ? null : item.getItemStack() ); } for (int x = 0; x < output.getSizeInventory() && x < details.getOutputs().length; x++) { - IAEItemStack aeis = details.getOutputs()[x]; - output.setInventorySlotContents( x, aeis == null ? null : aeis.getItemStack() ); + IAEItemStack item = details.getOutputs()[x]; + output.setInventorySlotContents( x, item == null ? null : item.getItemStack() ); } } } diff --git a/src/main/java/appeng/recipes/RecipeHandler.java b/src/main/java/appeng/recipes/RecipeHandler.java index 5529e5f7..145f0d6e 100644 --- a/src/main/java/appeng/recipes/RecipeHandler.java +++ b/src/main/java/appeng/recipes/RecipeHandler.java @@ -216,7 +216,7 @@ public class RecipeHandler implements IRecipeHandler { return getName( is ); } - catch (RecipeError notappicable) + catch (RecipeError ignored) { } } diff --git a/src/main/java/appeng/recipes/game/DisassembleRecipe.java b/src/main/java/appeng/recipes/game/DisassembleRecipe.java index 2ec0192b..68e181be 100644 --- a/src/main/java/appeng/recipes/game/DisassembleRecipe.java +++ b/src/main/java/appeng/recipes/game/DisassembleRecipe.java @@ -18,7 +18,7 @@ public class DisassembleRecipe implements IRecipe private Materials mats = AEApi.instance().materials(); private Items items = AEApi.instance().items(); - private Blocks blks = AEApi.instance().blocks(); + private Blocks blocks = AEApi.instance().blocks(); private ItemStack getOutput(InventoryCrafting inv, boolean createFacade) { @@ -59,16 +59,16 @@ public class DisassembleRecipe implements IRecipe if ( items.itemEncodedPattern.sameAsStack( is ) ) hasCell = mats.materialBlankPattern.stack( 1 ); - if ( blks.blockCraftingStorage1k.sameAsStack( is ) ) + if ( blocks.blockCraftingStorage1k.sameAsStack( is ) ) hasCell = mats.materialCell1kPart.stack( 1 ); - if ( blks.blockCraftingStorage4k.sameAsStack( is ) ) + if ( blocks.blockCraftingStorage4k.sameAsStack( is ) ) hasCell = mats.materialCell4kPart.stack( 1 ); - if ( blks.blockCraftingStorage16k.sameAsStack( is ) ) + if ( blocks.blockCraftingStorage16k.sameAsStack( is ) ) hasCell = mats.materialCell16kPart.stack( 1 ); - if ( blks.blockCraftingStorage64k.sameAsStack( is ) ) + if ( blocks.blockCraftingStorage64k.sameAsStack( is ) ) hasCell = mats.materialCell64kPart.stack( 1 ); if ( hasCell == null ) diff --git a/src/main/java/appeng/server/Commands.java b/src/main/java/appeng/server/Commands.java index fdb4fc98..550c9620 100644 --- a/src/main/java/appeng/server/Commands.java +++ b/src/main/java/appeng/server/Commands.java @@ -5,7 +5,7 @@ import appeng.server.subcommands.Supporters; public enum Commands { - chunklogger(4, new ChunkLogger()), supporters(0, new Supporters()); + Chunklogger(4, new ChunkLogger()), supporters(0, new Supporters()); public final int level; public final ISubCommand command; diff --git a/src/main/java/appeng/server/ServerHelper.java b/src/main/java/appeng/server/ServerHelper.java index 7b4db7bc..6d89c715 100644 --- a/src/main/java/appeng/server/ServerHelper.java +++ b/src/main/java/appeng/server/ServerHelper.java @@ -76,7 +76,7 @@ public class ServerHelper extends CommonHelper } @Override - public void postinit() + public void postInit() { } diff --git a/src/main/java/appeng/services/CompassService.java b/src/main/java/appeng/services/CompassService.java index 57870291..79726aa4 100644 --- a/src/main/java/appeng/services/CompassService.java +++ b/src/main/java/appeng/services/CompassService.java @@ -89,61 +89,61 @@ public class CompassService implements ThreadFactory // spiral outward... for (int offset = 1; offset < maxRange; offset++) { - int minx = cx - offset; - int minz = cz - offset; - int maxx = cx + offset; - int maxz = cz + offset; + int minX = cx - offset; + int minZ = cz - offset; + int maxX = cx + offset; + int maxZ = cz + offset; int closest = Integer.MAX_VALUE; int chosen_x = cx; int chosen_z = cz; - for (int z = minz; z <= maxz; z++) + for (int z = minZ; z <= maxZ; z++) { - if ( cr.hasBeacon( minx, z ) ) + if ( cr.hasBeacon( minX, z ) ) { - int closeness = dist( cx, cz, minx, z ); + int closeness = dist( cx, cz, minX, z ); if ( closeness < closest ) { closest = closeness; - chosen_x = minx; + chosen_x = minX; chosen_z = z; } } - if ( cr.hasBeacon( maxx, z ) ) + if ( cr.hasBeacon( maxX, z ) ) { - int closeness = dist( cx, cz, maxx, z ); + int closeness = dist( cx, cz, maxX, z ); if ( closeness < closest ) { closest = closeness; - chosen_x = maxx; + chosen_x = maxX; chosen_z = z; } } } - for (int x = minx + 1; x < maxx; x++) + for (int x = minX + 1; x < maxX; x++) { - if ( cr.hasBeacon( x, minz ) ) + if ( cr.hasBeacon( x, minZ ) ) { - int closeness = dist( cx, cz, x, minz ); + int closeness = dist( cx, cz, x, minZ ); if ( closeness < closest ) { closest = closeness; chosen_x = x; - chosen_z = minz; + chosen_z = minZ; } } - if ( cr.hasBeacon( x, maxz ) ) + if ( cr.hasBeacon( x, maxZ ) ) { - int closeness = dist( cx, cz, x, maxz ); + int closeness = dist( cx, cz, x, maxZ ); if ( closeness < closest ) { closest = closeness; chosen_x = x; - chosen_z = maxz; + chosen_z = maxZ; } } } diff --git a/src/main/java/appeng/services/helpers/CompassRegion.java b/src/main/java/appeng/services/helpers/CompassRegion.java index 2b9eb068..dbc6a958 100644 --- a/src/main/java/appeng/services/helpers/CompassRegion.java +++ b/src/main/java/appeng/services/helpers/CompassRegion.java @@ -117,7 +117,7 @@ public class CompassRegion // raf.seek( cx + cz * 0x400 ); // return raf.readByte(); } - catch (IndexOutOfBoundsException outofBounds) + catch (IndexOutOfBoundsException outOfBounds) { return 0; } diff --git a/src/main/java/appeng/spatial/CachedPlane.java b/src/main/java/appeng/spatial/CachedPlane.java index df1a6415..5f0939ec 100644 --- a/src/main/java/appeng/spatial/CachedPlane.java +++ b/src/main/java/appeng/spatial/CachedPlane.java @@ -35,14 +35,14 @@ public class CachedPlane private ExtendedBlockStorage[] storage; - public Column(Chunk _c, int _x, int _z, int cy, int y_clen) { + public Column(Chunk _c, int _x, int _z, int cy, int chunkHeight) { x = _x; z = _z; c = _c; storage = c.getBlockStorageArray(); // make sure storage exists before hand... - for (int ay = 0; ay < y_clen; ay++) + for (int ay = 0; ay < chunkHeight; ay++) { int by = (ay + cy); ExtendedBlockStorage extendedblockstorage = storage[by]; @@ -56,11 +56,11 @@ public class CachedPlane if ( blk[0] == matrixFrame ) blk[0] = Platform.air; - ExtendedBlockStorage extendedblockstorage = storage[y >> 4]; - extendedblockstorage.func_150818_a( x, y & 15, z, (Block) blk[0] ); - // extendedblockstorage.setExtBlockID( x, y & 15, z, blk[0] ); - extendedblockstorage.setExtBlockMetadata( x, y & 15, z, (Integer) blk[1] ); - extendedblockstorage.setExtBlocklightValue( x, y & 15, z, (Integer) blk[2] ); + ExtendedBlockStorage extendedBlockStorage = storage[y >> 4]; + extendedBlockStorage.func_150818_a( x, y & 15, z, (Block) blk[0] ); + // extendedBlockStorage.setExtBlockID( x, y & 15, z, blk[0] ); + extendedBlockStorage.setExtBlockMetadata( x, y & 15, z, (Integer) blk[1] ); + extendedBlockStorage.setExtBlocklightValue( x, y & 15, z, (Integer) blk[2] ); } public Object[] getDetails(int y) @@ -72,7 +72,7 @@ public class CachedPlane return ch; } - public boolean dontSkip(int y) + public boolean doNotSkip(int y) { ExtendedBlockStorage extendedblockstorage = storage[y >> 4]; if ( reg.isBlacklisted( extendedblockstorage.getBlockByExtId( x, y & 15, z ) ) ) @@ -116,24 +116,24 @@ public class CachedPlane LinkedList updates = new LinkedList(); - public CachedPlane(World w, int minx, int miny, int minz, int maxx, int maxy, int maxz) { + public CachedPlane(World w, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) { world = w; - x_size = maxx - minx + 1; - y_size = maxy - miny + 1; - z_size = maxz - minz + 1; + x_size = maxX - minX + 1; + y_size = maxY - minY + 1; + z_size = maxZ - minZ + 1; - x_offset = minx; - y_offset = miny; - z_offset = minz; + x_offset = minX; + y_offset = minY; + z_offset = minZ; - int minCX = minx >> 4; - int minCY = miny >> 4; - int minCZ = minz >> 4; - int maxCX = maxx >> 4; - int maxCY = maxy >> 4; - int maxCZ = maxz >> 4; + int minCX = minX >> 4; + int minCY = minY >> 4; + int minCZ = minZ >> 4; + int maxCX = maxX >> 4; + int maxCY = maxY >> 4; + int maxCZ = maxZ >> 4; cx_size = maxCX - minCX + 1; int cy_size = maxCY - minCY + 1; @@ -151,7 +151,7 @@ public class CachedPlane for (int x = 0; x < x_size; x++) for (int z = 0; z < z_size; z++) { - myColumns[x][z] = new Column( w.getChunkFromChunkCoords( (minx + x) >> 4, (minz + z) >> 4 ), (minx + x) & 0xF, (minz + z) & 0xF, minCY, cy_size ); + myColumns[x][z] = new Column( w.getChunkFromChunkCoords( (minX + x) >> 4, (minZ + z) >> 4 ), (minX + x) & 0xF, (minZ + z) & 0xF, minCY, cy_size ); } IMovableRegistry mr = AEApi.instance().registries().movable(); @@ -170,7 +170,7 @@ public class CachedPlane { ChunkPosition cp = tx.getKey(); TileEntity te = tx.getValue(); - if ( te.xCoord >= minx && te.xCoord <= maxx && te.yCoord >= miny && te.yCoord <= maxy && te.zCoord >= minz && te.zCoord <= maxz ) + if ( te.xCoord >= minX && te.xCoord <= maxX && te.yCoord >= minY && te.yCoord <= maxY && te.zCoord >= minZ && te.zCoord <= maxZ ) { if ( mr.askToMove( te ) ) { @@ -179,10 +179,10 @@ public class CachedPlane } else { - Object[] details = myColumns[te.xCoord - minx][te.zCoord - minz].getDetails( te.yCoord ); + Object[] details = myColumns[te.xCoord - minX][te.zCoord - minZ].getDetails( te.yCoord ); Block blk = (Block) details[0]; - // don't skip air, juset let the code replace it... + // don't skip air, just let the code replace it... if ( blk != null && blk.isAir( c.worldObj, te.xCoord, te.yCoord, te.zCoord ) && blk.isReplaceable( c.worldObj, te.xCoord, te.yCoord, te.zCoord ) ) { @@ -190,7 +190,7 @@ public class CachedPlane c.worldObj.notifyBlocksOfNeighborChange( te.xCoord, te.yCoord, te.zCoord, Platform.air ); } else - myColumns[te.xCoord - minx][te.zCoord - minz].setSkip( te.yCoord ); + myColumns[te.xCoord - minX][te.zCoord - minZ].setSkip( te.yCoord ); } } } @@ -206,12 +206,12 @@ public class CachedPlane { for (Object o : list) { - NextTickListEntry ntle = (NextTickListEntry) o; - if ( ntle.xCoord >= minx && ntle.xCoord <= maxx && ntle.yCoord >= miny && ntle.yCoord <= maxy && ntle.zCoord >= minz - && ntle.zCoord <= maxz ) + NextTickListEntry entry = (NextTickListEntry) o; + if ( entry.xCoord >= minX && entry.xCoord <= maxX && entry.yCoord >= minY && entry.yCoord <= maxY && entry.zCoord >= minZ + && entry.zCoord <= maxZ ) { - NextTickListEntry newEntry = new NextTickListEntry( ntle.xCoord, ntle.yCoord, ntle.zCoord, ntle.func_151351_a() ); - newEntry.scheduledTime = ntle.scheduledTime - k; + NextTickListEntry newEntry = new NextTickListEntry( entry.xCoord, entry.yCoord, entry.zCoord, entry.func_151351_a() ); + newEntry.scheduledTime = entry.scheduledTime - k; ticks.add( newEntry ); } } @@ -260,7 +260,7 @@ public class CachedPlane int src_y = y + y_offset; int dst_y = y + dst.y_offset; - if ( a.dontSkip( src_y ) && b.dontSkip( dst_y ) ) + if ( a.doNotSkip( src_y ) && b.doNotSkip( dst_y ) ) { Object[] aD = a.getDetails( src_y ); Object[] bD = b.getDetails( dst_y ); @@ -292,14 +292,14 @@ public class CachedPlane addTile( te.xCoord - dst.x_offset, te.yCoord - dst.y_offset, te.zCoord - dst.z_offset, te, dst, mr ); } - for (NextTickListEntry ntle : ticks) + for (NextTickListEntry entry : ticks) { - dst.addTick( ntle.xCoord - x_offset, ntle.yCoord - y_offset, ntle.zCoord - z_offset, ntle ); + dst.addTick( entry.xCoord - x_offset, entry.yCoord - y_offset, entry.zCoord - z_offset, entry ); } - for (NextTickListEntry ntle : dst.ticks) + for (NextTickListEntry entry : dst.ticks) { - addTick( ntle.xCoord - dst.x_offset, ntle.yCoord - dst.y_offset, ntle.zCoord - dst.z_offset, ntle ); + addTick( entry.xCoord - dst.x_offset, entry.yCoord - dst.y_offset, entry.zCoord - dst.z_offset, entry ); } startTime = System.nanoTime(); @@ -319,9 +319,9 @@ public class CachedPlane updates.add( new WorldCoord( src_x + d.offsetX, src_y + d.offsetY, src_z + d.offsetZ ) ); } - private void addTick(int x, int y, int z, NextTickListEntry ntle) + private void addTick(int x, int y, int z, NextTickListEntry entry) { - world.scheduleBlockUpdate( x + x_offset, y + y_offset, z + z_offset, ntle.func_151351_a(), (int) ntle.scheduledTime ); + world.scheduleBlockUpdate( x + x_offset, y + y_offset, z + z_offset, entry.func_151351_a(), (int) entry.scheduledTime ); } private void addTile(int x, int y, int z, TileEntity te, CachedPlane alternateDest, IMovableRegistry mr) @@ -330,7 +330,7 @@ public class CachedPlane { Column c = myColumns[x][z]; - if ( c.dontSkip( y + y_offset ) || alternateDest == null ) + if ( c.doNotSkip( y + y_offset ) || alternateDest == null ) { IMovableHandler handler = getHandler( te ); diff --git a/src/main/java/appeng/spatial/StorageChunkProvider.java b/src/main/java/appeng/spatial/StorageChunkProvider.java index deb19df4..aad95079 100644 --- a/src/main/java/appeng/spatial/StorageChunkProvider.java +++ b/src/main/java/appeng/spatial/StorageChunkProvider.java @@ -15,15 +15,15 @@ import appeng.core.AEConfig; public class StorageChunkProvider extends ChunkProviderGenerate implements IChunkProvider { - final static Block[] ablock; + final static Block[] blocks; static { - ablock = new Block[255 * 256]; + blocks = new Block[255 * 256]; Block matrixFrame = AEApi.instance().blocks().blockMatrixFrame.block(); - for (int x = 0; x < ablock.length; x++) - ablock[x] = matrixFrame; + for (int x = 0; x < blocks.length; x++) + blocks[x] = matrixFrame; } @@ -43,13 +43,13 @@ public class StorageChunkProvider extends ChunkProviderGenerate implements IChun @Override public Chunk provideChunk(int x, int z) { - Chunk chunk = new Chunk( w, ablock, x, z ); + Chunk chunk = new Chunk( w, blocks, x, z ); - byte[] abyte = chunk.getBiomeArray(); + byte[] biomes = chunk.getBiomeArray(); AEConfig config = AEConfig.instance; - for (int k = 0; k < abyte.length; ++k) - abyte[k] = (byte) config.storageBiomeID; + for (int k = 0; k < biomes.length; ++k) + biomes[k] = (byte) config.storageBiomeID; if ( !chunk.isTerrainPopulated ) { diff --git a/src/main/java/appeng/spatial/StorageHelper.java b/src/main/java/appeng/spatial/StorageHelper.java index 925aafe0..ef9c9a37 100644 --- a/src/main/java/appeng/spatial/StorageHelper.java +++ b/src/main/java/appeng/spatial/StorageHelper.java @@ -241,27 +241,27 @@ public class StorageHelper return entity; } - public void transverseEdges(int minx, int miny, int minz, int maxx, int maxy, int maxz, ISpatialVisitor obj) + public void transverseEdges(int minX, int minY, int minZ, int maxX, int maxY, int maxZ, ISpatialVisitor visitor) { - for (int y = miny; y < maxy; y++) - for (int z = minz; z < maxz; z++) + for (int y = minY; y < maxY; y++) + for (int z = minZ; z < maxZ; z++) { - obj.visit( minx, y, z ); - obj.visit( maxx, y, z ); + visitor.visit( minX, y, z ); + visitor.visit( maxX, y, z ); } - for (int x = minx; x < maxx; x++) - for (int z = minz; z < maxz; z++) + for (int x = minX; x < maxX; x++) + for (int z = minZ; z < maxZ; z++) { - obj.visit( x, miny, z ); - obj.visit( x, maxy, z ); + visitor.visit( x, minY, z ); + visitor.visit( x, maxY, z ); } - for (int x = minx; x < maxx; x++) - for (int y = miny; y < maxy; y++) + for (int x = minX; x < maxX; x++) + for (int y = minY; y < maxY; y++) { - obj.visit( x, y, minz ); - obj.visit( x, y, maxz ); + visitor.visit( x, y, minZ ); + visitor.visit( x, y, maxZ ); } } diff --git a/src/main/java/appeng/tile/crafting/TileCraftingTile.java b/src/main/java/appeng/tile/crafting/TileCraftingTile.java index 39c75709..dd11a4c0 100644 --- a/src/main/java/appeng/tile/crafting/TileCraftingTile.java +++ b/src/main/java/appeng/tile/crafting/TileCraftingTile.java @@ -36,7 +36,7 @@ import appeng.util.Platform; public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IPowerChannelState { - CraftingCPUCluster clust; + CraftingCPUCluster cluster; final CraftingCPUCalculator calc = new CraftingCPUCalculator( this ); public ISimplifiedBundle lightCache; @@ -62,10 +62,10 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP public void updateStatus(CraftingCPUCluster c) { - if ( clust != null && clust != c ) - clust.breakCluster(); + if ( cluster != null && cluster != c ) + cluster.breakCluster(); - clust = c; + cluster = c; updateMeta( true ); } @@ -77,16 +77,16 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP public void setName(String name) { super.setName( name ); - if ( clust != null ) - clust.updateName(); + if ( cluster != null ) + cluster.updateName(); } @TileEvent(TileEventType.WORLD_NBT_WRITE) public void writeToNBT_TileCraftingTile(NBTTagCompound data) { data.setBoolean( "core", isCoreBlock ); - if ( isCoreBlock && clust != null ) - clust.writeToNBT( data ); + if ( isCoreBlock && cluster != null ) + cluster.writeToNBT( data ); } @TileEvent(TileEventType.WORLD_NBT_READ) @@ -95,8 +95,8 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP isCoreBlock = data.getBoolean( "core" ); if ( isCoreBlock ) { - if ( clust != null ) - clust.readFromNBT( data ); + if ( cluster != null ) + cluster.readFromNBT( data ); else previousState = (NBTTagCompound) data.copy(); } @@ -125,9 +125,9 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP @Override public void disconnect(boolean update) { - if ( clust != null ) + if ( cluster != null ) { - clust.destroy(); + cluster.destroy(); if ( update ) updateMeta( true ); } @@ -157,10 +157,10 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP power = gridProxy.isActive(); int current = worldObj.getBlockMetadata( xCoord, yCoord, zCoord ); - int newmeta = (current & 3) | (formed ? 8 : 0) | (power ? 4 : 0); + int newMeta = (current & 3) | (formed ? 8 : 0) | (power ? 4 : 0); - if ( current != newmeta ) - worldObj.setBlockMetadataWithNotify( xCoord, yCoord, zCoord, newmeta, 2 ); + if ( current != newMeta ) + worldObj.setBlockMetadataWithNotify( xCoord, yCoord, zCoord, newMeta, 2 ); if ( updateFormed ) { @@ -174,7 +174,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP @Override public IAECluster getCluster() { - return clust; + return cluster; } @Override @@ -195,7 +195,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP { if ( Platform.isClient() ) return (worldObj.getBlockMetadata( xCoord, yCoord, zCoord ) & 8) == 8; - return clust != null; + return cluster != null; } public boolean isAccelerator() @@ -230,14 +230,14 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP public void breakCluster() { - if ( clust != null ) + if ( cluster != null ) { - clust.cancel(); - IMEInventory inv = clust.getInventory(); + cluster.cancel(); + IMEInventory inv = cluster.getInventory(); LinkedList places = new LinkedList(); - Iterator i = clust.getTiles(); + Iterator i = cluster.getTiles(); while (i.hasNext()) { IGridHost h = i.next(); @@ -269,7 +269,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP ais.setStackSize( ais.getItemStack().getMaxStackSize() ); while (true) { - IAEItemStack g = inv.extractItems( ais.copy(), Actionable.MODULATE, clust.getActionSource() ); + IAEItemStack g = inv.extractItems( ais.copy(), Actionable.MODULATE, cluster.getActionSource() ); if ( g == null ) break; @@ -281,7 +281,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP } - clust.destroy(); + cluster.destroy(); } } } diff --git a/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java b/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java index 485524da..5720aaa1 100644 --- a/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java +++ b/src/main/java/appeng/tile/crafting/TileMolecularAssembler.java @@ -197,9 +197,9 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn ItemStack pattern = myPlan.getPattern(); if ( pattern != null ) { - NBTTagCompound pdata = new NBTTagCompound(); - pattern.writeToNBT( pdata ); - data.setTag( "myPlan", pdata ); + NBTTagCompound compound = new NBTTagCompound(); + pattern.writeToNBT( compound ); + data.setTag( "myPlan", compound ); data.setInteger( "pushDirection", pushDirection.ordinal() ); } } diff --git a/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java b/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java index 337025e0..d2659f35 100644 --- a/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java +++ b/src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java @@ -75,7 +75,7 @@ public class AppEngInternalAEInventory implements IInventory, Iterable aeiterator() + public Iterator getNewAEIterator() { return new AEInvIterator( this ); } diff --git a/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java b/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java index 8eb075ce..91ad150c 100644 --- a/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java +++ b/src/main/java/appeng/tile/inventory/AppEngInternalInventory.java @@ -22,7 +22,7 @@ public class AppEngInternalInventory implements IInventory, Iterable public boolean enableClientEvents = false; protected ItemStack inv[]; - public IMEInventory getIMEI() + public IMEInventory getMEInventory() { return new MEIInventoryWrapper( this, null ); } @@ -76,7 +76,7 @@ public class AppEngInternalInventory implements IInventory, Iterable if ( te != null && eventsEnabled() ) { - te.onChangeInventory( this, slot, InvOperation.decrStackSize, ns, null ); + te.onChangeInventory( this, slot, InvOperation.decreaseStackSize, ns, null ); } markDirty(); diff --git a/src/main/java/appeng/tile/inventory/InvOperation.java b/src/main/java/appeng/tile/inventory/InvOperation.java index d417f153..297dbe25 100644 --- a/src/main/java/appeng/tile/inventory/InvOperation.java +++ b/src/main/java/appeng/tile/inventory/InvOperation.java @@ -2,6 +2,6 @@ package appeng.tile.inventory; public enum InvOperation { - decrStackSize, setInventorySlotContents, markDirty + decreaseStackSize, setInventorySlotContents, markDirty } diff --git a/src/main/java/appeng/tile/misc/TileCellWorkbench.java b/src/main/java/appeng/tile/misc/TileCellWorkbench.java index 954f7aab..8e3e63ed 100644 --- a/src/main/java/appeng/tile/misc/TileCellWorkbench.java +++ b/src/main/java/appeng/tile/misc/TileCellWorkbench.java @@ -37,15 +37,15 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I { if ( cacheUpgrades == null ) { - ICellWorkbenchItem cwbi = getCell(); - if ( cwbi == null ) + ICellWorkbenchItem cell = getCell(); + if ( cell == null ) return null; - ItemStack is = cell.getStackInSlot( 0 ); + ItemStack is = this.cell.getStackInSlot( 0 ); if ( is == null ) return null; - IInventory inv = cwbi.getUpgradesInventory( is ); + IInventory inv = cell.getUpgradesInventory( is ); if ( inv == null ) return null; @@ -58,15 +58,15 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I { if ( cacheConfig == null ) { - ICellWorkbenchItem cwbi = getCell(); - if ( cwbi == null ) + ICellWorkbenchItem cell = getCell(); + if ( cell == null ) return null; - ItemStack is = cell.getStackInSlot( 0 ); + ItemStack is = this.cell.getStackInSlot( 0 ); if ( is == null ) return null; - IInventory inv = cwbi.getConfigInventory( is ); + IInventory inv = cell.getConfigInventory( is ); if ( inv == null ) return null; diff --git a/src/main/java/appeng/tile/misc/TileInterface.java b/src/main/java/appeng/tile/misc/TileInterface.java index 7286a2a3..c50da4ab 100644 --- a/src/main/java/appeng/tile/misc/TileInterface.java +++ b/src/main/java/appeng/tile/misc/TileInterface.java @@ -55,13 +55,13 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS @MENetworkEventSubscribe public void stateChange(MENetworkChannelsChanged c) { - duality.notifyNeightbors(); + duality.notifyNeighbors(); } @MENetworkEventSubscribe public void stateChange(MENetworkPowerStatusChange c) { - duality.notifyNeightbors(); + duality.notifyNeighbors(); } public void setSide(ForgeDirection axis) diff --git a/src/main/java/appeng/tile/misc/TilePaint.java b/src/main/java/appeng/tile/misc/TilePaint.java index a79cddf5..1ae90be3 100644 --- a/src/main/java/appeng/tile/misc/TilePaint.java +++ b/src/main/java/appeng/tile/misc/TilePaint.java @@ -1,5 +1,6 @@ package appeng.tile.misc; +import appeng.helpers.Splotch; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @@ -16,7 +17,6 @@ import net.minecraft.util.Vec3; import net.minecraft.world.EnumSkyBlock; import net.minecraftforge.common.util.ForgeDirection; import appeng.api.util.AEColor; -import appeng.helpers.Splot; import appeng.items.misc.ItemPaintBall; import appeng.tile.AEBaseTile; import appeng.tile.TileEvent; @@ -30,7 +30,7 @@ public class TilePaint extends AEBaseTile static final int LIGHT_PER_DOT = 12; int isLit = 0; - ArrayList dots = null; + ArrayList dots = null; void writeBuffer(ByteBuf out) { @@ -42,7 +42,7 @@ public class TilePaint extends AEBaseTile out.writeByte( dots.size() ); - for (Splot s : dots) + for (Splotch s : dots) s.writeToStream( out ); } @@ -59,10 +59,10 @@ public class TilePaint extends AEBaseTile dots = new ArrayList( howMany ); for (int x = 0; x < howMany; x++) - dots.add( new Splot( in ) ); + dots.add( new Splotch( in ) ); isLit = 0; - for (Splot s : dots) + for (Splotch s : dots) { if ( s.lumen ) { @@ -119,7 +119,7 @@ public class TilePaint extends AEBaseTile private void updateData() { isLit = 0; - for (Splot s : dots) + for (Splotch s : dots) { if ( s.lumen ) { @@ -154,10 +154,10 @@ public class TilePaint extends AEBaseTile private void removeSide(ForgeDirection side) { - Iterator i = dots.iterator(); + Iterator i = dots.iterator(); while (i.hasNext()) { - Splot s = i.next(); + Splotch s = i.next(); if ( s.side == side ) i.remove(); } @@ -187,7 +187,7 @@ public class TilePaint extends AEBaseTile if ( dots.size() > 20 ) dots.remove( 0 ); - dots.add( new Splot( col, lit, side, hitVec ) ); + dots.add( new Splotch( col, lit, side, hitVec ) ); if ( lit ) isLit += LIGHT_PER_DOT; @@ -206,7 +206,7 @@ public class TilePaint extends AEBaseTile worldObj.updateLightByType( EnumSkyBlock.Block, xCoord, yCoord, zCoord ); } - public Collection getDots() + public Collection getDots() { if ( dots == null ) return ImmutableList.of(); diff --git a/src/main/java/appeng/tile/misc/TileVibrationChamber.java b/src/main/java/appeng/tile/misc/TileVibrationChamber.java index 65aba828..7eed5402 100644 --- a/src/main/java/appeng/tile/misc/TileVibrationChamber.java +++ b/src/main/java/appeng/tile/misc/TileVibrationChamber.java @@ -160,9 +160,9 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka } burnSpeed = Math.max( 20, Math.min( burnSpeed, 200 ) ); - double dialiation = burnSpeed / 100.0; + double dilation = burnSpeed / 100.0; - double timePassed = (double) TicksSinceLastCall * dialiation; + double timePassed = (double) TicksSinceLastCall * dilation; burnTime -= timePassed; if ( burnTime < 0 ) { diff --git a/src/main/java/appeng/tile/networking/TileCableBus.java b/src/main/java/appeng/tile/networking/TileCableBus.java index 64b0c0cc..d96a7500 100644 --- a/src/main/java/appeng/tile/networking/TileCableBus.java +++ b/src/main/java/appeng/tile/networking/TileCableBus.java @@ -212,7 +212,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl @Override public Iterable getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean visual) { - return cb.getSelectedBoundingBoxsFromPool( false, true, e, visual ); + return cb.getSelectedBoundingBoxesFromPool( false, true, e, visual ); } @Override diff --git a/src/main/java/appeng/tile/networking/TileEnergyAcceptor.java b/src/main/java/appeng/tile/networking/TileEnergyAcceptor.java index c35b2936..3ac9a839 100644 --- a/src/main/java/appeng/tile/networking/TileEnergyAcceptor.java +++ b/src/main/java/appeng/tile/networking/TileEnergyAcceptor.java @@ -43,7 +43,7 @@ public class TileEnergyAcceptor extends AENetworkPowerTile } catch (GridAccessException e) { - // null net, probably bads. + // null net, probably bad. } } diff --git a/src/main/java/appeng/tile/networking/TileEnergyCell.java b/src/main/java/appeng/tile/networking/TileEnergyCell.java index ebd259ee..570f5418 100644 --- a/src/main/java/appeng/tile/networking/TileEnergyCell.java +++ b/src/main/java/appeng/tile/networking/TileEnergyCell.java @@ -34,16 +34,16 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage if ( notLoaded() ) return; - byte leel = (byte) (8.0 * (internalCurrentPower / internalMaxPower)); + byte boundMetadata = (byte) (8.0 * (internalCurrentPower / internalMaxPower)); - if ( leel > 7 ) - leel = 7; - if ( leel < 0 ) - leel = 0; + if ( boundMetadata > 7 ) + boundMetadata = 7; + if ( boundMetadata < 0 ) + boundMetadata = 0; - if ( currentMeta != leel ) + if ( currentMeta != boundMetadata ) { - currentMeta = leel; + currentMeta = boundMetadata; worldObj.setBlockMetadataWithNotify( xCoord, yCoord, zCoord, currentMeta, 2 ); } } diff --git a/src/main/java/appeng/tile/powersink/MinecraftJoules5.java b/src/main/java/appeng/tile/powersink/MinecraftJoules5.java index b24f33c9..13aa43cd 100644 --- a/src/main/java/appeng/tile/powersink/MinecraftJoules5.java +++ b/src/main/java/appeng/tile/powersink/MinecraftJoules5.java @@ -1,12 +1,12 @@ package appeng.tile.powersink; +import appeng.integration.abstraction.helpers.BaseMJPerdition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import appeng.api.config.PowerUnits; import appeng.core.AppEng; import appeng.integration.IntegrationType; import appeng.integration.abstraction.IMJ5; -import appeng.integration.abstraction.helpers.BaseMJperdition; import appeng.tile.TileEvent; import appeng.tile.events.TileEventType; import appeng.transformer.annotations.integration.Interface; @@ -20,7 +20,7 @@ import buildcraft.api.power.PowerHandler.PowerReceiver; public abstract class MinecraftJoules5 extends AERootPoweredTile implements IPowerReceptor { - BaseMJperdition bcPowerWrapper; + BaseMJPerdition bcPowerWrapper; @Method(iname = "MJ5") @TileEvent(TileEventType.TICK) @@ -40,7 +40,7 @@ public abstract class MinecraftJoules5 extends AERootPoweredTile implements IPow IMJ5 mjIntegration = (IMJ5) AppEng.instance.getIntegration( IntegrationType.MJ5 ); if ( mjIntegration != null ) { - bcPowerWrapper = (BaseMJperdition) mjIntegration.createPerdition( this ); + bcPowerWrapper = (BaseMJPerdition) mjIntegration.createPerdition( this ); if ( bcPowerWrapper != null ) bcPowerWrapper.configure( 1, 380, 1.0f / 5.0f, 1000 ); } diff --git a/src/main/java/appeng/tile/qnb/TileQuantumBridge.java b/src/main/java/appeng/tile/qnb/TileQuantumBridge.java index c95cd18c..73b14df7 100644 --- a/src/main/java/appeng/tile/qnb/TileQuantumBridge.java +++ b/src/main/java/appeng/tile/qnb/TileQuantumBridge.java @@ -43,9 +43,9 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock final byte powered = 64; private QuantumCalculator calc = new QuantumCalculator( this ); - byte xdex = -1; + byte constructed = -1; - QuantumCluster clust; + QuantumCluster cluster; public boolean bridgePowered; private boolean updateStatus = false; @@ -56,8 +56,8 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock if ( updateStatus ) { updateStatus = false; - if ( clust != null ) - clust.updateStatus( true ); + if ( cluster != null ) + cluster.updateStatus( true ); markForUpdate(); } } @@ -65,12 +65,12 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock @TileEvent(TileEventType.NETWORK_WRITE) public void writeToStream_TileQuantumBridge(ByteBuf data) throws IOException { - int out = xdex; + int out = constructed; - if ( getStackInSlot( 0 ) != null && xdex != -1 ) + if ( getStackInSlot( 0 ) != null && constructed != -1 ) out = out | hasSingularity; - if ( gridProxy.isActive() && xdex != -1 ) + if ( gridProxy.isActive() && constructed != -1 ) out = out | powered; data.writeByte( (byte) out ); @@ -79,10 +79,10 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock @TileEvent(TileEventType.NETWORK_READ) public boolean readFromStream_TileQuantumBridge(ByteBuf data) throws IOException { - int oldValue = xdex; - xdex = data.readByte(); - bridgePowered = (xdex | powered) == powered; - return xdex != oldValue; + int oldValue = constructed; + constructed = data.readByte(); + bridgePowered = (constructed | powered) == powered; + return constructed != oldValue; } public TileQuantumBridge() { @@ -106,8 +106,8 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock @Override public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removed, ItemStack added) { - if ( clust != null ) - clust.updateStatus( true ); + if ( cluster != null ) + cluster.updateStatus( true ); } @Override @@ -121,15 +121,15 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock @Override public void disconnect(boolean affectWorld) { - if ( clust != null ) + if ( cluster != null ) { if ( !affectWorld ) - clust.updateStatus = false; + cluster.updateStatus = false; - clust.destroy(); + cluster.destroy(); } - clust = null; + cluster = null; if ( affectWorld ) gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) ); @@ -138,7 +138,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock @Override public IAECluster getCluster() { - return clust; + return cluster; } @Override @@ -171,13 +171,13 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock public void updateStatus(QuantumCluster c, byte flags, boolean affectWorld) { - clust = c; + cluster = c; if ( affectWorld ) { - if ( xdex != flags ) + if ( constructed != flags ) { - xdex = flags; + constructed = flags; markForUpdate(); } @@ -209,13 +209,13 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock public boolean isCorner() { - return (xdex & corner) == corner && xdex != -1; + return (constructed & corner) == corner && constructed != -1; } public boolean isPowered() { if ( Platform.isClient() ) - return (xdex & powered) == powered && xdex != -1; + return (constructed & powered) == powered && constructed != -1; try { @@ -231,7 +231,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock public boolean isFormed() { - return xdex != -1; + return constructed != -1; } @Override @@ -267,15 +267,15 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock public boolean hasQES() { - if ( xdex == -1 ) + if ( constructed == -1 ) return false; - return (xdex & hasSingularity) == hasSingularity; + return (constructed & hasSingularity) == hasSingularity; } public void breakCluster() { - if ( clust != null ) - clust.destroy(); + if ( cluster != null ) + cluster.destroy(); } } diff --git a/src/main/java/appeng/tile/spatial/TileSpatialPylon.java b/src/main/java/appeng/tile/spatial/TileSpatialPylon.java index a7ba19f8..9fd9181c 100644 --- a/src/main/java/appeng/tile/spatial/TileSpatialPylon.java +++ b/src/main/java/appeng/tile/spatial/TileSpatialPylon.java @@ -23,8 +23,8 @@ import appeng.tile.grid.AENetworkTile; public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock { - public final int DISPLAY_ENDMIN = 0x01; - public final int DISPLAY_ENDMAX = 0x02; + public final int DISPLAY_END_MIN = 0x01; + public final int DISPLAY_END_MAX = 0x02; public final int DISPLAY_MIDDLE = 0x01 + 0x02; public final int DISPLAY_X = 0x04; public final int DISPLAY_Y = 0x08; @@ -32,11 +32,11 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock public final int MB_STATUS = 0x01 + 0x02 + 0x04 + 0x08; public final int DISPLAY_ENABLED = 0x10; - public final int DISPLAY_POWEREDENABLED = 0x20; + public final int DISPLAY_POWERED_ENABLED = 0x20; public final int NET_STATUS = 0x10 + 0x20; int displayBits = 0; - SpatialPylonCluster clust; + SpatialPylonCluster cluster; final SpatialPylonCalculator calc = new SpatialPylonCalculator( this ); boolean didHaveLight = false; @@ -95,7 +95,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock public int getLightValue() { - if ( (displayBits & DISPLAY_POWEREDENABLED) == DISPLAY_POWEREDENABLED ) + if ( (displayBits & DISPLAY_POWERED_ENABLED) == DISPLAY_POWERED_ENABLED ) { return 8; } @@ -136,7 +136,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock @Override public SpatialPylonCluster getCluster() { - return clust; + return cluster; } public void recalculateDisplay() @@ -145,16 +145,16 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock displayBits = 0; - if ( clust != null ) + if ( cluster != null ) { - if ( clust.min.equals( getLocation() ) ) - displayBits = DISPLAY_ENDMIN; - else if ( clust.max.equals( getLocation() ) ) - displayBits = DISPLAY_ENDMAX; + if ( cluster.min.equals( getLocation() ) ) + displayBits = DISPLAY_END_MIN; + else if ( cluster.max.equals( getLocation() ) ) + displayBits = DISPLAY_END_MAX; else displayBits = DISPLAY_MIDDLE; - switch (clust.currentAxis) + switch (cluster.currentAxis) { case X: displayBits |= DISPLAY_X; @@ -173,9 +173,9 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock try { if ( gridProxy.getEnergy().isNetworkPowered() ) - displayBits |= DISPLAY_POWEREDENABLED; + displayBits |= DISPLAY_POWERED_ENABLED; - if ( clust.isValid && gridProxy.isActive() ) + if ( cluster.isValid && gridProxy.isActive() ) displayBits |= DISPLAY_ENABLED; } catch (GridAccessException e) @@ -191,7 +191,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock public void updateStatus(SpatialPylonCluster c) { - clust = c; + cluster = c; gridProxy.setValidSides( c == null ? EnumSet.noneOf( ForgeDirection.class ) : EnumSet.allOf( ForgeDirection.class ) ); recalculateDisplay(); } @@ -199,9 +199,9 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock @Override public void disconnect(boolean b) { - if ( clust != null ) + if ( cluster != null ) { - clust.destroy(); + cluster.destroy(); updateStatus( null ); } } diff --git a/src/main/java/appeng/tile/storage/TileChest.java b/src/main/java/appeng/tile/storage/TileChest.java index 0ffcf503..4ddcefd3 100644 --- a/src/main/java/appeng/tile/storage/TileChest.java +++ b/src/main/java/appeng/tile/storage/TileChest.java @@ -81,7 +81,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan static final int sides[] = new int[] { 0 }; static final int front[] = new int[] { 1 }; - static final int noslots[] = new int[] {}; + static final int noSlots[] = new int[] {}; AppEngInternalInventory inv = new AppEngInternalInventory( this, 2 ); BaseActionSource mySrc = new MachineSource( this ); @@ -270,19 +270,19 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan boolean isCached = false; private ICellHandler cellHandler; - private MEMonitorHandler icell; - private MEMonitorHandler fcell; + private MEMonitorHandler itemCell; + private MEMonitorHandler fluidCell; @Override public IMEMonitor getItemInventory() { - return icell; + return itemCell; } @Override public IMEMonitor getFluidInventory() { - return fcell; + return fluidCell; } class ChestNetNotifier> implements IMEMonitorHandlerReceiver @@ -318,9 +318,9 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan public boolean isValid(Object verificationToken) { if ( chan == StorageChannel.ITEMS ) - return verificationToken == icell; + return verificationToken == itemCell; if ( chan == StorageChannel.FLUIDS ) - return verificationToken == fcell; + return verificationToken == fluidCell; return false; } @@ -368,8 +368,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan { if ( !isCached ) { - icell = null; - fcell = null; + itemCell = null; + fluidCell = null; ItemStack is = inv.getStackInSlot( 1 ); if ( is != null ) @@ -390,8 +390,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan gridProxy.setIdlePowerUsage( power ); - icell = wrap( itemCell ); - fcell = wrap( fluidCell ); + this.itemCell = wrap( itemCell ); + this.fluidCell = wrap( fluidCell ); } } } @@ -399,13 +399,13 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan switch (channel) { case FLUIDS: - if ( fcell == null ) + if ( fluidCell == null ) throw noHandler; - return fcell; + return fluidCell; case ITEMS: - if ( icell == null ) + if ( itemCell == null ) throw noHandler; - return icell; + return itemCell; default: } @@ -423,8 +423,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan { if ( slot == 1 ) { - icell = null; - fcell = null; + itemCell = null; + fluidCell = null; isCached = false; // recalculate the storage cell. try @@ -525,7 +525,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan // nope! } } - return noslots; + return noSlots; } @Override @@ -753,8 +753,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan { priority = newValue; - icell = null; - fcell = null; + itemCell = null; + fluidCell = null; isCached = false; // recalculate the storage cell. try diff --git a/src/main/java/appeng/transformer/asm/ASMIntegration.java b/src/main/java/appeng/transformer/asm/ASMIntegration.java index b5bef267..e26336e7 100644 --- a/src/main/java/appeng/transformer/asm/ASMIntegration.java +++ b/src/main/java/appeng/transformer/asm/ASMIntegration.java @@ -127,9 +127,9 @@ public class ASMIntegration implements IClassTransformer return changed; } - private boolean hasAnnotation(AnnotationNode ann, Class anno) + private boolean hasAnnotation(AnnotationNode ann, Class annotation) { - return ann.desc.equals( Type.getDescriptor( anno ) ); + return ann.desc.equals( Type.getDescriptor( annotation ) ); } private boolean stripMethod(ClassNode classNode, MethodNode mn, Iterator i, Class class1, AnnotationNode an) diff --git a/src/main/java/appeng/transformer/asm/ASMTweaker.java b/src/main/java/appeng/transformer/asm/ASMTweaker.java index 8d7862a7..2ad07738 100644 --- a/src/main/java/appeng/transformer/asm/ASMTweaker.java +++ b/src/main/java/appeng/transformer/asm/ASMTweaker.java @@ -69,7 +69,7 @@ public class ASMTweaker implements IClassTransformer makePublic( classNode, Set ); } - // CALL VIRUAL! + // CALL VIRTUAL! if ( transformedName.equals( "net.minecraft.client.gui.inventory.GuiContainer" ) ) { for (MethodNode mn : classNode.methods) diff --git a/src/main/java/appeng/util/Platform.java b/src/main/java/appeng/util/Platform.java index d5bdad06..bb5c287f 100644 --- a/src/main/java/appeng/util/Platform.java +++ b/src/main/java/appeng/util/Platform.java @@ -1208,13 +1208,13 @@ public class Platform return a.isItemEqual( b ); } - public static LookDirection getPlayerRay(EntityPlayer player, float eyeoffset) + public static LookDirection getPlayerRay(EntityPlayer player, float eyeOffset) { float f = 1.0F; float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f; float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f; double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; - double d1 = eyeoffset; + double d1 = eyeOffset; double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 ); @@ -1279,12 +1279,12 @@ public class Platform continue; f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 ); - MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 ); + AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 ); + MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 ); - if ( movingobjectposition1 != null ) + if ( movingObjectPosition != null ) { - double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec ); + double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec ); if ( nd < closest ) { @@ -1298,15 +1298,15 @@ public class Platform } MovingObjectPosition pos = null; - Vec3 Srec = null; + Vec3 vec = null; if ( hitBlocks ) { - Srec = Vec3.createVectorHelper( d0, d1, d2 ); + vec = Vec3.createVectorHelper( d0, d1, d2 ); pos = w.rayTraceBlocks( vec3, vec31, true ); } - if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > closest ) + if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest ) { pos = new MovingObjectPosition( entity ); } @@ -1443,7 +1443,7 @@ public class Platform gs.postAlterationOfStoredItems( StorageChannel.ITEMS, itemChanges, src ); } - static public > void postListChanges(IItemList before, IItemList after, IMEMonitorHandlerReceiver meMonitorPassthu, + static public > void postListChanges(IItemList before, IItemList after, IMEMonitorHandlerReceiver meMonitorPassthrough, BaseActionSource source) { LinkedList changes = new LinkedList(); @@ -1463,7 +1463,7 @@ public class Platform } if ( !changes.isEmpty() ) - meMonitorPassthu.postChange( null, changes, source ); + meMonitorPassthrough.postChange( null, changes, source ); } public static int generateTileHash(TileEntity target) @@ -1477,16 +1477,16 @@ public class Platform return 0; else if ( target instanceof TileEntityChest ) { - TileEntityChest targ = (TileEntityChest) target; - targ.checkForAdjacentChests(); - if ( targ.adjacentChestZNeg != null ) - hash ^= targ.adjacentChestZNeg.hashCode(); - else if ( targ.adjacentChestZPos != null ) - hash ^= targ.adjacentChestZPos.hashCode(); - else if ( targ.adjacentChestXPos != null ) - hash ^= targ.adjacentChestXPos.hashCode(); - else if ( targ.adjacentChestXNeg != null ) - hash ^= targ.adjacentChestXNeg.hashCode(); + TileEntityChest chest = (TileEntityChest) target; + chest.checkForAdjacentChests(); + if ( chest.adjacentChestZNeg != null ) + hash ^= chest.adjacentChestZNeg.hashCode(); + else if ( chest.adjacentChestZPos != null ) + hash ^= chest.adjacentChestZPos.hashCode(); + else if ( chest.adjacentChestXPos != null ) + hash ^= chest.adjacentChestXPos.hashCode(); + else if ( chest.adjacentChestXNeg != null ) + hash ^= chest.adjacentChestXNeg.hashCode(); } else if ( target instanceof IInventory ) { @@ -1640,7 +1640,7 @@ public class Platform } public static ItemStack extractItemsByRecipe(IEnergySource energySrc, BaseActionSource mySrc, IMEMonitor src, World w, IRecipe r, - ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList aitems, Actionable realForFake, + ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList items, Actionable realForFake, IPartitionList filter) { if ( energySrc.extractAEPower( 1, Actionable.SIMULATE, PowerMultiplier.CONFIG ) > 0.9 ) @@ -1668,9 +1668,9 @@ public class Platform boolean checkFuzzy = ae_req.isOre() || providedTemplate.getItemDamage() == OreDictionary.WILDCARD_VALUE || providedTemplate.hasTagCompound() || providedTemplate.isItemStackDamageable(); - if ( aitems != null && checkFuzzy ) + if ( items != null && checkFuzzy ) { - for (IAEItemStack x : aitems) + for (IAEItemStack x : items) { ItemStack sh = x.getItemStack(); if ( (Platform.isSameItemType( providedTemplate, sh ) || ae_req.sameOre( x )) && !Platform.isSameItem( sh, output ) ) @@ -1764,7 +1764,7 @@ public class Platform return is; } - private static Class Playerinstance; + private static Class playerInstance; private static Method getOrCreateChunkWatcher; private static Method sendToAllPlayersWatchingChunk; @@ -1783,19 +1783,19 @@ public class Platform if ( getOrCreateChunkWatcher != null ) { - Object playerinstance = getOrCreateChunkWatcher.invoke( pm, c.xPosition, c.zPosition, false ); - if ( playerinstance != null ) + Object playerInstance = getOrCreateChunkWatcher.invoke( pm, c.xPosition, c.zPosition, false ); + if ( playerInstance != null ) { - Playerinstance = playerinstance.getClass(); + Platform.playerInstance = playerInstance.getClass(); if ( sendToAllPlayersWatchingChunk == null ) { - sendToAllPlayersWatchingChunk = ReflectionHelper.findMethod( Playerinstance, playerinstance, new String[] { + sendToAllPlayersWatchingChunk = ReflectionHelper.findMethod( Platform.playerInstance, playerInstance, new String[] { "sendToAllPlayersWatchingChunk", "func_151251_a" }, Packet.class ); } if ( sendToAllPlayersWatchingChunk != null ) - sendToAllPlayersWatchingChunk.invoke( playerinstance, new S21PacketChunkData( c, false, verticalBits ) ); + sendToAllPlayersWatchingChunk.invoke( playerInstance, new S21PacketChunkData( c, false, verticalBits ) ); } } diff --git a/src/main/java/appeng/util/inv/AdaptorIInventory.java b/src/main/java/appeng/util/inv/AdaptorIInventory.java index d23a20ee..e150421b 100644 --- a/src/main/java/appeng/util/inv/AdaptorIInventory.java +++ b/src/main/java/appeng/util/inv/AdaptorIInventory.java @@ -39,7 +39,7 @@ public class AdaptorIInventory extends InventoryAdaptor } @Override - public ItemStack removeSimilarItems(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination) + public ItemStack removeSimilarItems(int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination) { int s = i.getSizeInventory(); for (int x = 0; x < s; x++) @@ -47,17 +47,17 @@ public class AdaptorIInventory extends InventoryAdaptor ItemStack is = i.getStackInSlot( x ); if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode )) ) { - int lhow_many = how_many; - if ( lhow_many > is.stackSize ) - lhow_many = is.stackSize; + int newAmount = amount; + if ( newAmount > is.stackSize ) + newAmount = is.stackSize; if ( destination != null && !destination.canInsert( is ) ) - lhow_many = 0; + newAmount = 0; ItemStack rv = null; - if ( lhow_many > 0 ) + if ( newAmount > 0 ) { rv = is.copy(); - rv.stackSize = lhow_many; + rv.stackSize = newAmount; if ( is.stackSize == rv.stackSize ) { @@ -84,7 +84,7 @@ public class AdaptorIInventory extends InventoryAdaptor } @Override - public ItemStack simulateSimilarRemove(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination) + public ItemStack simulateSimilarRemove(int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination) { int s = i.getSizeInventory(); for (int x = 0; x < s; x++) @@ -93,16 +93,16 @@ public class AdaptorIInventory extends InventoryAdaptor if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode )) ) { - int lhow_many = how_many; - if ( lhow_many > is.stackSize ) - lhow_many = is.stackSize; + int boundAmount = amount; + if ( boundAmount > is.stackSize ) + boundAmount = is.stackSize; if ( destination != null && !destination.canInsert( is ) ) - lhow_many = 0; + boundAmount = 0; - if ( lhow_many > 0 ) + if ( boundAmount > 0 ) { ItemStack rv = is.copy(); - rv.stackSize = lhow_many; + rv.stackSize = boundAmount; return rv; } } @@ -111,38 +111,38 @@ public class AdaptorIInventory extends InventoryAdaptor } @Override - public ItemStack removeItems(int how_many, ItemStack filter, IInventoryDestination destination) + public ItemStack removeItems(int amount, ItemStack filter, IInventoryDestination destination) { int s = i.getSizeInventory(); ItemStack rv = null; - for (int x = 0; x < s && how_many > 0; x++) + for (int x = 0; x < s && amount > 0; x++) { ItemStack is = i.getStackInSlot( x ); if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemPrecise( is, filter )) ) { - int lhow_many = how_many; - if ( lhow_many > is.stackSize ) - lhow_many = is.stackSize; + int boundAmounts = amount; + if ( boundAmounts > is.stackSize ) + boundAmounts = is.stackSize; if ( destination != null && !destination.canInsert( is ) ) - lhow_many = 0; + boundAmounts = 0; - if ( lhow_many > 0 ) + if ( boundAmounts > 0 ) { if ( rv == null ) { rv = is.copy(); filter = rv; - rv.stackSize = lhow_many; - how_many -= lhow_many; + rv.stackSize = boundAmounts; + amount -= boundAmounts; } else { - rv.stackSize += lhow_many; - how_many -= lhow_many; + rv.stackSize += boundAmounts; + amount -= boundAmounts; } - if ( is.stackSize == lhow_many ) + if ( is.stackSize == boundAmounts ) { i.setInventorySlotContents( x, null ); i.markDirty(); @@ -150,7 +150,7 @@ public class AdaptorIInventory extends InventoryAdaptor else { ItemStack po = is.copy(); - po.stackSize -= lhow_many; + po.stackSize -= boundAmounts; i.setInventorySlotContents( x, po ); i.markDirty(); } @@ -165,34 +165,34 @@ public class AdaptorIInventory extends InventoryAdaptor } @Override - public ItemStack simulateRemove(int how_many, ItemStack filter, IInventoryDestination destination) + public ItemStack simulateRemove(int amount, ItemStack filter, IInventoryDestination destination) { int s = i.getSizeInventory(); ItemStack rv = null; - for (int x = 0; x < s && how_many > 0; x++) + for (int x = 0; x < s && amount > 0; x++) { ItemStack is = i.getStackInSlot( x ); if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemPrecise( is, filter )) ) { - int lhow_many = how_many; - if ( lhow_many > is.stackSize ) - lhow_many = is.stackSize; + int boundAount = amount; + if ( boundAount > is.stackSize ) + boundAount = is.stackSize; if ( destination != null && !destination.canInsert( is ) ) - lhow_many = 0; + boundAount = 0; - if ( lhow_many > 0 ) + if ( boundAount > 0 ) { if ( rv == null ) { rv = is.copy(); - rv.stackSize = lhow_many; - how_many -= lhow_many; + rv.stackSize = boundAount; + amount -= boundAount; } else { - rv.stackSize += lhow_many; - how_many -= lhow_many; + rv.stackSize += boundAount; + amount -= boundAount; } } } diff --git a/src/main/java/appeng/util/inv/ItemSlot.java b/src/main/java/appeng/util/inv/ItemSlot.java index e319aa1b..22410234 100644 --- a/src/main/java/appeng/util/inv/ItemSlot.java +++ b/src/main/java/appeng/util/inv/ItemSlot.java @@ -10,31 +10,31 @@ public class ItemSlot public int slot; // one or the other.. - private IAEItemStack aeitemstack; + private IAEItemStack aeItemStack; private ItemStack itemStack; public boolean isExtractable; public void setItemStack(ItemStack is) { - aeitemstack = null; + aeItemStack = null; itemStack = is; } public void setAEItemStack(IAEItemStack is) { - aeitemstack = is; + aeItemStack = is; itemStack = null; } public ItemStack getItemStack() { - return itemStack == null ? (aeitemstack == null ? null : (itemStack = aeitemstack.getItemStack())) : itemStack; + return itemStack == null ? (aeItemStack == null ? null : (itemStack = aeItemStack.getItemStack())) : itemStack; } public IAEItemStack getAEItemStack() { - return aeitemstack == null ? (itemStack == null ? null : (aeitemstack = AEItemStack.create( itemStack ))) : aeitemstack; + return aeItemStack == null ? (itemStack == null ? null : (aeItemStack = AEItemStack.create( itemStack ))) : aeItemStack; } } diff --git a/src/main/java/appeng/util/inv/WrapperChainedInventory.java b/src/main/java/appeng/util/inv/WrapperChainedInventory.java index c7b016bf..e8137d2e 100644 --- a/src/main/java/appeng/util/inv/WrapperChainedInventory.java +++ b/src/main/java/appeng/util/inv/WrapperChainedInventory.java @@ -26,12 +26,12 @@ public class WrapperChainedInventory implements IInventory private List l; private HashMap offsets; - public WrapperChainedInventory(IInventory... ilist) { - setInventory( ilist ); + public WrapperChainedInventory(IInventory... inventories) { + setInventory( inventories ); } - public WrapperChainedInventory(List ilist) { - setInventory( ilist ); + public WrapperChainedInventory(List inventories) { + setInventory( inventories ); } public void cycleOrder() diff --git a/src/main/java/appeng/util/item/AEFluidStack.java b/src/main/java/appeng/util/item/AEFluidStack.java index 7826c72b..c8a7503a 100644 --- a/src/main/java/appeng/util/item/AEFluidStack.java +++ b/src/main/java/appeng/util/item/AEFluidStack.java @@ -191,12 +191,12 @@ public final class AEFluidStack extends AEStack implements IAEFlu ItemStack itemstack = ItemStack.loadItemStackFromNBT( i ); if ( itemstack == null ) return null; - AEFluidStack aeis = AEFluidStack.create( itemstack ); - // aeis.priority = i.getInteger( "Priority" ); - aeis.stackSize = i.getLong( "Cnt" ); - aeis.setCountRequestable( i.getLong( "Req" ) ); - aeis.setCraftable( i.getBoolean( "Craft" ) ); - return aeis; + AEFluidStack fluid = AEFluidStack.create( itemstack ); + // fluid.priority = i.getInteger( "Priority" ); + fluid.stackSize = i.getLong( "Cnt" ); + fluid.setCountRequestable( i.getLong( "Req" ) ); + fluid.setCraftable( i.getBoolean( "Craft" ) ); + return fluid; } @Override @@ -282,12 +282,12 @@ public final class AEFluidStack extends AEStack implements IAEFlu if ( fluidStack == null ) return null; - AEFluidStack aeis = AEFluidStack.create( fluidStack ); - // aeis.priority = (int) priority; - aeis.stackSize = stackSize; - aeis.setCountRequestable( countRequestable ); - aeis.setCraftable( isCraftable ); - return aeis; + AEFluidStack fluid = AEFluidStack.create( fluidStack ); + // fluid.priority = (int) priority; + fluid.stackSize = stackSize; + fluid.setCountRequestable( countRequestable ); + fluid.setCraftable( isCraftable ); + return fluid; } @Override diff --git a/src/main/java/appeng/util/item/AEItemDef.java b/src/main/java/appeng/util/item/AEItemDef.java index 6d32bfb6..e0cc2a4e 100644 --- a/src/main/java/appeng/util/item/AEItemDef.java +++ b/src/main/java/appeng/util/item/AEItemDef.java @@ -22,7 +22,7 @@ public class AEItemDef public Item item; public int damageValue; - public int dspDamage; + public int displayDamage; public int maxDamage; public AESharedNBT tagCompound; @@ -51,7 +51,7 @@ public class AEItemDef AEItemDef t = new AEItemDef( item ); t.def = def; t.damageValue = damageValue; - t.dspDamage = dspDamage; + t.displayDamage = displayDamage; t.maxDamage = maxDamage; t.tagCompound = tagCompound; t.isOre = isOre; diff --git a/src/main/java/appeng/util/item/AEItemStack.java b/src/main/java/appeng/util/item/AEItemStack.java index cbf90ad5..4d116450 100644 --- a/src/main/java/appeng/util/item/AEItemStack.java +++ b/src/main/java/appeng/util/item/AEItemStack.java @@ -69,16 +69,16 @@ public final class AEItemStack extends AEStack implements IAEItemS */ /* - * Super Hacky. + * Super hackery. * * is.itemID = appeng.api.Materials.matQuartz.itemID; damageValue = is.getItemDamage(); is.itemID = itemID; */ /* - * Kinda Hacky + * Kinda hackery */ def.damageValue = def.getDamageValueHack( is ); - def.dspDamage = is.getItemDamageForDisplay(); + def.displayDamage = is.getItemDamageForDisplay(); def.maxDamage = is.getMaxDamage(); NBTTagCompound tagCompound = is.getTagCompound(); @@ -218,12 +218,12 @@ public final class AEItemStack extends AEStack implements IAEItemS if ( itemstack == null ) return null; - AEItemStack aeis = AEItemStack.create( itemstack ); - // aeis.priority = i.getInteger( "Priority" ); - aeis.stackSize = i.getLong( "Cnt" ); - aeis.setCountRequestable( i.getLong( "Req" ) ); - aeis.setCraftable( i.getBoolean( "Craft" ) ); - return aeis; + AEItemStack item = AEItemStack.create( itemstack ); + // item.priority = i.getInteger( "Priority" ); + item.stackSize = i.getLong( "Cnt" ); + item.setCountRequestable( i.getLong( "Req" ) ); + item.setCraftable( i.getBoolean( "Craft" ) ); + return item; } @Override @@ -242,10 +242,10 @@ public final class AEItemStack extends AEStack implements IAEItemS public int compareTo(AEItemStack b) { int id = compare( def.item.hashCode(), b.def.item.hashCode() ); - int dv = compare( def.damageValue, b.def.damageValue ); - int dspv = compare( def.dspDamage, b.def.dspDamage ); + int damageValue = compare( def.damageValue, b.def.damageValue ); + int displayDamage = compare( def.displayDamage, b.def.displayDamage ); // AELog.info( "NBT: " + nbt ); - return id == 0 ? (dv == 0 ? (dspv == 0 ? compareNBT( b.def ) : dspv) : dv) : id; + return id == 0 ? (damageValue == 0 ? (displayDamage == 0 ? compareNBT( b.def ) : displayDamage) : damageValue) : id; } private int compareNBT(AEItemDef b) @@ -370,12 +370,12 @@ public final class AEItemStack extends AEStack implements IAEItemS if ( itemstack == null ) return null; - AEItemStack aeis = AEItemStack.create( itemstack ); - // aeis.priority = (int) priority; - aeis.stackSize = stackSize; - aeis.setCountRequestable( countRequestable ); - aeis.setCraftable( isCraftable ); - return aeis; + AEItemStack item = AEItemStack.create( itemstack ); + // item.priority = (int) priority; + item.stackSize = stackSize; + item.setCountRequestable( countRequestable ); + item.setCraftable( isCraftable ); + return item; } @Override @@ -508,7 +508,7 @@ public final class AEItemStack extends AEStack implements IAEItemS if ( ignoreMeta ) { - newDef.dspDamage = newDef.damageValue = 0; + newDef.displayDamage = newDef.damageValue = 0; newDef.reHash(); return bottom; } @@ -517,23 +517,23 @@ public final class AEItemStack extends AEStack implements IAEItemS { if ( fuzzy == FuzzyMode.IGNORE_ALL ) { - newDef.dspDamage = 0; + newDef.displayDamage = 0; } else if ( fuzzy == FuzzyMode.PERCENT_99 ) { if ( def.damageValue == 0 ) - newDef.dspDamage = 0; + newDef.displayDamage = 0; else - newDef.dspDamage = 1; + newDef.displayDamage = 1; } else { int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage ); - newDef.dspDamage = breakpoint <= def.dspDamage ? breakpoint : 0; + newDef.displayDamage = breakpoint <= def.displayDamage ? breakpoint : 0; } - newDef.damageValue = newDef.dspDamage; + newDef.damageValue = newDef.displayDamage; } newDef.tagCompound = AEItemDef.lowTag; @@ -548,7 +548,7 @@ public final class AEItemStack extends AEStack implements IAEItemS if ( ignoreMeta ) { - newDef.dspDamage = newDef.damageValue = Integer.MAX_VALUE; + newDef.displayDamage = newDef.damageValue = Integer.MAX_VALUE; newDef.reHash(); return top; } @@ -557,22 +557,22 @@ public final class AEItemStack extends AEStack implements IAEItemS { if ( fuzzy == FuzzyMode.IGNORE_ALL ) { - newDef.dspDamage = def.maxDamage + 1; + newDef.displayDamage = def.maxDamage + 1; } else if ( fuzzy == FuzzyMode.PERCENT_99 ) { if ( def.damageValue == 0 ) - newDef.dspDamage = 0; + newDef.displayDamage = 0; else - newDef.dspDamage = def.maxDamage + 1; + newDef.displayDamage = def.maxDamage + 1; } else { int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage ); - newDef.dspDamage = def.dspDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1; + newDef.displayDamage = def.displayDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1; } - newDef.damageValue = newDef.dspDamage; + newDef.damageValue = newDef.displayDamage; } newDef.tagCompound = AEItemDef.highTag; diff --git a/src/main/java/appeng/util/item/AESharedNBT.java b/src/main/java/appeng/util/item/AESharedNBT.java index 144f1383..fa54d27c 100644 --- a/src/main/java/appeng/util/item/AESharedNBT.java +++ b/src/main/java/appeng/util/item/AESharedNBT.java @@ -83,9 +83,9 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound return super.equals( par1Obj ); } - public boolean matches(Item itemid2, int meta2, int orderlessHash) + public boolean matches(Item item, int meta, int orderlessHash) { - return itemid2 == item && meta == meta2 && hash == orderlessHash; + return item == this.item && this.meta == meta && hash == orderlessHash; } public boolean comparePreciseWithRegistry(AESharedNBT tagCompound) @@ -148,7 +148,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound if ( tagCompound.hasNoTags() ) return null; - Item itemid = s.getItem(); + Item item = s.getItem(); int meta = -1; if ( s.getItem() != null && s.isItemStackDamageable() && s.getHasSubtypes() ) meta = s.getItemDamage(); @@ -156,7 +156,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound if ( isShared( tagCompound ) ) return tagCompound; - SharedSearchObject sso = new SharedSearchObject( itemid, meta, tagCompound ); + SharedSearchObject sso = new SharedSearchObject( item, meta, tagCompound ); WeakReference c = sharedTagCompounds.get( sso ); if ( c != null ) @@ -167,7 +167,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound // as its already certain to exist.. } - AESharedNBT clone = AESharedNBT.createFromCompound( itemid, meta, tagCompound ); + AESharedNBT clone = AESharedNBT.createFromCompound( item, meta, tagCompound ); sso.compound = (NBTTagCompound) sso.compound.copy(); // prevent // modification // of data based diff --git a/src/main/java/appeng/util/item/OreReference.java b/src/main/java/appeng/util/item/OreReference.java index b3609bd7..6ece2e0b 100644 --- a/src/main/java/appeng/util/item/OreReference.java +++ b/src/main/java/appeng/util/item/OreReference.java @@ -12,8 +12,8 @@ import appeng.api.storage.data.IAEItemStack; public class OreReference { - private LinkedList otherOptions = new LinkedList(); - private ArrayList aeotherOptions = null; + private LinkedList otherOptions = new LinkedList(); + private ArrayList aeOtherOptions = null; private HashSet ores = new HashSet(); public Collection getEquivalents() @@ -23,17 +23,17 @@ public class OreReference public List getAEEquivalents() { - if ( aeotherOptions == null ) + if ( aeOtherOptions == null ) { - aeotherOptions = new ArrayList( otherOptions.size() ); + aeOtherOptions = new ArrayList( otherOptions.size() ); // SUMMON AE STACKS! for (ItemStack is : otherOptions) if ( is.getItem() != null ) - aeotherOptions.add( AEItemStack.create( is ) ); + aeOtherOptions.add( AEItemStack.create( is ) ); } - return aeotherOptions; + return aeOtherOptions; } public Collection getOres() diff --git a/src/main/resources/assets/appliedenergistics2/textures/blocks/PartConvMonitor_Bright.png b/src/main/resources/assets/appliedenergistics2/textures/blocks/PartConversionMonitor_Bright.png similarity index 100% rename from src/main/resources/assets/appliedenergistics2/textures/blocks/PartConvMonitor_Bright.png rename to src/main/resources/assets/appliedenergistics2/textures/blocks/PartConversionMonitor_Bright.png diff --git a/src/main/resources/assets/appliedenergistics2/textures/blocks/PartConvMonitor_Colored.png b/src/main/resources/assets/appliedenergistics2/textures/blocks/PartConversionMonitor_Colored.png similarity index 100% rename from src/main/resources/assets/appliedenergistics2/textures/blocks/PartConvMonitor_Colored.png rename to src/main/resources/assets/appliedenergistics2/textures/blocks/PartConversionMonitor_Colored.png diff --git a/src/main/resources/assets/appliedenergistics2/textures/blocks/PartConvMonitor_Dark.png b/src/main/resources/assets/appliedenergistics2/textures/blocks/PartConversionMonitor_Dark.png similarity index 100% rename from src/main/resources/assets/appliedenergistics2/textures/blocks/PartConvMonitor_Dark.png rename to src/main/resources/assets/appliedenergistics2/textures/blocks/PartConversionMonitor_Dark.png