Merge pull request #1422 from thatsIch/e-constant-naming-convention
Replaces all constants regarding their naming conventions
This commit is contained in:
@@ -31,6 +31,9 @@ import java.util.Map.Entry;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -47,9 +50,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.implementations.items.IItemGroup;
|
||||
@@ -71,7 +71,7 @@ import appeng.util.Platform;
|
||||
|
||||
public final class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, IUpgradeModule
|
||||
{
|
||||
public static final int KILO = 1024;
|
||||
public static final int KILO_SCALAR = 1024;
|
||||
public static ItemMultiMaterial instance;
|
||||
|
||||
private final Map<Integer, MaterialType> dmgToMaterial = new HashMap<Integer, MaterialType>();
|
||||
@@ -415,13 +415,13 @@ public final class ItemMultiMaterial extends AEBaseItem implements IStorageCompo
|
||||
switch( this.getTypeByStack( is ) )
|
||||
{
|
||||
case Cell1kPart:
|
||||
return KILO;
|
||||
return KILO_SCALAR;
|
||||
case Cell4kPart:
|
||||
return KILO * 4;
|
||||
return KILO_SCALAR * 4;
|
||||
case Cell16kPart:
|
||||
return KILO * 16;
|
||||
return KILO_SCALAR * 16;
|
||||
case Cell64kPart:
|
||||
return KILO * 64;
|
||||
return KILO_SCALAR * 64;
|
||||
default:
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -58,10 +58,10 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
public static final int LEVEL_OFFSET = 200;
|
||||
public static final int SINGLE_OFFSET = LEVEL_OFFSET * 3;
|
||||
|
||||
public static final int Certus = 0;
|
||||
public static final int Nether = SINGLE_OFFSET;
|
||||
public static final int Fluix = SINGLE_OFFSET * 2;
|
||||
public static final int END = SINGLE_OFFSET * 3;
|
||||
public static final int CERTUS = 0;
|
||||
public static final int NETHER = SINGLE_OFFSET;
|
||||
public static final int FLUIX = SINGLE_OFFSET * 2;
|
||||
public static final int FINAL_STAGE = SINGLE_OFFSET * 3;
|
||||
|
||||
final IIcon[] certus = new IIcon[3];
|
||||
final IIcon[] fluix = new IIcon[3];
|
||||
@@ -120,28 +120,28 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
final IMaterials materials = AEApi.instance().definitions().materials();
|
||||
final int size = is.stackSize;
|
||||
|
||||
if( newDamage == Certus + SINGLE_OFFSET )
|
||||
if( newDamage == CERTUS + SINGLE_OFFSET )
|
||||
{
|
||||
for( ItemStack quartzStack : materials.purifiedCertusQuartzCrystal().maybeStack( size ).asSet() )
|
||||
{
|
||||
return quartzStack;
|
||||
}
|
||||
}
|
||||
if( newDamage == Nether + SINGLE_OFFSET )
|
||||
if( newDamage == NETHER + SINGLE_OFFSET )
|
||||
{
|
||||
for( ItemStack quartzStack : materials.purifiedNetherQuartzCrystal().maybeStack( size ).asSet() )
|
||||
{
|
||||
return quartzStack;
|
||||
}
|
||||
}
|
||||
if( newDamage == Fluix + SINGLE_OFFSET )
|
||||
if( newDamage == FLUIX + SINGLE_OFFSET )
|
||||
{
|
||||
for( ItemStack quartzStack : materials.purifiedFluixCrystal().maybeStack( size ).asSet() )
|
||||
{
|
||||
return quartzStack;
|
||||
}
|
||||
}
|
||||
if( newDamage > END )
|
||||
if( newDamage > FINAL_STAGE )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -184,17 +184,17 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
{
|
||||
int damage = this.getProgress( is );
|
||||
|
||||
if( damage < Certus + SINGLE_OFFSET )
|
||||
if( damage < CERTUS + SINGLE_OFFSET )
|
||||
{
|
||||
return this.getUnlocalizedName() + ".Certus";
|
||||
}
|
||||
|
||||
if( damage < Nether + SINGLE_OFFSET )
|
||||
if( damage < NETHER + SINGLE_OFFSET )
|
||||
{
|
||||
return this.getUnlocalizedName() + ".Nether";
|
||||
}
|
||||
|
||||
if( damage < Fluix + SINGLE_OFFSET )
|
||||
if( damage < FLUIX + SINGLE_OFFSET )
|
||||
{
|
||||
return this.getUnlocalizedName() + ".Fluix";
|
||||
}
|
||||
@@ -217,7 +217,7 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
@Override
|
||||
public int getMaxDamage( ItemStack stack )
|
||||
{
|
||||
return END;
|
||||
return FINAL_STAGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -233,19 +233,19 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
|
||||
int damage = this.getProgress( stack );
|
||||
|
||||
if( damage < Certus + SINGLE_OFFSET )
|
||||
if( damage < CERTUS + SINGLE_OFFSET )
|
||||
{
|
||||
list = this.certus;
|
||||
}
|
||||
else if( damage < Nether + SINGLE_OFFSET )
|
||||
else if( damage < NETHER + SINGLE_OFFSET )
|
||||
{
|
||||
damage -= Nether;
|
||||
damage -= NETHER;
|
||||
list = this.nether;
|
||||
}
|
||||
|
||||
else if( damage < Fluix + SINGLE_OFFSET )
|
||||
else if( damage < FLUIX + SINGLE_OFFSET )
|
||||
{
|
||||
damage -= Fluix;
|
||||
damage -= FLUIX;
|
||||
list = this.fluix;
|
||||
}
|
||||
|
||||
@@ -313,18 +313,18 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
|
||||
public void getSubItems( Item i, CreativeTabs t, List l )
|
||||
{
|
||||
// lvl 0
|
||||
l.add( newStyle( new ItemStack( this, 1, Certus ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, Nether ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, Fluix ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, CERTUS ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, NETHER ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, FLUIX ) ) );
|
||||
|
||||
// lvl 1
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + Certus ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + Nether ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + Fluix ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + CERTUS ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + NETHER ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + FLUIX ) ) );
|
||||
|
||||
// lvl 2
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + Certus ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + Nether ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + Fluix ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + CERTUS ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + NETHER ) ) );
|
||||
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + FLUIX ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
|
||||
{
|
||||
if( b.rotateBlock( w, x, y, z, ForgeDirection.getOrientation( side ) ) )
|
||||
{
|
||||
b.onNeighborBlockChange( w, x, y, z, Platform.AIR );
|
||||
b.onNeighborBlockChange( w, x, y, z, Platform.AIR_BLOCK );
|
||||
p.swingItem();
|
||||
return !w.isRemote;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
}
|
||||
else
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
|
||||
}
|
||||
|
||||
if( r.Drops != null )
|
||||
@@ -177,7 +177,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
}
|
||||
else
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
|
||||
}
|
||||
|
||||
if( r.Drops != null )
|
||||
@@ -266,14 +266,14 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
{
|
||||
if( blockID instanceof BlockTNT )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
|
||||
( (BlockTNT) blockID ).func_150114_a( w, x, y, z, 1, p );
|
||||
return true;
|
||||
}
|
||||
|
||||
if( blockID instanceof BlockTinyTNT )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
|
||||
( (BlockTinyTNT) blockID ).startFuse( w, x, y, z, p );
|
||||
return true;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
|
||||
if( or.BlockItem == null )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWren
|
||||
ForgeDirection mySide = ForgeDirection.getOrientation( side );
|
||||
if( b.rotateBlock( world, x, y, z, mySide ) )
|
||||
{
|
||||
b.onNeighborBlockChange( world, x, y, z, Platform.AIR );
|
||||
b.onNeighborBlockChange( world, x, y, z, Platform.AIR_BLOCK );
|
||||
player.swingItem();
|
||||
return !world.isRemote;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user