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
+7 -7
View File
@@ -55,7 +55,7 @@ public class AETrading implements IVillageTradeHandler
From.stackSize = 1 + (Math.abs( rand.nextInt() ) % (1 + conversion_Variance));
To.stackSize = 1;
addToList( list, From, To );
this.addToList( list, From, To );
}
private void addMerchant(MerchantRecipeList list, ItemStack item, int emera, Random rand, int greed)
@@ -80,7 +80,7 @@ public class AETrading implements IVillageTradeHandler
To.stackSize -= To.stackSize;
}
addToList( list, From, To );
this.addToList( list, From, To );
// Buy
ItemStack reverseTo = From.copy();
@@ -88,17 +88,17 @@ public class AETrading implements IVillageTradeHandler
reverseFrom.stackSize = (int) (reverseFrom.stackSize * (rand.nextFloat() * 3.0f + 1.0f));
addToList( list, reverseFrom, reverseTo );
this.addToList( list, reverseFrom, reverseTo );
}
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random)
{
addMerchant( recipeList, AEApi.instance().materials().materialSilicon.stack( 1 ), 1, random, 2 );
addMerchant( recipeList, AEApi.instance().materials().materialCertusQuartzCrystal.stack( 1 ), 2, random, 4 );
addMerchant( recipeList, AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ), 1, random, 3 );
this.addMerchant( recipeList, AEApi.instance().materials().materialSilicon.stack( 1 ), 1, random, 2 );
this.addMerchant( recipeList, AEApi.instance().materials().materialCertusQuartzCrystal.stack( 1 ), 2, random, 4 );
this.addMerchant( recipeList, AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ), 1, random, 3 );
addTrade( recipeList, AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ),
this.addTrade( recipeList, AEApi.instance().materials().materialCertusQuartzDust.stack( 1 ),
AEApi.instance().materials().materialCertusQuartzCrystal.stack( 1 ), random, 2 );
}
+13 -13
View File
@@ -39,16 +39,16 @@ public class CompassManager
public CompassRequest(long attunement, int x, int y, int z) {
this.attunement = attunement;
cx = x >> 4;
cdy = y >> 5;
cz = z >> 4;
hash = ((Integer) cx).hashCode() ^ ((Integer) cdy).hashCode() ^ ((Integer) cz).hashCode() ^ ((Long) attunement).hashCode();
this.cx = x >> 4;
this.cdy = y >> 5;
this.cz = z >> 4;
this.hash = ((Integer) this.cx).hashCode() ^ ((Integer) this.cdy).hashCode() ^ ((Integer) this.cz).hashCode() ^ ((Long) attunement).hashCode();
}
@Override
public int hashCode()
{
return hash;
return this.hash;
}
@Override
@@ -56,10 +56,10 @@ public class CompassManager
{
if ( obj == null )
return false;
if ( getClass() != obj.getClass() )
if ( this.getClass() != obj.getClass() )
return false;
CompassRequest other = (CompassRequest) obj;
return attunement == other.attunement && cx == other.cx && cdy == other.cdy && cz == other.cz;
return this.attunement == other.attunement && this.cx == other.cx && this.cdy == other.cdy && this.cz == other.cz;
}
}
@@ -69,14 +69,14 @@ public class CompassManager
public void postResult(long attunement, int x, int y, int z, CompassResult result)
{
CompassRequest r = new CompassRequest( attunement, x, y, z );
requests.put( r, result );
this.requests.put( r, result );
}
public CompassResult getCompassDirection(long attunement, int x, int y, int z)
{
long now = System.currentTimeMillis();
Iterator<CompassResult> i = requests.values().iterator();
Iterator<CompassResult> i = this.requests.values().iterator();
while (i.hasNext())
{
CompassResult res = i.next();
@@ -86,20 +86,20 @@ public class CompassManager
}
CompassRequest r = new CompassRequest( attunement, x, y, z );
CompassResult res = requests.get( r );
CompassResult res = this.requests.get( r );
if ( res == null )
{
res = new CompassResult( false, true, 0 );
requests.put( r, res );
requestUpdate( r );
this.requests.put( r, res );
this.requestUpdate( r );
}
else if ( now - res.time > 1000 * 3 )
{
if ( !res.requested )
{
res.requested = true;
requestUpdate( r );
this.requestUpdate( r );
}
}
@@ -46,9 +46,9 @@ final public class MeteoriteWorldGen implements IWorldGenerator
public void calculatedDirection(boolean hasResult, boolean spin, double radians, double dist)
{
if ( hasResult )
distance = dist;
this.distance = dist;
else
distance = Double.MAX_VALUE;
this.distance = Double.MAX_VALUE;
}
}
@@ -92,27 +92,27 @@ final public class MeteoriteWorldGen implements IWorldGenerator
@Override
public Object call() throws Exception
{
int chunkX = x >> 4;
int chunkZ = z >> 4;
int chunkX = this.x >> 4;
int chunkZ = this.z >> 4;
double minSqDist = Double.MAX_VALUE;
// near by meteorites!
for (NBTTagCompound data : getNearByMeteorites( w, chunkX, chunkZ ))
for (NBTTagCompound data : MeteoriteWorldGen.this.getNearByMeteorites( this.w, chunkX, chunkZ ))
{
MeteoritePlacer mp = new MeteoritePlacer();
mp.spawnMeteorite( new MeteoritePlacer.ChunkOnly( w, chunkX, chunkZ ), data );
mp.spawnMeteorite( new MeteoritePlacer.ChunkOnly( this.w, chunkX, chunkZ ), data );
minSqDist = Math.min( minSqDist, mp.getSqDistance( x, z ) );
minSqDist = Math.min( minSqDist, mp.getSqDistance( this.x, this.z ) );
}
boolean isCluster = (minSqDist < 30 * 30) && Platform.getRandomFloat() < AEConfig.instance.meteoriteClusterChance;
if ( minSqDist > AEConfig.instance.minMeteoriteDistanceSq || isCluster )
tryMeteorite( w, depth, x, z );
MeteoriteWorldGen.this.tryMeteorite( this.w, this.depth, this.x, this.z );
WorldSettings.getInstance().setGenerated( w.provider.dimensionId, chunkX, chunkZ );
WorldSettings.getInstance().getCompass().updateArea( w, chunkX, chunkZ );
WorldSettings.getInstance().setGenerated( this.w.provider.dimensionId, chunkX, chunkZ );
WorldSettings.getInstance().getCompass().updateArea( this.w, chunkX, chunkZ );
return null;
}
@@ -43,11 +43,11 @@ final public class QuartzWorldGen implements IWorldGenerator
if ( normal != null && charged != null )
{
oreNormal = new WorldGenMinable( normal, 0, AEConfig.instance.quartzOresPerCluster, Blocks.stone );
oreCharged = new WorldGenMinable( charged, 0, AEConfig.instance.quartzOresPerCluster, Blocks.stone );
this.oreNormal = new WorldGenMinable( normal, 0, AEConfig.instance.quartzOresPerCluster, Blocks.stone );
this.oreCharged = new WorldGenMinable( charged, 0, AEConfig.instance.quartzOresPerCluster, Blocks.stone );
}
else
oreNormal = oreCharged = null;
this.oreNormal = this.oreCharged = null;
}
@Override
@@ -62,7 +62,7 @@ final public class QuartzWorldGen implements IWorldGenerator
seaLevel = w.getHeightValue( x, z );
}
if ( oreNormal == null || oreCharged == null )
if ( this.oreNormal == null || this.oreCharged == null )
return;
double oreDepthMultiplier = AEConfig.instance.quartzOresClusterAmount * seaLevel / 64;
@@ -71,7 +71,7 @@ final public class QuartzWorldGen implements IWorldGenerator
for (int x = 0; x < (r.nextBoolean() ? scale * 2 : scale) / 2; ++x)
{
boolean isCharged = r.nextFloat() > AEConfig.instance.spawnChargedChance;
WorldGenMinable whichOre = isCharged ? oreCharged : oreNormal;
WorldGenMinable whichOre = isCharged ? this.oreCharged : this.oreNormal;
if ( WorldGenRegistry.instance.isWorldGenEnabled( isCharged ? WorldGenType.ChargedCertusQuartz : WorldGenType.CertusQuartz, w ) )
{
+31 -31
View File
@@ -67,8 +67,8 @@ public class TickHandler
public void clear()
{
tiles = new LinkedList<AEBaseTile>();
networks = new NetworkList();
this.tiles = new LinkedList<AEBaseTile>();
this.networks = new NetworkList();
}
}
@@ -90,13 +90,13 @@ public class TickHandler
public PacketPaintedEntity getPacket()
{
return new PacketPaintedEntity( myEntity, myColor, ticksLeft );
return new PacketPaintedEntity( this.myEntity, this.myColor, this.ticksLeft );
}
public PlayerColor(int id, AEColor col, int ticks) {
myEntity = id;
myColor = col;
ticksLeft = ticks;
this.myEntity = id;
this.myColor = col;
this.ticksLeft = ticks;
}
}
@@ -107,8 +107,8 @@ public class TickHandler
public HashMap<Integer, PlayerColor> getPlayerColors()
{
if ( Platform.isServer() )
return srvPlayerColors;
return cliPlayerColors;
return this.srvPlayerColors;
return this.cliPlayerColors;
}
private void tickColors(HashMap<Integer, PlayerColor> playerSet)
@@ -125,20 +125,20 @@ public class TickHandler
HandlerRep getRepo()
{
if ( Platform.isServer() )
return server;
return client;
return this.server;
return this.client;
}
public void addCallable(World w, Callable c)
{
if ( w == null )
serverQueue.add( c );
this.serverQueue.add( c );
else
{
Queue<Callable> queue = callQueue.get( w );
Queue<Callable> queue = this.callQueue.get( w );
if ( queue == null )
callQueue.put( w, queue = new LinkedList<Callable>() );
this.callQueue.put( w, queue = new LinkedList<Callable>() );
queue.add( c );
}
@@ -147,29 +147,29 @@ public class TickHandler
public void addInit(AEBaseTile tile)
{
if ( Platform.isServer() ) // for no there is no reason to care about this on the client...
getRepo().tiles.add( tile );
this.getRepo().tiles.add( tile );
}
public void addNetwork(Grid grid)
{
if ( Platform.isServer() ) // for no there is no reason to care about this on the client...
getRepo().networks.add( grid );
this.getRepo().networks.add( grid );
}
public void removeNetwork(Grid grid)
{
if ( Platform.isServer() ) // for no there is no reason to care about this on the client...
getRepo().networks.remove( grid );
this.getRepo().networks.remove( grid );
}
public Iterable<Grid> getGridList()
{
return getRepo().networks;
return this.getRepo().networks;
}
public void shutdown()
{
getRepo().clear();
this.getRepo().clear();
}
@SubscribeEvent
@@ -179,7 +179,7 @@ public class TickHandler
{
LinkedList<IGridNode> toDestroy = new LinkedList<IGridNode>();
for (Grid g : getRepo().networks)
for (Grid g : this.getRepo().networks)
{
for (IGridNode n : g.getNodes())
{
@@ -213,12 +213,12 @@ public class TickHandler
if ( ev.type == Type.CLIENT && ev.phase == Phase.START )
{
tickColors( cliPlayerColors );
this.tickColors( this.cliPlayerColors );
EntityFloatingItem.ageStatic = (EntityFloatingItem.ageStatic + 1) % 60000;
CableRenderMode currentMode = AEApi.instance().partHelper().getCableRenderMode();
if ( currentMode != crm )
if ( currentMode != this.crm )
{
crm = currentMode;
this.crm = currentMode;
CommonHelper.proxy.triggerUpdates();
}
}
@@ -226,9 +226,9 @@ public class TickHandler
if ( ev.type == Type.WORLD && ev.phase == Phase.END )
{
WorldTickEvent wte = (WorldTickEvent) ev;
synchronized (craftingJobs)
synchronized (this.craftingJobs)
{
Collection<CraftingJob> jobSet = craftingJobs.get( wte.world );
Collection<CraftingJob> jobSet = this.craftingJobs.get( wte.world );
if ( !jobSet.isEmpty() )
{
int simTime = Math.max( 1, AEConfig.instance.craftingCalculationTimePerTick / jobSet.size() );
@@ -246,9 +246,9 @@ public class TickHandler
// for no there is no reason to care about this on the client...
else if ( ev.type == Type.SERVER && ev.phase == Phase.END )
{
tickColors( srvPlayerColors );
this.tickColors( this.srvPlayerColors );
// ready tiles.
HandlerRep repo = getRepo();
HandlerRep repo = this.getRepo();
while (!repo.tiles.isEmpty())
{
AEBaseTile bt = repo.tiles.poll();
@@ -257,17 +257,17 @@ public class TickHandler
}
// tick networks.
for (Grid g : getRepo().networks)
for (Grid g : this.getRepo().networks)
g.update();
// cross world queue.
processQueue( serverQueue );
this.processQueue( this.serverQueue );
}
// world synced queue(s)
if ( ev.type == Type.WORLD && ev.phase == Phase.START )
{
processQueue( callQueue.get( ((WorldTickEvent) ev).world ) );
this.processQueue( this.callQueue.get( ((WorldTickEvent) ev).world ) );
}
}
@@ -303,9 +303,9 @@ public class TickHandler
public void registerCraftingSimulation(World world, CraftingJob craftingJob)
{
synchronized (craftingJobs)
synchronized (this.craftingJobs)
{
craftingJobs.put( world, craftingJob );
this.craftingJobs.put( world, craftingJob );
}
}