Replaces all method parameter regarding their naming conventions

This commit is contained in:
thatsIch
2015-05-08 23:25:19 +02:00
parent a44369a272
commit f193c2adc4
76 changed files with 381 additions and 381 deletions
+6 -6
View File
@@ -408,12 +408,12 @@ public final class AEConfig extends Configuration implements IConfigurableObject
return this.getFreeIDSLot( varID, "materials" );
}
public int getFreeIDSLot( int varID, String Category )
public int getFreeIDSLot( int varID, String category )
{
boolean alreadyUsed = false;
int min = 0;
for( Property p : this.getCategory( Category ).getValues().values() )
for( Property p : this.getCategory( category ).getValues().values() )
{
int thisInt = p.getInt();
@@ -469,10 +469,10 @@ public final class AEConfig extends Configuration implements IConfigurableObject
return this.levelByStacks[i];
}
public Enum getSetting( String Category, Class<? extends Enum> class1, Enum myDefault )
public Enum getSetting( String category, Class<? extends Enum> class1, Enum myDefault )
{
String name = class1.getSimpleName();
Property p = this.get( Category, name, myDefault.name() );
Property p = this.get( category, name, myDefault.name() );
try
{
@@ -486,10 +486,10 @@ public final class AEConfig extends Configuration implements IConfigurableObject
return myDefault;
}
public void setSetting( String Category, Enum s )
public void setSetting( String category, Enum s )
{
String name = s.getClass().getSimpleName();
this.get( Category, name, s.name() ).set( s.name() );
this.get( category, name, s.name() ).set( s.name() );
this.save();
}
+7 -7
View File
@@ -28,6 +28,8 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.google.common.base.Joiner;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.commons.Remapper;
@@ -44,8 +46,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import com.google.common.base.Joiner;
import appeng.api.parts.CableRenderMode;
import appeng.api.parts.IPartHelper;
import appeng.api.parts.IPartItem;
@@ -146,7 +146,7 @@ public class ApiPart implements IPartHelper
return myCLass;
}
public Class getClassByDesc( String Addendum, String fullPath, String root, String next )
public Class getClassByDesc( String addendum, String fullPath, String root, String next )
{
if( this.roots.get( fullPath ) != null )
{
@@ -159,7 +159,7 @@ public class ApiPart implements IPartHelper
try
{
n.name = n.name + '_' + Addendum;
n.name = n.name + '_' + addendum;
n.superName = Class.forName( root ).getName().replace( ".", "/" );
}
catch( Throwable t )
@@ -268,7 +268,7 @@ public class ApiPart implements IPartHelper
}
}
private Class loadClass( String Name, byte[] b )
private Class loadClass( String name, byte[] b )
{
// override classDefine (as it is protected) and define the class.
Class clazz = null;
@@ -284,10 +284,10 @@ public class ApiPart implements IPartHelper
defineClassMethod.setAccessible( true );
try
{
Object[] argsA = new Object[] { Name, Name, b };
Object[] argsA = new Object[] { name, name, b };
b = (byte[]) runTransformersMethod.invoke( loader, argsA );
Object[] args = new Object[] { Name, b, 0, b.length };
Object[] args = new Object[] { name, b, 0, b.length };
clazz = (Class) defineClassMethod.invoke( loader, args );
}
finally
@@ -141,9 +141,9 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
this.considerItem( name, item, "Electrum", ( 107.8682 + 196.96655 ) / 2.0 );
}
private void considerItem( String ore, ItemStack item, String Name, double weight )
private void considerItem( String ore, ItemStack item, String name, double weight )
{
if( ore.equals( "berry" + Name ) || ore.equals( "nugget" + Name ) )
if( ore.equals( "berry" + name ) || ore.equals( "nugget" + name ) )
{
this.registerAmmo( item, weight );
}
@@ -122,9 +122,9 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
this.Tunnels.put( trigger, type );
}
public ItemStack getModItem( String modID, String Name, int meta )
public ItemStack getModItem( String modID, String name, int meta )
{
ItemStack myItemStack = GameRegistry.findItemStack( modID, Name, 1 );
ItemStack myItemStack = GameRegistry.findItemStack( modID, name, 1 );
if( myItemStack == null )
{
+31 -31
View File
@@ -22,6 +22,8 @@ package appeng.core.sync;
import java.lang.reflect.Constructor;
import java.util.List;
import com.google.common.collect.Lists;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
@@ -33,8 +35,6 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.relauncher.ReflectionHelper;
import com.google.common.collect.Lists;
import appeng.api.AEApi;
import appeng.api.config.SecurityPermissions;
import appeng.api.definitions.IComparableDefinition;
@@ -195,24 +195,24 @@ public enum GuiBridge implements IGuiHandler
GUI_CRAFTING_STATUS( ContainerCraftingStatus.class, ITerminalHost.class, ITEM_OR_WORLD, SecurityPermissions.CRAFT );
private final Class Tile;
private final Class Container;
private Class Gui;
private final Class tileClass;
private final Class containerClass;
private Class guiClass;
private GuiHostType type;
private SecurityPermissions requiredPermission;
GuiBridge()
{
this.Tile = null;
this.Gui = null;
this.Container = null;
this.tileClass = null;
this.guiClass = null;
this.containerClass = null;
}
GuiBridge( Class _Container, SecurityPermissions requiredPermission )
GuiBridge( Class containerClass, SecurityPermissions requiredPermission )
{
this.requiredPermission = requiredPermission;
this.Container = _Container;
this.Tile = null;
this.containerClass = containerClass;
this.tileClass = null;
this.getGui();
}
@@ -224,36 +224,36 @@ public enum GuiBridge implements IGuiHandler
{
if( Platform.isClient() )
{
final String start = this.Container.getName();
final String start = this.containerClass.getName();
String guiClass = start.replaceFirst( "container.", "client.gui." ).replace( ".Container", ".Gui" );
if( start.equals( guiClass ) )
{
throw new IllegalStateException( "Unable to find gui class" );
}
this.Gui = ReflectionHelper.getClass( this.getClass().getClassLoader(), guiClass );
if( this.Gui == null )
this.guiClass = ReflectionHelper.getClass( this.getClass().getClassLoader(), guiClass );
if( this.guiClass == null )
{
throw new IllegalStateException( "Cannot Load class: " + guiClass );
}
}
}
GuiBridge( Class _Container, Class _Tile, GuiHostType type, SecurityPermissions requiredPermission )
GuiBridge( Class containerClass, Class tileClass, GuiHostType type, SecurityPermissions requiredPermission )
{
this.requiredPermission = requiredPermission;
this.Container = _Container;
this.containerClass = containerClass;
this.type = type;
this.Tile = _Tile;
this.tileClass = tileClass;
this.getGui();
}
@Override
public Object getServerGuiElement( int ID_ORDINAL, EntityPlayer player, World w, int x, int y, int z )
public Object getServerGuiElement( int ordinal, EntityPlayer player, World w, int x, int y, int z )
{
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
GuiBridge ID = values()[ID_ORDINAL >> 4];
boolean stem = ( ( ID_ORDINAL >> 3 ) & 1 ) == 1;
ForgeDirection side = ForgeDirection.getOrientation( ordinal & 0x07 );
GuiBridge ID = values()[ordinal >> 4];
boolean stem = ( ( ordinal >> 3 ) & 1 ) == 1;
if( ID.type.isItem() )
{
ItemStack it = null;
@@ -315,12 +315,12 @@ public enum GuiBridge implements IGuiHandler
public boolean CorrectTileOrPart( Object tE )
{
if( this.Tile == null )
if( this.tileClass == null )
{
throw new IllegalArgumentException( "This Gui Cannot use the standard Handler." );
}
return this.Tile.isInstance( tE );
return this.tileClass.isInstance( tE );
}
private Object updateGui( Object newContainer, World w, int x, int y, int z, ForgeDirection side, Object myItem )
@@ -343,7 +343,7 @@ public enum GuiBridge implements IGuiHandler
{
try
{
Constructor[] c = this.Container.getConstructors();
Constructor[] c = this.containerClass.getConstructors();
if( c.length == 0 )
{
throw new AppEngException( "Invalid Gui Class" );
@@ -353,7 +353,7 @@ public enum GuiBridge implements IGuiHandler
if( target == null )
{
throw new IllegalStateException( "Cannot find " + this.Container.getName() + "( " + this.typeName( inventory ) + ", " + this.typeName( tE ) + " )" );
throw new IllegalStateException( "Cannot find " + this.containerClass.getName() + "( " + this.typeName( inventory ) + ", " + this.typeName( tE ) + " )" );
}
Object o = target.newInstance( inventory, tE );
@@ -431,11 +431,11 @@ public enum GuiBridge implements IGuiHandler
}
@Override
public Object getClientGuiElement( int ID_ORDINAL, EntityPlayer player, World w, int x, int y, int z )
public Object getClientGuiElement( int ordinal, EntityPlayer player, World w, int x, int y, int z )
{
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
GuiBridge ID = values()[ID_ORDINAL >> 4];
boolean stem = ( ( ID_ORDINAL >> 3 ) & 1 ) == 1;
ForgeDirection side = ForgeDirection.getOrientation( ordinal & 0x07 );
GuiBridge ID = values()[ordinal >> 4];
boolean stem = ( ( ordinal >> 3 ) & 1 ) == 1;
if( ID.type.isItem() )
{
ItemStack it = null;
@@ -480,7 +480,7 @@ public enum GuiBridge implements IGuiHandler
{
try
{
Constructor[] c = this.Gui.getConstructors();
Constructor[] c = this.guiClass.getConstructors();
if( c.length == 0 )
{
throw new AppEngException( "Invalid Gui Class" );
@@ -490,7 +490,7 @@ public enum GuiBridge implements IGuiHandler
if( target == null )
{
throw new IllegalStateException( "Cannot find " + this.Container.getName() + "( " + this.typeName( inventory ) + ", " + this.typeName( tE ) + " )" );
throw new IllegalStateException( "Cannot find " + this.containerClass.getName() + "( " + this.typeName( inventory ) + ", " + this.typeName( tE ) + " )" );
}
return target.newInstance( inventory, tE );
@@ -44,15 +44,15 @@ public class PacketProgressBar extends AppEngPacket
}
// api
public PacketProgressBar( int short_id, long value )
public PacketProgressBar( int shortID, long value )
{
this.id = (short) short_id;
this.id = (short) shortID;
this.value = value;
ByteBuf data = Unpooled.buffer();
data.writeInt( this.getPacketID() );
data.writeShort( short_id );
data.writeShort( shortID );
data.writeLong( value );
this.configureWrite( data );
@@ -72,10 +72,10 @@ public class PacketValueConfig extends AppEngPacket
}
// api
public PacketValueConfig( String Name, String Value ) throws IOException
public PacketValueConfig( String name, String value ) throws IOException
{
this.Name = Name;
this.Value = Value;
this.Name = name;
this.Value = value;
ByteBuf data = Unpooled.buffer();
@@ -83,8 +83,8 @@ public class PacketValueConfig extends AppEngPacket
ByteArrayOutputStream bos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream( bos );
dos.writeUTF( Name );
dos.writeUTF( Value );
dos.writeUTF( name );
dos.writeUTF( value );
// dos.close();
data.writeBytes( bos.toByteArray() );