Always use qualified access for fields and methods

This commit is contained in:
yueh
2017-07-20 21:27:22 +02:00
parent f9cad0758d
commit 15582fd1df
211 changed files with 1086 additions and 1086 deletions
+39 -39
View File
@@ -566,82 +566,82 @@ public final class AEConfig extends Configuration implements IConfigurableObject
// Getters
public boolean isRemoveCrashingItemsOnLoad()
{
return removeCrashingItemsOnLoad;
return this.removeCrashingItemsOnLoad;
}
public int getFormationPlaneEntityLimit()
{
return formationPlaneEntityLimit;
return this.formationPlaneEntityLimit;
}
public boolean isEnableEffects()
{
return enableEffects;
return this.enableEffects;
}
public boolean isUseLargeFonts()
{
return useLargeFonts;
return this.useLargeFonts;
}
public boolean isUseColoredCraftingStatus()
{
return useColoredCraftingStatus;
return this.useColoredCraftingStatus;
}
public boolean isDisableColoredCableRecipesInJEI()
{
return disableColoredCableRecipesInJEI;
return this.disableColoredCableRecipesInJEI;
}
public int getCraftingCalculationTimePerTick()
{
return craftingCalculationTimePerTick;
return this.craftingCalculationTimePerTick;
}
public PowerUnits getSelectedPowerUnit()
{
return selectedPowerUnit;
return this.selectedPowerUnit;
}
public int[] getCraftByStacks()
{
return craftByStacks;
return this.craftByStacks;
}
public int[] getPriorityByStacks()
{
return priorityByStacks;
return this.priorityByStacks;
}
public int[] getLevelByStacks()
{
return levelByStacks;
return this.levelByStacks;
}
public int getStorageBiomeID()
{
return storageBiomeID;
return this.storageBiomeID;
}
public int getStorageProviderID()
{
return storageProviderID;
return this.storageProviderID;
}
public double getSpatialPowerExponent()
{
return spatialPowerExponent;
return this.spatialPowerExponent;
}
public double getSpatialPowerMultiplier()
{
return spatialPowerMultiplier;
return this.spatialPowerMultiplier;
}
public String[] getGrinderOres()
{
return grinderOres;
return this.grinderOres;
}
public Set<String> getGrinderBlackList()
@@ -651,117 +651,117 @@ public final class AEConfig extends Configuration implements IConfigurableObject
public double getOreDoublePercentage()
{
return oreDoublePercentage;
return this.oreDoublePercentage;
}
public int getWirelessTerminalBattery()
{
return wirelessTerminalBattery;
return this.wirelessTerminalBattery;
}
public int getEntropyManipulatorBattery()
{
return entropyManipulatorBattery;
return this.entropyManipulatorBattery;
}
public int getMatterCannonBattery()
{
return matterCannonBattery;
return this.matterCannonBattery;
}
public int getPortableCellBattery()
{
return portableCellBattery;
return this.portableCellBattery;
}
public int getColorApplicatorBattery()
{
return colorApplicatorBattery;
return this.colorApplicatorBattery;
}
public int getChargedStaffBattery()
{
return chargedStaffBattery;
return this.chargedStaffBattery;
}
public float getSpawnChargedChance()
{
return spawnChargedChance;
return this.spawnChargedChance;
}
public int getQuartzOresPerCluster()
{
return quartzOresPerCluster;
return this.quartzOresPerCluster;
}
public int getQuartzOresClusterAmount()
{
return quartzOresClusterAmount;
return this.quartzOresClusterAmount;
}
public int getChargedChange()
{
return chargedChange;
return this.chargedChange;
}
public int getMinMeteoriteDistance()
{
return minMeteoriteDistance;
return this.minMeteoriteDistance;
}
public int getMinMeteoriteDistanceSq()
{
return minMeteoriteDistanceSq;
return this.minMeteoriteDistanceSq;
}
public double getMeteoriteClusterChance()
{
return meteoriteClusterChance;
return this.meteoriteClusterChance;
}
public int getMeteoriteMaximumSpawnHeight()
{
return meteoriteMaximumSpawnHeight;
return this.meteoriteMaximumSpawnHeight;
}
public int[] getMeteoriteDimensionWhitelist()
{
return meteoriteDimensionWhitelist;
return this.meteoriteDimensionWhitelist;
}
public double getWirelessBaseCost()
{
return wirelessBaseCost;
return this.wirelessBaseCost;
}
public double getWirelessCostMultiplier()
{
return wirelessCostMultiplier;
return this.wirelessCostMultiplier;
}
public double getWirelessTerminalDrainMultiplier()
{
return wirelessTerminalDrainMultiplier;
return this.wirelessTerminalDrainMultiplier;
}
public double getWirelessBaseRange()
{
return wirelessBaseRange;
return this.wirelessBaseRange;
}
public double getWirelessBoosterRangeMultiplier()
{
return wirelessBoosterRangeMultiplier;
return this.wirelessBoosterRangeMultiplier;
}
public double getWirelessBoosterExp()
{
return wirelessBoosterExp;
return this.wirelessBoosterExp;
}
public double getWirelessHighWirelessCount()
{
return wirelessHighWirelessCount;
return this.wirelessHighWirelessCount;
}
// Setters keep visibility as low as possible.
@@ -43,10 +43,10 @@ public final class ApiDefinitions implements IDefinitions
public ApiDefinitions( final PartModels partModels )
{
this.blocks = new ApiBlocks( registry, partModels );
this.items = new ApiItems( registry );
this.materials = new ApiMaterials( registry );
this.parts = new ApiParts( registry, partModels );
this.blocks = new ApiBlocks( this.registry, partModels );
this.items = new ApiItems( this.registry );
this.materials = new ApiMaterials( this.registry );
this.parts = new ApiParts( this.registry, partModels );
}
//
// public void addBlocks( final PartModels partModels )
@@ -61,7 +61,7 @@ public final class ApiDefinitions implements IDefinitions
public FeatureFactory getRegistry()
{
return registry;
return this.registry;
}
@Override
+2 -2
View File
@@ -136,7 +136,7 @@ public final class AppEng
{
AppEng.proxy.missingCoreMod();
}
MinecraftForge.EVENT_BUS.register( registration );
MinecraftForge.EVENT_BUS.register( this.registration );
final Stopwatch watch = Stopwatch.createStarted();
this.configDirectory = new File( event.getModConfigurationDirectory().getPath(), "AppliedEnergistics2" );
@@ -155,7 +155,7 @@ public final class AppEng
this.customRecipeConfig = new CustomRecipeForgeConfiguration( recipeConfiguration );
this.exportConfig = new ForgeExportConfig( recipeConfiguration );
this.registration.setRecipeInformation( recipeDirectory, customRecipeConfig );
this.registration.setRecipeInformation( this.recipeDirectory, this.customRecipeConfig );
AELog.info( "Pre Initialization ( started )" );
+4 -4
View File
@@ -175,7 +175,7 @@ public final class Registration
public DimensionType getStorageDimensionType()
{
return storageDimensionType;
return this.storageDimensionType;
}
void preInitialize( final FMLPreInitializationEvent event )
@@ -241,7 +241,7 @@ public final class Registration
if( config.getStorageProviderID() != -1 )
{
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
this.storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
}
if( config.getStorageProviderID() == -1 && force )
@@ -259,7 +259,7 @@ public final class Registration
config.setStorageProviderID( config.getStorageProviderID() - 1 );
}
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
this.storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
config.save();
}
@@ -418,7 +418,7 @@ public final class Registration
// Perform ore camouflage!
ItemMaterial.instance.makeUnique();
final Runnable recipeLoader = new RecipeLoader( recipeDirectory, customRecipeConfig, this.recipeHandler );
final Runnable recipeLoader = new RecipeLoader( this.recipeDirectory, this.customRecipeConfig, this.recipeHandler );
recipeLoader.run();
this.recipeHandler.injectRecipes();
+9 -9
View File
@@ -70,7 +70,7 @@ public class ApiPart implements IPartHelper
@Override
public Class<? extends AEBaseTile> load( CacheKey key ) throws Exception
{
return generateCombinedClass( key );
return ApiPart.this.generateCombinedClass( key );
}
} );
@@ -103,7 +103,7 @@ public class ApiPart implements IPartHelper
return baseClass;
}
return cache.getUnchecked( new CacheKey( baseClass, this.desc ) );
return this.cache.getUnchecked( new CacheKey( baseClass, this.desc ) );
}
private Class<? extends AEBaseTile> generateCombinedClass( CacheKey cacheKey )
@@ -117,7 +117,7 @@ public class ApiPart implements IPartHelper
if( !remainingInterfaces.isEmpty() )
{
CacheKey parentKey = new CacheKey( cacheKey.getBaseClass(), remainingInterfaces );
parentClass = cache.getUnchecked( parentKey );
parentClass = this.cache.getUnchecked( parentKey );
}
else
{
@@ -370,12 +370,12 @@ public class ApiPart implements IPartHelper
private Class<? extends AEBaseTile> getBaseClass()
{
return baseClass;
return this.baseClass;
}
private List<String> getInterfaces()
{
return interfaces;
return this.interfaces;
}
@Override
@@ -385,21 +385,21 @@ public class ApiPart implements IPartHelper
{
return true;
}
if( o == null || getClass() != o.getClass() )
if( o == null || this.getClass() != o.getClass() )
{
return false;
}
CacheKey cacheKey = (CacheKey) o;
return baseClass.equals( cacheKey.baseClass ) && interfaces.equals( cacheKey.interfaces );
return this.baseClass.equals( cacheKey.baseClass ) && this.interfaces.equals( cacheKey.interfaces );
}
@Override
public int hashCode()
{
int result = baseClass.hashCode();
result = 31 * result + interfaces.hashCode();
int result = this.baseClass.hashCode();
result = 31 * result + this.interfaces.hashCode();
return result;
}
}
@@ -204,17 +204,17 @@ public enum AEFeature
public String key()
{
return key;
return this.key;
}
public String category()
{
return category;
return this.category;
}
public boolean isEnabled()
{
return enabled;
return this.enabled;
}
private enum Constants
@@ -65,6 +65,6 @@ public class BlockDefinition extends ItemDefinition implements IBlockDefinition
@Override
public final boolean isSameAs( final IBlockAccess world, final BlockPos pos )
{
return block.isPresent() && world.getBlockState( pos ).getBlock() == this.block.get();
return this.block.isPresent() && world.getBlockState( pos ).getBlock() == this.block.get();
}
}
@@ -73,7 +73,7 @@ public class ItemDefinition implements IItemDefinition
@Override
public final boolean isSameAs( final ItemStack comparableStack )
{
return isEnabled() && Platform.itemComparisons().isEqualItemType( comparableStack, this.maybeStack( 1 ).get() );
return this.isEnabled() && Platform.itemComparisons().isEqualItemType( comparableStack, this.maybeStack( 1 ).get() );
}
}
@@ -270,6 +270,6 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
private void addNewAttunement( final IItemDefinition definition, final TunnelType type )
{
definition.maybeStack( 1 ).ifPresent( definitionStack -> addNewAttunement( definitionStack, type ) );
definition.maybeStack( 1 ).ifPresent( definitionStack -> this.addNewAttunement( definitionStack, type ) );
}
}
@@ -38,17 +38,17 @@ public class PartModels implements IPartModels
@Override
public void registerModels( Collection<ResourceLocation> partModels )
{
if( initialized )
if( this.initialized )
{
throw new IllegalStateException( "Cannot register models after the pre-initialization phase!" );
}
models.addAll( partModels );
this.models.addAll( partModels );
}
public Set<ResourceLocation> getModels()
{
return models;
return this.models;
}
public void setInitialized( boolean initialized )
@@ -144,7 +144,7 @@ public class RegistryContainer implements IRegistryContainer
@Override
public IPartModels partModels()
{
return partModels;
return this.partModels;
}
}
@@ -353,8 +353,8 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
{
final int prime = 31;
int result = 1;
result = prime * result + damage;
result = prime * result + ( ( item == null ) ? 0 : item.hashCode() );
result = prime * result + this.damage;
result = prime * result + ( ( this.item == null ) ? 0 : this.item.hashCode() );
return result;
}
@@ -365,26 +365,26 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
{
return true;
}
if( obj == null || getClass() != obj.getClass() )
if( obj == null || this.getClass() != obj.getClass() )
{
return false;
}
CacheKey other = (CacheKey) obj;
if( damage != other.damage )
if( this.damage != other.damage )
{
return false;
}
if( item == null )
if( this.item == null )
{
if( other.item != null )
{
return false;
}
}
else if( item != other.item )
else if( this.item != other.item )
{
return false;
}
@@ -93,8 +93,8 @@ public final class InscriberRegistry implements IInscriberRegistry
this.recipes.add( recipe );
recipe.getTopOptional().ifPresent( optionals::add );
recipe.getBottomOptional().ifPresent( optionals::add );
recipe.getTopOptional().ifPresent( this.optionals::add );
recipe.getBottomOptional().ifPresent( this.optionals::add );
this.inputs.addAll( recipe.getInputs() );
}
@@ -114,7 +114,7 @@ public abstract class AppEngPacket implements Packet
public ByteArrayInputStream getPacketByteArray( ByteBuf stream )
{
return getPacketByteArray( stream, 0, stream.readableBytes() );
return this.getPacketByteArray( stream, 0, stream.readableBytes() );
}
public void setCallParam( final PacketCallState call )
@@ -77,7 +77,7 @@ public class PacketPartPlacement extends AppEngPacket
final EntityPlayerMP sender = (EntityPlayerMP) player;
AppEng.proxy.updateRenderMode( sender );
PartPlacement.setEyeHeight( this.eyeHeight );
PartPlacement.place( sender.getHeldItem( hand ), new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.face], sender, hand, sender.world,
PartPlacement.place( sender.getHeldItem( this.hand ), new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.face], sender, this.hand, sender.world,
PartPlacement.PlaceType.INTERACT_FIRST_PASS, 0 );
AppEng.proxy.updateRenderMode( null );
}