Changed access to use this qualifier

This commit is contained in:
yueh
2014-12-29 15:13:47 +01:00
parent 2a5e57a59b
commit f471513bd0
604 changed files with 11573 additions and 11573 deletions
@@ -62,19 +62,19 @@ public class AEFeatureHandler implements AEItemDefinition
public void register()
{
if ( isFeatureAvailable() )
if ( this.isFeatureAvailable() )
{
if ( feature instanceof Item )
if ( this.feature instanceof Item )
{
initItem( ( Item ) feature );
this.initItem( ( Item ) this.feature );
}
else if ( this.feature instanceof BlockStairs )
{
this.initStairBlock( ( BlockStairs ) this.feature );
}
else if ( feature instanceof Block )
else if ( this.feature instanceof Block )
{
initBlock( ( Block ) feature );
this.initBlock( ( Block ) this.feature );
}
}
}
@@ -83,7 +83,7 @@ public class AEFeatureHandler implements AEItemDefinition
{
boolean enabled = true;
for ( AEFeature f : features )
for ( AEFeature f : this.features )
enabled = enabled && AEConfig.instance.isFeatureEnabled( f );
return enabled;
@@ -91,9 +91,9 @@ public class AEFeatureHandler implements AEItemDefinition
private void initItem( Item i )
{
ItemData = i;
this.ItemData = i;
String name = getName( i.getClass(), subName );
String name = getName( i.getClass(), this.subName );
i.setTextureName( "appliedenergistics2:" + name );
i.setUnlocalizedName( /* "item." */"appliedenergistics2." + name );
@@ -114,7 +114,7 @@ public class AEFeatureHandler implements AEItemDefinition
{
this.stairData = stair;
String name = getName( stair.getClass(), subName );
String name = getName( stair.getClass(), this.subName );
stair.setCreativeTab( CreativeTab.instance );
stair.setBlockName( /* "tile." */"appliedenergistics2." + name );
stair.setBlockTextureName( "appliedenergistics2:" + name );
@@ -124,14 +124,14 @@ public class AEFeatureHandler implements AEItemDefinition
private void initBlock( Block b )
{
BlockData = b;
this.BlockData = b;
String name = getName( b.getClass(), subName );
String name = getName( b.getClass(), this.subName );
b.setCreativeTab( CreativeTab.instance );
b.setBlockName( /* "tile." */"appliedenergistics2." + name );
b.setBlockTextureName( "appliedenergistics2:" + name );
if ( Platform.isClient() && BlockData instanceof AEBaseBlock )
if ( Platform.isClient() && this.BlockData instanceof AEBaseBlock )
{
AEBaseBlock bb = ( AEBaseBlock ) b;
CommonHelper.proxy.bindTileEntitySpecialRenderer( bb.getTileEntityClass(), bb );
@@ -173,13 +173,13 @@ public class AEFeatureHandler implements AEItemDefinition
public EnumSet<AEFeature> getFeatures()
{
return features.clone();
return this.features.clone();
}
@Override
public Block block()
{
return BlockData;
return this.BlockData;
}
@Override
@@ -204,9 +204,9 @@ public class AEFeatureHandler implements AEItemDefinition
@Override
public Class<? extends TileEntity> entity()
{
if ( BlockData instanceof AEBaseBlock )
if ( this.BlockData instanceof AEBaseBlock )
{
AEBaseBlock bb = ( AEBaseBlock ) BlockData;
AEBaseBlock bb = ( AEBaseBlock ) this.BlockData;
return bb.getTileEntityClass();
}
@@ -216,14 +216,14 @@ public class AEFeatureHandler implements AEItemDefinition
@Override
public ItemStack stack( int stackSize )
{
if ( isFeatureAvailable() )
if ( this.isFeatureAvailable() )
{
ItemStack rv;
if ( ItemData != null )
rv = new ItemStack( ItemData );
if ( this.ItemData != null )
rv = new ItemStack( this.ItemData );
else
rv = new ItemStack( BlockData );
rv = new ItemStack( this.BlockData );
rv.stackSize = stackSize;
return rv;
@@ -235,7 +235,7 @@ public class AEFeatureHandler implements AEItemDefinition
@Override
public boolean sameAsStack( ItemStack is )
{
return isFeatureAvailable() && Platform.isSameItemType( is, stack( 1 ) );
return this.isFeatureAvailable() && Platform.isSameItemType( is, this.stack( 1 ) );
}
/**
@@ -255,7 +255,7 @@ public class AEFeatureHandler implements AEItemDefinition
@Override
public boolean sameAsBlock( IBlockAccess world, int x, int y, int z )
{
return isFeatureAvailable() && BlockData != null && world.getBlock( x, y, z ) == BlockData;
return this.isFeatureAvailable() && this.BlockData != null && world.getBlock( x, y, z ) == this.BlockData;
}
}
@@ -33,7 +33,7 @@ public class ColoredItemDefinition implements AEColoredItemDefinition
@Override
public Item item(AEColor color)
{
ItemStackSrc is = colors[color.ordinal()];
ItemStackSrc is = this.colors[color.ordinal()];
if ( is == null )
return null;
@@ -44,7 +44,7 @@ public class ColoredItemDefinition implements AEColoredItemDefinition
@Override
public ItemStack stack(AEColor color, int stackSize)
{
ItemStackSrc is = colors[color.ordinal()];
ItemStackSrc is = this.colors[color.ordinal()];
if ( is == null )
return null;
@@ -55,7 +55,7 @@ public class ColoredItemDefinition implements AEColoredItemDefinition
@Override
public boolean sameAs(AEColor color, ItemStack comparableItem)
{
ItemStackSrc is = colors[color.ordinal()];
ItemStackSrc is = this.colors[color.ordinal()];
if ( comparableItem == null || is == null )
return false;
@@ -65,7 +65,7 @@ public class ColoredItemDefinition implements AEColoredItemDefinition
public void add(AEColor v, ItemStackSrc is)
{
colors[v.ordinal()] = is;
this.colors[v.ordinal()] = is;
}
@Override
@@ -83,9 +83,9 @@ public class ColoredItemDefinition implements AEColoredItemDefinition
@Override
public ItemStack[] allStacks(int stackSize)
{
ItemStack is[] = new ItemStack[colors.length];
ItemStack is[] = new ItemStack[this.colors.length];
for (int x = 0; x < is.length; x++)
is[x] = colors[x].stack( 1 );
is[x] = this.colors[x].stack( 1 );
return is;
}
@@ -31,7 +31,7 @@ public class DamagedItemDefinition implements AEItemDefinition
final IStackSrc src;
public DamagedItemDefinition(IStackSrc is) {
src = is;
this.src = is;
}
@Override
@@ -43,7 +43,7 @@ public class DamagedItemDefinition implements AEItemDefinition
@Override
public Item item()
{
return src.getItem();
return this.src.getItem();
}
@Override
@@ -55,7 +55,7 @@ public class DamagedItemDefinition implements AEItemDefinition
@Override
public ItemStack stack(int stackSize)
{
return src.stack( stackSize );
return this.src.stack( stackSize );
}
@Override
@@ -64,7 +64,7 @@ public class DamagedItemDefinition implements AEItemDefinition
if ( comparableItem == null )
return false;
return comparableItem.getItem() == src.getItem() && comparableItem.getItemDamage() == src.getDamage();
return comparableItem.getItem() == this.src.getItem() && comparableItem.getItemDamage() == this.src.getDamage();
}
@Override
@@ -30,25 +30,25 @@ public class ItemStackSrc implements IStackSrc
public final int damage;
public ItemStackSrc(Item i, int dmg) {
block = null;
item = i;
damage = dmg;
this.block = null;
this.item = i;
this.damage = dmg;
}
public ItemStackSrc(Block b, int dmg) {
item = null;
block = b;
damage = dmg;
this.item = null;
this.block = b;
this.damage = dmg;
}
@Override
public ItemStack stack(int i)
{
if ( block != null )
return new ItemStack( block, i, damage );
if ( this.block != null )
return new ItemStack( this.block, i, this.damage );
if ( item != null )
return new ItemStack( item, i, damage );
if ( this.item != null )
return new ItemStack( this.item, i, this.damage );
return null;
}
@@ -56,12 +56,12 @@ public class ItemStackSrc implements IStackSrc
@Override
public Item getItem()
{
return item;
return this.item;
}
@Override
public int getDamage()
{
return damage;
return this.damage;
}
}
@@ -36,19 +36,19 @@ public class MaterialStackSrc implements IStackSrc
@Override
public ItemStack stack(int stackSize)
{
return src.stack( stackSize );
return this.src.stack( stackSize );
}
@Override
public Item getItem()
{
return src.itemInstance;
return this.src.itemInstance;
}
@Override
public int getDamage()
{
return src.damageValue;
return this.src.damageValue;
}
}
@@ -32,35 +32,35 @@ public class WrappedDamageItemDefinition implements AEItemDefinition
final int damage;
public WrappedDamageItemDefinition(AEItemDefinition def, int dmg) {
baseItem = def;
damage = dmg;
this.baseItem = def;
this.damage = dmg;
}
@Override
public Block block()
{
return baseItem.block();
return this.baseItem.block();
}
@Override
public Item item()
{
return baseItem.item();
return this.baseItem.item();
}
@Override
public Class<? extends TileEntity> entity()
{
return baseItem.entity();
return this.baseItem.entity();
}
@Override
public ItemStack stack(int stackSize)
{
if ( baseItem == null )
if ( this.baseItem == null )
return null;
return new ItemStack( baseItem.block(), stackSize, damage );
return new ItemStack( this.baseItem.block(), stackSize, this.damage );
}
@Override
@@ -69,14 +69,14 @@ public class WrappedDamageItemDefinition implements AEItemDefinition
if ( comparableItem == null )
return false;
return comparableItem.getItem() == baseItem.item() && comparableItem.getItemDamage() == damage;
return comparableItem.getItem() == this.baseItem.item() && comparableItem.getItemDamage() == this.damage;
}
@Override
public boolean sameAsBlock(IBlockAccess world, int x, int y, int z)
{
if ( block() != null )
return world.getBlock( x, y, z ) == block() && world.getBlockMetadata( x, y, z ) == damage;
if ( this.block() != null )
return world.getBlock( x, y, z ) == this.block() && world.getBlockMetadata( x, y, z ) == this.damage;
return false;
}
@@ -34,14 +34,14 @@ public class CellRegistry implements ICellRegistry
final List<ICellHandler> handlers;
public CellRegistry() {
handlers = new ArrayList<ICellHandler>();
this.handlers = new ArrayList<ICellHandler>();
}
@Override
public void addCellHandler(ICellHandler h)
{
if ( h != null )
handlers.add( h );
this.handlers.add( h );
}
@Override
@@ -49,7 +49,7 @@ public class CellRegistry implements ICellRegistry
{
if ( is == null )
return false;
for (ICellHandler ch : handlers)
for (ICellHandler ch : this.handlers)
if ( ch.isCell( is ) )
return true;
return false;
@@ -60,7 +60,7 @@ public class CellRegistry implements ICellRegistry
{
if ( is == null )
return null;
for (ICellHandler ch : handlers)
for (ICellHandler ch : this.handlers)
{
if ( ch.isCell( is ) )
{
@@ -75,7 +75,7 @@ public class CellRegistry implements ICellRegistry
{
if ( is == null )
return null;
for (ICellHandler ch : handlers)
for (ICellHandler ch : this.handlers)
{
if ( ch.isCell( is ) )
{
@@ -36,20 +36,20 @@ public class ExternalStorageRegistry implements IExternalStorageRegistry
final ExternalIInv lastHandler = new ExternalIInv();
public ExternalStorageRegistry() {
Handlers = new ArrayList<IExternalStorageHandler>();
this.Handlers = new ArrayList<IExternalStorageHandler>();
}
@Override
public IExternalStorageHandler getHandler(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc)
{
for (IExternalStorageHandler x : Handlers)
for (IExternalStorageHandler x : this.Handlers)
{
if ( x.canHandle( te, d, chan, mySrc ) )
return x;
}
if ( lastHandler.canHandle( te, d, chan, mySrc ) )
return lastHandler;
if ( this.lastHandler.canHandle( te, d, chan, mySrc ) )
return this.lastHandler;
return null;
}
@@ -57,7 +57,7 @@ public class ExternalStorageRegistry implements IExternalStorageRegistry
@Override
public void addExternalStorageInterface(IExternalStorageHandler ei)
{
Handlers.add( ei );
this.Handlers.add( ei );
}
}
@@ -35,7 +35,7 @@ public class GridCacheRegistry implements IGridCacheRegistry
public void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation)
{
if ( iface.isAssignableFrom( implementation ) )
caches.put( iface, implementation );
this.caches.put( iface, implementation );
else
throw new RuntimeException( "Invalid setup, grid cache must either be the same class, or an interface that the implementation implements" );
}
@@ -45,11 +45,11 @@ public class GridCacheRegistry implements IGridCacheRegistry
{
HashMap<Class<? extends IGridCache>, IGridCache> map = new HashMap<Class<? extends IGridCache>, IGridCache>();
for (Class<? extends IGridCache> iface : caches.keySet())
for (Class<? extends IGridCache> iface : this.caches.keySet())
{
try
{
Constructor<? extends IGridCache> c = caches.get( iface ).getConstructor( IGrid.class );
Constructor<? extends IGridCache> c = this.caches.get( iface ).getConstructor( IGrid.class );
map.put( iface, c.newInstance( g ) );
}
catch (Throwable e)
@@ -49,26 +49,26 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
}
public GrinderRecipeManager() {
RecipeList = new ArrayList<IGrinderEntry>();
this.RecipeList = new ArrayList<IGrinderEntry>();
addOre( "Coal", new ItemStack( Items.coal ) );
addOre( "Charcoal", new ItemStack( Items.coal, 1, 1 ) );
this.addOre( "Coal", new ItemStack( Items.coal ) );
this.addOre( "Charcoal", new ItemStack( Items.coal, 1, 1 ) );
addOre( "NetherQuartz", new ItemStack( Blocks.quartz_ore ) );
addIngot( "NetherQuartz", new ItemStack( Items.quartz ) );
this.addOre( "NetherQuartz", new ItemStack( Blocks.quartz_ore ) );
this.addIngot( "NetherQuartz", new ItemStack( Items.quartz ) );
addOre( "Gold", new ItemStack( Blocks.gold_ore ) );
addIngot( "Gold", new ItemStack( Items.gold_ingot ) );
this.addOre( "Gold", new ItemStack( Blocks.gold_ore ) );
this.addIngot( "Gold", new ItemStack( Items.gold_ingot ) );
addOre( "Iron", new ItemStack( Blocks.iron_ore ) );
addIngot( "Iron", new ItemStack( Items.iron_ingot ) );
this.addOre( "Iron", new ItemStack( Blocks.iron_ore ) );
this.addIngot( "Iron", new ItemStack( Items.iron_ingot ) );
addOre( "Obsidian", new ItemStack( Blocks.obsidian ) );
this.addOre( "Obsidian", new ItemStack( Blocks.obsidian ) );
addIngot( "Ender", new ItemStack( Items.ender_pearl ) );
addIngot( "EnderPearl", new ItemStack( Items.ender_pearl ) );
this.addIngot( "Ender", new ItemStack( Items.ender_pearl ) );
this.addIngot( "EnderPearl", new ItemStack( Items.ender_pearl ) );
addIngot( "Wheat", new ItemStack( Items.wheat ) );
this.addIngot( "Wheat", new ItemStack( Items.wheat ) );
OreDictionaryHandler.instance.observe( this );
}
@@ -76,17 +76,17 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
@Override
public List<IGrinderEntry> getRecipes()
{
log( "API - getRecipes" );
return RecipeList;
this.log( "API - getRecipes" );
return this.RecipeList;
}
private void injectRecipe(AppEngGrinderRecipe appEngGrinderRecipe)
{
for (IGrinderEntry gr : RecipeList)
for (IGrinderEntry gr : this.RecipeList)
if ( Platform.isSameItemPrecise( gr.getInput(), appEngGrinderRecipe.getInput() ) )
return;
RecipeList.add( appEngGrinderRecipe );
this.RecipeList.add( appEngGrinderRecipe );
}
@Override
@@ -94,12 +94,12 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( in == null || out == null )
{
log( "Invalid Grinder Recipe Specified." );
this.log( "Invalid Grinder Recipe Specified." );
return;
}
log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " for " + cost );
injectRecipe( new AppEngGrinderRecipe( copy( in ), copy( out ), cost ) );
this.log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " for " + cost );
this.injectRecipe( new AppEngGrinderRecipe( this.copy( in ), this.copy( out ), cost ) );
}
@Override
@@ -107,13 +107,13 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( in == null || (optional == null && out == null) )
{
log( "Invalid Grinder Recipe Specified." );
this.log( "Invalid Grinder Recipe Specified." );
return;
}
log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional "
this.log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional "
+ Platform.getItemDisplayName( optional ) + " for " + cost );
injectRecipe( new AppEngGrinderRecipe( copy( in ), copy( out ), copy( optional ), chance, cost ) );
this.injectRecipe( new AppEngGrinderRecipe( this.copy( in ), this.copy( out ), this.copy( optional ), chance, cost ) );
}
@Override
@@ -121,31 +121,31 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( in == null || (optional == null && out == null && optional2 == null) )
{
log( "Invalid Grinder Recipe Specified." );
this.log( "Invalid Grinder Recipe Specified." );
return;
}
log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional "
this.log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional "
+ Platform.getItemDisplayName( optional ) + " for " + cost );
injectRecipe( new AppEngGrinderRecipe( copy( in ), copy( out ), copy( optional ), chance, cost ) );
this.injectRecipe( new AppEngGrinderRecipe( this.copy( in ), this.copy( out ), this.copy( optional ), chance, cost ) );
}
@Override
public IGrinderEntry getRecipeForInput(ItemStack input)
{
log( "Looking up recipe for " + Platform.getItemDisplayName( input ) );
this.log( "Looking up recipe for " + Platform.getItemDisplayName( input ) );
if ( input != null )
{
for (IGrinderEntry r : RecipeList)
for (IGrinderEntry r : this.RecipeList)
{
if ( Platform.isSameItem( input, r.getInput() ) )
{
log( "Recipe for " + input.getUnlocalizedName() + " found " + Platform.getItemDisplayName( r.getOutput() ) );
this.log( "Recipe for " + input.getUnlocalizedName() + " found " + Platform.getItemDisplayName( r.getOutput() ) );
return r;
}
}
log( "Could not find recipe for " + Platform.getItemDisplayName( input ) );
this.log( "Could not find recipe for " + Platform.getItemDisplayName( input ) );
}
return null;
@@ -175,22 +175,22 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( item == null )
return;
log( "Adding Ore - " + name + " : " + Platform.getItemDisplayName( item ) );
this.log( "Adding Ore - " + name + " : " + Platform.getItemDisplayName( item ) );
Ores.put( item, name );
this.Ores.put( item, name );
if ( Dusts.containsKey( name ) )
if ( this.Dusts.containsKey( name ) )
{
ItemStack is = Dusts.get( name ).copy();
int ratio = getDustToOreRatio( name );
ItemStack is = this.Dusts.get( name ).copy();
int ratio = this.getDustToOreRatio( name );
if ( ratio > 1 )
{
ItemStack extra = is.copy();
extra.stackSize = ratio - 1;
addRecipe( item, is, extra, (float) (AEConfig.instance.oreDoublePercentage / 100.0), 8 );
this.addRecipe( item, is, extra, (float) (AEConfig.instance.oreDoublePercentage / 100.0), 8 );
}
else
addRecipe( item, is, 8 );
this.addRecipe( item, is, 8 );
}
}
@@ -198,13 +198,13 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( item == null )
return;
log( "Adding Ingot - " + name + " : " + Platform.getItemDisplayName( item ) );
this.log( "Adding Ingot - " + name + " : " + Platform.getItemDisplayName( item ) );
Ingots.put( item, name );
this.Ingots.put( item, name );
if ( Dusts.containsKey( name ) )
if ( this.Dusts.containsKey( name ) )
{
addRecipe( item, Dusts.get( name ), 4 );
this.addRecipe( item, this.Dusts.get( name ), 4 );
}
}
@@ -212,35 +212,35 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( item == null )
return;
if ( Dusts.containsKey( name ) )
if ( this.Dusts.containsKey( name ) )
{
log( "Rejecting Dust - " + name + " : " + Platform.getItemDisplayName( item ) );
this.log( "Rejecting Dust - " + name + " : " + Platform.getItemDisplayName( item ) );
return;
}
log( "Adding Dust - " + name + " : " + Platform.getItemDisplayName( item ) );
this.log( "Adding Dust - " + name + " : " + Platform.getItemDisplayName( item ) );
Dusts.put( name, item );
this.Dusts.put( name, item );
for (Entry<ItemStack, String> d : Ores.entrySet())
for (Entry<ItemStack, String> d : this.Ores.entrySet())
if ( name.equals( d.getValue() ) )
{
ItemStack is = item.copy();
is.stackSize = 1;
int ratio = getDustToOreRatio( name );
int ratio = this.getDustToOreRatio( name );
if ( ratio > 1 )
{
ItemStack extra = is.copy();
extra.stackSize = ratio - 1;
addRecipe( d.getKey(), is, extra, (float) (AEConfig.instance.oreDoublePercentage / 100.0), 8 );
this.addRecipe( d.getKey(), is, extra, (float) (AEConfig.instance.oreDoublePercentage / 100.0), 8 );
}
else
addRecipe( d.getKey(), is, 8 );
this.addRecipe( d.getKey(), is, 8 );
}
for (Entry<ItemStack, String> d : Ingots.entrySet())
for (Entry<ItemStack, String> d : this.Ingots.entrySet())
if ( name.equals( d.getValue() ) )
addRecipe( d.getKey(), item, 4 );
this.addRecipe( d.getKey(), item, 4 );
}
@Override
@@ -252,15 +252,15 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
{
if ( name.equals( "ore" + ore ) )
{
addOre( ore, item );
this.addOre( ore, item );
}
else if ( name.equals( "crystal" + ore ) || name.equals( "ingot" + ore ) || name.equals( "gem" + ore ) )
{
addIngot( ore, item );
this.addIngot( ore, item );
}
else if ( name.equals( "dust" + ore ) )
{
addDust( ore, item );
this.addDust( ore, item );
}
}
}
@@ -41,16 +41,16 @@ public class LocatableRegistry implements ILocatableRegistry
if ( e.change == LocatableEvent.Register )
{
set.put( e.target.getLocatableSerial(), e.target );
this.set.put( e.target.getLocatableSerial(), e.target );
}
else if ( e.change == LocatableEvent.Unregister )
{
set.remove( e.target.getLocatableSerial() );
this.set.remove( e.target.getLocatableSerial() );
}
}
public LocatableRegistry() {
set = new HashMap<Long, ILocatable>();
this.set = new HashMap<Long, ILocatable>();
MinecraftForge.EVENT_BUS.register( this );
}
@@ -60,7 +60,7 @@ public class LocatableRegistry implements ILocatableRegistry
@Override
public Object findLocatableBySerial(long ser)
{
return set.get( ser );
return this.set.get( ser );
}
}
@@ -35,14 +35,14 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
@Override
public void registerAmmo(ItemStack ammo, double weight)
{
DamageModifiers.put( ammo, weight );
this.DamageModifiers.put( ammo, weight );
}
private void considerItem(String ore, ItemStack item, String Name, double weight)
{
if ( ore.equals( "berry" + Name ) || ore.equals( "nugget" + Name ) )
{
registerAmmo( item, weight );
this.registerAmmo( item, weight );
}
}
@@ -53,90 +53,90 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
return;
// addNugget( "Cobble", 18 ); // ?
considerItem( name, item, "MeatRaw", 32 );
considerItem( name, item, "MeatCooked", 32 );
considerItem( name, item, "Meat", 32 );
considerItem( name, item, "Chicken", 32 );
considerItem( name, item, "Beef", 32 );
considerItem( name, item, "Sheep", 32 );
considerItem( name, item, "Fish", 32 );
this.considerItem( name, item, "MeatRaw", 32 );
this.considerItem( name, item, "MeatCooked", 32 );
this.considerItem( name, item, "Meat", 32 );
this.considerItem( name, item, "Chicken", 32 );
this.considerItem( name, item, "Beef", 32 );
this.considerItem( name, item, "Sheep", 32 );
this.considerItem( name, item, "Fish", 32 );
// real world...
considerItem( name, item, "Lithium", 6.941 );
considerItem( name, item, "Beryllium", 9.0122 );
considerItem( name, item, "Boron", 10.811 );
considerItem( name, item, "Carbon", 12.0107 );
considerItem( name, item, "Coal", 12.0107 );
considerItem( name, item, "Charcoal", 12.0107 );
considerItem( name, item, "Sodium", 22.9897 );
considerItem( name, item, "Magnesium", 24.305 );
considerItem( name, item, "Aluminum", 26.9815 );
considerItem( name, item, "Silicon", 28.0855 );
considerItem( name, item, "Phosphorus", 30.9738 );
considerItem( name, item, "Sulfur", 32.065 );
considerItem( name, item, "Potassium", 39.0983 );
considerItem( name, item, "Calcium", 40.078 );
considerItem( name, item, "Scandium", 44.9559 );
considerItem( name, item, "Titanium", 47.867 );
considerItem( name, item, "Vanadium", 50.9415 );
considerItem( name, item, "Manganese", 54.938 );
considerItem( name, item, "Iron", 55.845 );
considerItem( name, item, "Nickel", 58.6934 );
considerItem( name, item, "Cobalt", 58.9332 );
considerItem( name, item, "Copper", 63.546 );
considerItem( name, item, "Zinc", 65.39 );
considerItem( name, item, "Gallium", 69.723 );
considerItem( name, item, "Germanium", 72.64 );
considerItem( name, item, "Bromine", 79.904 );
considerItem( name, item, "Krypton", 83.8 );
considerItem( name, item, "Rubidium", 85.4678 );
considerItem( name, item, "Strontium", 87.62 );
considerItem( name, item, "Yttrium", 88.9059 );
considerItem( name, item, "Zirconiumm", 91.224 );
considerItem( name, item, "Niobiumm", 92.9064 );
considerItem( name, item, "Technetium", 98 );
considerItem( name, item, "Ruthenium", 101.07 );
considerItem( name, item, "Rhodium", 102.9055 );
considerItem( name, item, "Palladium", 106.42 );
considerItem( name, item, "Silver", 107.8682 );
considerItem( name, item, "Cadmium", 112.411 );
considerItem( name, item, "Indium", 114.818 );
considerItem( name, item, "Tin", 118.71 );
considerItem( name, item, "Antimony", 121.76 );
considerItem( name, item, "Iodine", 126.9045 );
considerItem( name, item, "Tellurium", 127.6 );
considerItem( name, item, "Xenon", 131.293 );
considerItem( name, item, "Cesium", 132.9055 );
considerItem( name, item, "Barium", 137.327 );
considerItem( name, item, "Lanthanum", 138.9055 );
considerItem( name, item, "Cerium", 140.116 );
considerItem( name, item, "Tantalum", 180.9479 );
considerItem( name, item, "Tungsten", 183.84 );
considerItem( name, item, "Osmium", 190.23 );
considerItem( name, item, "Iridium", 192.217 );
considerItem( name, item, "Platinum", 195.078 );
considerItem( name, item, "Lead", 207.2 );
considerItem( name, item, "Bismuth", 208.9804 );
considerItem( name, item, "Uranium", 238.0289 );
considerItem( name, item, "Plutonium", 244 );
this.considerItem( name, item, "Lithium", 6.941 );
this.considerItem( name, item, "Beryllium", 9.0122 );
this.considerItem( name, item, "Boron", 10.811 );
this.considerItem( name, item, "Carbon", 12.0107 );
this.considerItem( name, item, "Coal", 12.0107 );
this.considerItem( name, item, "Charcoal", 12.0107 );
this.considerItem( name, item, "Sodium", 22.9897 );
this.considerItem( name, item, "Magnesium", 24.305 );
this.considerItem( name, item, "Aluminum", 26.9815 );
this.considerItem( name, item, "Silicon", 28.0855 );
this.considerItem( name, item, "Phosphorus", 30.9738 );
this.considerItem( name, item, "Sulfur", 32.065 );
this.considerItem( name, item, "Potassium", 39.0983 );
this.considerItem( name, item, "Calcium", 40.078 );
this.considerItem( name, item, "Scandium", 44.9559 );
this.considerItem( name, item, "Titanium", 47.867 );
this.considerItem( name, item, "Vanadium", 50.9415 );
this.considerItem( name, item, "Manganese", 54.938 );
this.considerItem( name, item, "Iron", 55.845 );
this.considerItem( name, item, "Nickel", 58.6934 );
this.considerItem( name, item, "Cobalt", 58.9332 );
this.considerItem( name, item, "Copper", 63.546 );
this.considerItem( name, item, "Zinc", 65.39 );
this.considerItem( name, item, "Gallium", 69.723 );
this.considerItem( name, item, "Germanium", 72.64 );
this.considerItem( name, item, "Bromine", 79.904 );
this.considerItem( name, item, "Krypton", 83.8 );
this.considerItem( name, item, "Rubidium", 85.4678 );
this.considerItem( name, item, "Strontium", 87.62 );
this.considerItem( name, item, "Yttrium", 88.9059 );
this.considerItem( name, item, "Zirconiumm", 91.224 );
this.considerItem( name, item, "Niobiumm", 92.9064 );
this.considerItem( name, item, "Technetium", 98 );
this.considerItem( name, item, "Ruthenium", 101.07 );
this.considerItem( name, item, "Rhodium", 102.9055 );
this.considerItem( name, item, "Palladium", 106.42 );
this.considerItem( name, item, "Silver", 107.8682 );
this.considerItem( name, item, "Cadmium", 112.411 );
this.considerItem( name, item, "Indium", 114.818 );
this.considerItem( name, item, "Tin", 118.71 );
this.considerItem( name, item, "Antimony", 121.76 );
this.considerItem( name, item, "Iodine", 126.9045 );
this.considerItem( name, item, "Tellurium", 127.6 );
this.considerItem( name, item, "Xenon", 131.293 );
this.considerItem( name, item, "Cesium", 132.9055 );
this.considerItem( name, item, "Barium", 137.327 );
this.considerItem( name, item, "Lanthanum", 138.9055 );
this.considerItem( name, item, "Cerium", 140.116 );
this.considerItem( name, item, "Tantalum", 180.9479 );
this.considerItem( name, item, "Tungsten", 183.84 );
this.considerItem( name, item, "Osmium", 190.23 );
this.considerItem( name, item, "Iridium", 192.217 );
this.considerItem( name, item, "Platinum", 195.078 );
this.considerItem( name, item, "Lead", 207.2 );
this.considerItem( name, item, "Bismuth", 208.9804 );
this.considerItem( name, item, "Uranium", 238.0289 );
this.considerItem( name, item, "Plutonium", 244 );
// TE stuff...
considerItem( name, item, "Invar", (58.6934 + 55.845 + 55.845) / 3.0 );
considerItem( name, item, "Electrum", (107.8682 + 196.96655) / 2.0 );
this.considerItem( name, item, "Invar", (58.6934 + 55.845 + 55.845) / 3.0 );
this.considerItem( name, item, "Electrum", (107.8682 + 196.96655) / 2.0 );
}
public MatterCannonAmmoRegistry() {
OreDictionaryHandler.instance.observe( this );
registerAmmo( new ItemStack( Items.gold_nugget ), 196.96655 );
this.registerAmmo( new ItemStack( Items.gold_nugget ), 196.96655 );
}
@Override
public float getPenetration(ItemStack is)
{
for (ItemStack o : DamageModifiers.keySet())
for (ItemStack o : this.DamageModifiers.keySet())
{
if ( Platform.isSameItem( o, is ) )
return DamageModifiers.get( o ).floatValue();
return this.DamageModifiers.get( o ).floatValue();
}
return 0;
}
@@ -47,7 +47,7 @@ public class MovableTileRegistry implements IMovableRegistry
IMovableHandler handler = null;
// ask handlers...
for (IMovableHandler han : handlers)
for (IMovableHandler han : this.handlers)
{
if ( han.canHandle( myClass, te ) )
{
@@ -59,7 +59,7 @@ public class MovableTileRegistry implements IMovableRegistry
// if you have a handler your opted in
if ( handler != null )
{
Valid.put( myClass, handler );
this.Valid.put( myClass, handler );
return handler;
}
@@ -67,34 +67,34 @@ public class MovableTileRegistry implements IMovableRegistry
// if your movable our opted in
if ( te instanceof IMovableTile )
{
Valid.put( myClass, dsh );
return dsh;
this.Valid.put( myClass, this.dsh );
return this.dsh;
}
// if you are on the white list your opted in.
for (Class<? extends TileEntity> testClass : test)
for (Class<? extends TileEntity> testClass : this.test)
{
if ( testClass.isAssignableFrom( myClass ) )
{
Valid.put( myClass, dsh );
return dsh;
this.Valid.put( myClass, this.dsh );
return this.dsh;
}
}
Valid.put( myClass, nullHandler );
return nullHandler;
this.Valid.put( myClass, this.nullHandler );
return this.nullHandler;
}
@Override
public boolean askToMove(TileEntity te)
{
Class myClass = te.getClass();
IMovableHandler canMove = Valid.get( myClass );
IMovableHandler canMove = this.Valid.get( myClass );
if ( canMove == null )
canMove = testClass( myClass, te );
canMove = this.testClass( myClass, te );
if ( canMove != nullHandler )
if ( canMove != this.nullHandler )
{
if ( te instanceof IMovableTile )
((IMovableTile) te).prepareToMove();
@@ -126,39 +126,39 @@ public class MovableTileRegistry implements IMovableRegistry
"Someone tried to make all tiles movable, this is a clear violation of the purpose of the white list." ) );
}
test.add( c );
this.test.add( c );
}
@Override
public void addHandler(IMovableHandler han)
{
handlers.add( han );
this.handlers.add( han );
}
@Override
public IMovableHandler getHandler(TileEntity te)
{
Class myClass = te.getClass();
IMovableHandler h = Valid.get( myClass );
return h == null ? dsh : h;
IMovableHandler h = this.Valid.get( myClass );
return h == null ? this.dsh : h;
}
@Override
public IMovableHandler getDefaultHandler()
{
return dsh;
return this.dsh;
}
@Override
public void blacklistBlock(Block blk)
{
blacklisted.add( blk );
this.blacklisted.add( blk );
}
@Override
public boolean isBlacklisted(Block blk)
{
return blacklisted.contains( blk );
return this.blacklisted.contains( blk );
}
}
@@ -54,24 +54,24 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
/**
* light!
*/
addNewAttunement( new ItemStack( Blocks.torch ), TunnelType.LIGHT );
addNewAttunement( new ItemStack( Blocks.glowstone ), TunnelType.LIGHT );
this.addNewAttunement( new ItemStack( Blocks.torch ), TunnelType.LIGHT );
this.addNewAttunement( new ItemStack( Blocks.glowstone ), TunnelType.LIGHT );
/**
* attune based on most redstone base items.
*/
addNewAttunement( new ItemStack( Items.redstone ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Items.repeater ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.redstone_lamp ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.unpowered_comparator ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.powered_comparator ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.powered_repeater ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.unpowered_repeater ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.daylight_detector ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.redstone_wire ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.redstone_block ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.lever ), TunnelType.REDSTONE );
addNewAttunement( getModItem( "EnderIO", "itemRedstoneConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Items.redstone ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Items.repeater ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.redstone_lamp ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.unpowered_comparator ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.powered_comparator ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.powered_repeater ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.unpowered_repeater ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.daylight_detector ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.redstone_wire ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.redstone_block ), TunnelType.REDSTONE );
this.addNewAttunement( new ItemStack( Blocks.lever ), TunnelType.REDSTONE );
this.addNewAttunement( this.getModItem( "EnderIO", "itemRedstoneConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.REDSTONE );
/**
* attune based on lots of random item related stuff
@@ -79,37 +79,37 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
appeng.api.definitions.Blocks AEBlocks = AEApi.instance().blocks();
Parts Parts = AEApi.instance().parts();
addNewAttunement( AEBlocks.blockInterface.stack( 1 ), TunnelType.ITEM );
addNewAttunement( Parts.partInterface.stack( 1 ), TunnelType.ITEM );
addNewAttunement( Parts.partStorageBus.stack( 1 ), TunnelType.ITEM );
addNewAttunement( Parts.partImportBus.stack( 1 ), TunnelType.ITEM );
addNewAttunement( Parts.partExportBus.stack( 1 ), TunnelType.ITEM );
addNewAttunement( new ItemStack( Blocks.hopper ), TunnelType.ITEM );
addNewAttunement( new ItemStack( Blocks.chest ), TunnelType.ITEM );
addNewAttunement( new ItemStack( Blocks.trapped_chest ), TunnelType.ITEM );
addNewAttunement( getModItem( "ExtraUtilities", "extractor_base", 0 ), TunnelType.ITEM );
addNewAttunement( getModItem( "Mekanism", "PartTransmitter", 9 ), TunnelType.ITEM );
addNewAttunement( getModItem( "EnderIO", "itemItemConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.ITEM );
this.addNewAttunement( AEBlocks.blockInterface.stack( 1 ), TunnelType.ITEM );
this.addNewAttunement( Parts.partInterface.stack( 1 ), TunnelType.ITEM );
this.addNewAttunement( Parts.partStorageBus.stack( 1 ), TunnelType.ITEM );
this.addNewAttunement( Parts.partImportBus.stack( 1 ), TunnelType.ITEM );
this.addNewAttunement( Parts.partExportBus.stack( 1 ), TunnelType.ITEM );
this.addNewAttunement( new ItemStack( Blocks.hopper ), TunnelType.ITEM );
this.addNewAttunement( new ItemStack( Blocks.chest ), TunnelType.ITEM );
this.addNewAttunement( new ItemStack( Blocks.trapped_chest ), TunnelType.ITEM );
this.addNewAttunement( this.getModItem( "ExtraUtilities", "extractor_base", 0 ), TunnelType.ITEM );
this.addNewAttunement( this.getModItem( "Mekanism", "PartTransmitter", 9 ), TunnelType.ITEM );
this.addNewAttunement( this.getModItem( "EnderIO", "itemItemConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.ITEM );
/**
* attune based on lots of random item related stuff
*/
addNewAttunement( new ItemStack( Items.bucket ), TunnelType.FLUID );
addNewAttunement( new ItemStack( Items.lava_bucket ), TunnelType.FLUID );
addNewAttunement( new ItemStack( Items.milk_bucket ), TunnelType.FLUID );
addNewAttunement( new ItemStack( Items.water_bucket ), TunnelType.FLUID );
addNewAttunement( getModItem( "Mekanism", "MachineBlock2", 11 ), TunnelType.FLUID );
addNewAttunement( getModItem( "Mekanism", "PartTransmitter", 4 ), TunnelType.FLUID );
addNewAttunement( getModItem( "ExtraUtilities", "extractor_base", 6 ), TunnelType.FLUID );
addNewAttunement( getModItem( "ExtraUtilities", "drum", OreDictionary.WILDCARD_VALUE ), TunnelType.FLUID );
addNewAttunement( getModItem( "EnderIO", "itemLiquidConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.FLUID );
this.addNewAttunement( new ItemStack( Items.bucket ), TunnelType.FLUID );
this.addNewAttunement( new ItemStack( Items.lava_bucket ), TunnelType.FLUID );
this.addNewAttunement( new ItemStack( Items.milk_bucket ), TunnelType.FLUID );
this.addNewAttunement( new ItemStack( Items.water_bucket ), TunnelType.FLUID );
this.addNewAttunement( this.getModItem( "Mekanism", "MachineBlock2", 11 ), TunnelType.FLUID );
this.addNewAttunement( this.getModItem( "Mekanism", "PartTransmitter", 4 ), TunnelType.FLUID );
this.addNewAttunement( this.getModItem( "ExtraUtilities", "extractor_base", 6 ), TunnelType.FLUID );
this.addNewAttunement( this.getModItem( "ExtraUtilities", "drum", OreDictionary.WILDCARD_VALUE ), TunnelType.FLUID );
this.addNewAttunement( this.getModItem( "EnderIO", "itemLiquidConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.FLUID );
for (AEColor c : AEColor.values())
{
addNewAttunement( Parts.partCableGlass.stack( c, 1 ), TunnelType.ME );
addNewAttunement( Parts.partCableCovered.stack( c, 1 ), TunnelType.ME );
addNewAttunement( Parts.partCableSmart.stack( c, 1 ), TunnelType.ME );
addNewAttunement( Parts.partCableDense.stack( c, 1 ), TunnelType.ME );
this.addNewAttunement( Parts.partCableGlass.stack( c, 1 ), TunnelType.ME );
this.addNewAttunement( Parts.partCableCovered.stack( c, 1 ), TunnelType.ME );
this.addNewAttunement( Parts.partCableSmart.stack( c, 1 ), TunnelType.ME );
this.addNewAttunement( Parts.partCableDense.stack( c, 1 ), TunnelType.ME );
}
}
@@ -119,7 +119,7 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
if ( type == null || trigger == null )
return;
Tunnels.put( trigger, type );
this.Tunnels.put( trigger, type );
}
@Override
@@ -130,13 +130,13 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
if ( FluidContainerRegistry.isContainer( trigger ) )
return TunnelType.FLUID;
for (ItemStack is : Tunnels.keySet())
for (ItemStack is : this.Tunnels.keySet())
{
if ( is.getItem() == trigger.getItem() && is.getItemDamage() == OreDictionary.WILDCARD_VALUE )
return Tunnels.get( is );
return this.Tunnels.get( is );
if ( Platform.isSameItem( is, trigger ) )
return Tunnels.get( is );
return this.Tunnels.get( is );
}
}
@@ -37,13 +37,13 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
@Override
public void addNewCraftHandler(String name, Class<? extends ICraftHandler> handler)
{
handlers.put( name.toLowerCase(), handler );
this.handlers.put( name.toLowerCase(), handler );
}
@Override
public ICraftHandler getCraftHandlerFor(String name)
{
Class<? extends ICraftHandler> clz = handlers.get( name );
Class<? extends ICraftHandler> clz = this.handlers.get( name );
if ( clz == null )
return null;
try
@@ -54,7 +54,7 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
{
AELog.severe( "Error Caused when trying to construct " + clz.getName() );
AELog.error( e );
handlers.put( name, null ); // clear it..
this.handlers.put( name, null ); // clear it..
return null;
}
}
@@ -68,13 +68,13 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
@Override
public void addNewSubItemResolver(ISubItemResolver sir)
{
resolvers.add( sir );
this.resolvers.add( sir );
}
@Override
public Object resolveItem(String nameSpace, String itemName)
{
for (ISubItemResolver sir : resolvers)
for (ISubItemResolver sir : this.resolvers)
{
Object rr = null;
@@ -52,73 +52,73 @@ public class RegistryContainer implements IRegistryContainer
@Override
public IWirelessTermRegistry wireless()
{
return WirelessRegistry;
return this.WirelessRegistry;
}
@Override
public ICellRegistry cell()
{
return CellRegistry;
return this.CellRegistry;
}
@Override
public IGrinderRegistry grinder()
{
return GrinderRecipes;
return this.GrinderRecipes;
}
@Override
public ISpecialComparisonRegistry specialComparison()
{
return SpecialComparisonRegistry;
return this.SpecialComparisonRegistry;
}
@Override
public IExternalStorageRegistry externalStorage()
{
return ExternalStorageHandlers;
return this.ExternalStorageHandlers;
}
@Override
public ILocatableRegistry locatable()
{
return LocatableRegistry;
return this.LocatableRegistry;
}
@Override
public IGridCacheRegistry gridCache()
{
return GridCacheRegistry;
return this.GridCacheRegistry;
}
@Override
public IMovableRegistry movable()
{
return MovableReg;
return this.MovableReg;
}
@Override
public IP2PTunnelRegistry p2pTunnel()
{
return P2PRegistry;
return this.P2PRegistry;
}
@Override
public IMatterCannonAmmoRegistry matterCannon()
{
return matterCannonReg;
return this.matterCannonReg;
}
@Override
public IPlayerRegistry players()
{
return playerRegistry;
return this.playerRegistry;
}
@Override
public IRecipeHandlerRegistry recipes()
{
return recipeReg;
return this.recipeReg;
}
@Override
@@ -32,13 +32,13 @@ public class SpecialComparisonRegistry implements ISpecialComparisonRegistry
private final List<IItemComparisonProvider> CompRegistry;
public SpecialComparisonRegistry() {
CompRegistry = new ArrayList<IItemComparisonProvider>();
this.CompRegistry = new ArrayList<IItemComparisonProvider>();
}
@Override
public IItemComparison getSpecialComparison(ItemStack stack)
{
for (IItemComparisonProvider i : CompRegistry)
for (IItemComparisonProvider i : this.CompRegistry)
{
IItemComparison comp = i.getComparison( stack );
if ( comp != null )
@@ -53,7 +53,7 @@ public class SpecialComparisonRegistry implements ISpecialComparisonRegistry
@Override
public void addComparisonProvider(IItemComparisonProvider prov)
{
CompRegistry.add( prov );
this.CompRegistry.add( prov );
}
}
@@ -24,8 +24,8 @@ public class WirelessRangeResult
{
public WirelessRangeResult(TileEntity t, float d) {
dist = d;
te = t;
this.dist = d;
this.te = t;
}
final public float dist;
@@ -37,20 +37,20 @@ public class WirelessRegistry implements IWirelessTermRegistry
final List<IWirelessTermHandler> handlers;
public WirelessRegistry() {
handlers = new ArrayList<IWirelessTermHandler>();
this.handlers = new ArrayList<IWirelessTermHandler>();
}
@Override
public void registerWirelessHandler(IWirelessTermHandler handler)
{
if ( handler != null )
handlers.add( handler );
this.handlers.add( handler );
}
@Override
public boolean isWirelessTerminal(ItemStack is)
{
for (IWirelessTermHandler h : handlers)
for (IWirelessTermHandler h : this.handlers)
{
if ( h.canHandle( is ) )
return true;
@@ -61,7 +61,7 @@ public class WirelessRegistry implements IWirelessTermRegistry
@Override
public IWirelessTermHandler getWirelessTerminalHandler(ItemStack is)
{
for (IWirelessTermHandler h : handlers)
for (IWirelessTermHandler h : this.handlers)
{
if ( h.canHandle( is ) )
return h;
@@ -75,7 +75,7 @@ public class WirelessRegistry implements IWirelessTermRegistry
if ( Platform.isClient() )
return;
IWirelessTermHandler handler = getWirelessTerminalHandler( item );
IWirelessTermHandler handler = this.getWirelessTerminalHandler( item );
if ( handler == null )
{
player.addChatMessage( new ChatComponentText( "Item is not a wireless terminal." ) );
@@ -42,11 +42,11 @@ public class WorldGenRegistry implements IWorldGen
private WorldGenRegistry() {
types = new TypeSet[WorldGenType.values().length];
this.types = new TypeSet[WorldGenType.values().length];
for (WorldGenType type : WorldGenType.values())
{
types[type.ordinal()] = new TypeSet();
this.types[type.ordinal()] = new TypeSet();
}
}
@@ -60,9 +60,9 @@ public class WorldGenRegistry implements IWorldGen
if ( w == null )
throw new IllegalArgumentException( "Bad Provider Passed" );
boolean isBadProvider = types[type.ordinal()].badProviders.contains( w.provider.getClass() );
boolean isBadDimension = types[type.ordinal()].badDimensions.contains( w.provider.dimensionId );
boolean isGoodDimension = types[type.ordinal()].enabledDimensions.contains( w.provider.dimensionId );
boolean isBadProvider = this.types[type.ordinal()].badProviders.contains( w.provider.getClass() );
boolean isBadDimension = this.types[type.ordinal()].badDimensions.contains( w.provider.dimensionId );
boolean isGoodDimension = this.types[type.ordinal()].enabledDimensions.contains( w.provider.dimensionId );
if ( isBadProvider || isBadDimension )
{
@@ -86,7 +86,7 @@ public class WorldGenRegistry implements IWorldGen
if ( provider == null )
throw new IllegalArgumentException( "Bad Provider Passed" );
types[type.ordinal()].badProviders.add( provider );
this.types[type.ordinal()].badProviders.add( provider );
}
@Override
@@ -97,7 +97,7 @@ public class WorldGenRegistry implements IWorldGen
throw new IllegalArgumentException( "Bad Type Passed" );
}
types[type.ordinal()].badDimensions.add( dimensionID );
this.types[type.ordinal()].badDimensions.add( dimensionID );
}
@Override
@@ -106,7 +106,7 @@ public class WorldGenRegistry implements IWorldGen
if ( type == null )
throw new IllegalArgumentException( "Bad Type Passed" );
types[type.ordinal()].enabledDimensions.add( dimensionID );
this.types[type.ordinal()].enabledDimensions.add( dimensionID );
}
}
@@ -36,106 +36,106 @@ public class AppEngGrinderRecipe implements IGrinderEntry
private int energy;
public AppEngGrinderRecipe(ItemStack a, ItemStack b, int cost) {
in = a;
out = b;
energy = cost;
this.in = a;
this.out = b;
this.energy = cost;
}
public AppEngGrinderRecipe(ItemStack a, ItemStack b, ItemStack c, float chance, int cost) {
in = a;
out = b;
this.in = a;
this.out = b;
optionalOutput = c;
optionalChance = chance;
this.optionalOutput = c;
this.optionalChance = chance;
energy = cost;
this.energy = cost;
}
public AppEngGrinderRecipe(ItemStack a, ItemStack b, ItemStack c, ItemStack d, float chance, float chance2, int cost) {
in = a;
out = b;
this.in = a;
this.out = b;
optionalOutput = c;
optionalChance = chance;
this.optionalOutput = c;
this.optionalChance = chance;
optionalOutput2 = d;
optionalChance2 = chance2;
this.optionalOutput2 = d;
this.optionalChance2 = chance2;
energy = cost;
this.energy = cost;
}
@Override
public ItemStack getInput()
{
return in;
return this.in;
}
@Override
public void setInput(ItemStack i)
{
in = i.copy();
this.in = i.copy();
}
@Override
public ItemStack getOutput()
{
return out;
return this.out;
}
@Override
public void setOutput(ItemStack o)
{
out = o.copy();
this.out = o.copy();
}
@Override
public int getEnergyCost()
{
return energy;
return this.energy;
}
@Override
public void setEnergyCost(int c)
{
energy = c;
this.energy = c;
}
@Override
public ItemStack getOptionalOutput()
{
return optionalOutput;
return this.optionalOutput;
}
@Override
public void setOptionalOutput(ItemStack output, float chance)
{
optionalOutput = output.copy();
optionalChance = chance;
this.optionalOutput = output.copy();
this.optionalChance = chance;
}
@Override
public float getOptionalChance()
{
return optionalChance;
return this.optionalChance;
}
@Override
public ItemStack getSecondOptionalOutput()
{
return optionalOutput2;
return this.optionalOutput2;
}
@Override
public void setSecondOptionalOutput(ItemStack output, float chance)
{
optionalChance2 = chance;
optionalOutput2 = output.copy();
this.optionalChance2 = chance;
this.optionalOutput2 = output.copy();
}
@Override
public float getSecondOptionalChance()
{
return optionalChance2;
return this.optionalChance2;
}
}