Always use qualified access for fields and methods
This commit is contained in:
@@ -70,19 +70,19 @@ public class IC2PowerSinkAdapter extends BasicSink implements IC2PowerSink
|
||||
@Override
|
||||
public double getDemandedEnergy()
|
||||
{
|
||||
return powerSink.getExternalPowerDemand( PowerUnits.EU, Double.MAX_VALUE );
|
||||
return this.powerSink.getExternalPowerDemand( PowerUnits.EU, Double.MAX_VALUE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public double injectEnergy( EnumFacing directionFrom, double amount, double voltage )
|
||||
{
|
||||
return PowerUnits.EU.convertTo( PowerUnits.AE, powerSink.injectExternalPower( PowerUnits.EU, amount ) );
|
||||
return PowerUnits.EU.convertTo( PowerUnits.AE, this.powerSink.injectExternalPower( PowerUnits.EU, amount ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptsEnergyFrom( IEnergyEmitter iEnergyEmitter, EnumFacing side )
|
||||
{
|
||||
return validFaces.contains( side );
|
||||
return this.validFaces.contains( side );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,6 +61,6 @@ public class IC2RecipeInput implements IRecipeInput
|
||||
@Override
|
||||
public List<ItemStack> getInputs()
|
||||
{
|
||||
return Collections.unmodifiableList( Collections.singletonList( itemstack ) );
|
||||
return Collections.unmodifiableList( Collections.singletonList( this.itemstack ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class CondenserCategory extends BlankRecipeCategory<CondenserOutputWrapper>
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
return localizedName;
|
||||
return this.localizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,15 +101,15 @@ class CondenserCategory extends BlankRecipeCategory<CondenserOutputWrapper>
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
return background;
|
||||
return this.background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras( Minecraft minecraft )
|
||||
{
|
||||
progress.draw( minecraft );
|
||||
iconTrash.draw( minecraft );
|
||||
iconButton.draw( minecraft );
|
||||
this.progress.draw( minecraft );
|
||||
this.iconTrash.draw( minecraft );
|
||||
this.iconButton.draw( minecraft );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,7 +120,7 @@ class CondenserCategory extends BlankRecipeCategory<CondenserOutputWrapper>
|
||||
|
||||
// Get all storage cells and cycle them through a fake input slot
|
||||
itemStacks.init( 1, true, 50, 0 );
|
||||
itemStacks.set( 1, getViableStorageComponents( recipeWrapper ) );
|
||||
itemStacks.set( 1, this.getViableStorageComponents( recipeWrapper ) );
|
||||
|
||||
// This only sets the output
|
||||
itemStacks.set( ingredients );
|
||||
@@ -131,10 +131,10 @@ class CondenserCategory extends BlankRecipeCategory<CondenserOutputWrapper>
|
||||
CondenserOutput condenserOutput = recipeWrapper.getCondenserOutput();
|
||||
IMaterials materials = AEApi.instance().definitions().materials();
|
||||
List<ItemStack> viableComponents = new ArrayList<>();
|
||||
materials.cell1kPart().maybeStack( 1 ).ifPresent( itemStack -> addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
materials.cell4kPart().maybeStack( 1 ).ifPresent( itemStack -> addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
materials.cell16kPart().maybeStack( 1 ).ifPresent( itemStack -> addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
materials.cell64kPart().maybeStack( 1 ).ifPresent( itemStack -> addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
materials.cell1kPart().maybeStack( 1 ).ifPresent( itemStack -> this.addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
materials.cell4kPart().maybeStack( 1 ).ifPresent( itemStack -> this.addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
materials.cell16kPart().maybeStack( 1 ).ifPresent( itemStack -> this.addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
materials.cell64kPart().maybeStack( 1 ).ifPresent( itemStack -> this.addViableComponent( condenserOutput, viableComponents, itemStack ) );
|
||||
return viableComponents;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ class CondenserOutputHandler implements IRecipeHandler<CondenserOutput>
|
||||
switch( recipe )
|
||||
{
|
||||
case MATTER_BALLS:
|
||||
return new CondenserOutputWrapper( recipe, matterBall, iconButtonMatterBall );
|
||||
return new CondenserOutputWrapper( recipe, this.matterBall, this.iconButtonMatterBall );
|
||||
case SINGULARITY:
|
||||
return new CondenserOutputWrapper( recipe, singularity, iconButtonSingularity );
|
||||
return new CondenserOutputWrapper( recipe, this.singularity, this.iconButtonSingularity );
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -81,9 +81,9 @@ class CondenserOutputHandler implements IRecipeHandler<CondenserOutput>
|
||||
switch( recipe )
|
||||
{
|
||||
case MATTER_BALLS:
|
||||
return matterBall != null;
|
||||
return this.matterBall != null;
|
||||
case SINGULARITY:
|
||||
return singularity != null;
|
||||
return this.singularity != null;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,23 +59,23 @@ class CondenserOutputWrapper extends BlankRecipeWrapper
|
||||
@Override
|
||||
public void getIngredients( IIngredients ingredients )
|
||||
{
|
||||
ingredients.setOutput( ItemStack.class, outputItem );
|
||||
ingredients.setOutput( ItemStack.class, this.outputItem );
|
||||
}
|
||||
|
||||
public CondenserOutput getCondenserOutput()
|
||||
{
|
||||
return condenserOutput;
|
||||
return this.condenserOutput;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings( int mouseX, int mouseY )
|
||||
{
|
||||
if( buttonHoverChecker.checkHover( mouseX, mouseY ) )
|
||||
if( this.buttonHoverChecker.checkHover( mouseX, mouseY ) )
|
||||
{
|
||||
String key;
|
||||
|
||||
switch( condenserOutput )
|
||||
switch( this.condenserOutput )
|
||||
{
|
||||
case MATTER_BALLS:
|
||||
key = "gui.tooltips.appliedenergistics2.MatterBalls";
|
||||
@@ -87,7 +87,7 @@ class CondenserOutputWrapper extends BlankRecipeWrapper
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return Splitter.on( "\\n" ).splitToList( I18n.format( key, condenserOutput.requiredPower ) );
|
||||
return Splitter.on( "\\n" ).splitToList( I18n.format( key, this.condenserOutput.requiredPower ) );
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -95,6 +95,6 @@ class CondenserOutputWrapper extends BlankRecipeWrapper
|
||||
@Override
|
||||
public void drawInfo( Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY )
|
||||
{
|
||||
buttonIcon.draw( minecraft );
|
||||
this.buttonIcon.draw( minecraft );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,18 +66,18 @@ class FacadeRecipeWrapper extends BlankRecipeWrapper implements IShapedCraftingR
|
||||
List<ItemStack> input = new ArrayList<>( 9 );
|
||||
|
||||
input.add( ItemStack.EMPTY );
|
||||
input.add( cableAnchor );
|
||||
input.add( this.cableAnchor );
|
||||
input.add( ItemStack.EMPTY );
|
||||
|
||||
input.add( cableAnchor );
|
||||
input.add( textureItem );
|
||||
input.add( cableAnchor );
|
||||
input.add( this.cableAnchor );
|
||||
input.add( this.textureItem );
|
||||
input.add( this.cableAnchor );
|
||||
|
||||
input.add( ItemStack.EMPTY );
|
||||
input.add( cableAnchor );
|
||||
input.add( this.cableAnchor );
|
||||
input.add( ItemStack.EMPTY );
|
||||
|
||||
ingredients.setInputs( ItemStack.class, input );
|
||||
ingredients.setOutput( ItemStack.class, facade );
|
||||
ingredients.setOutput( ItemStack.class, this.facade );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class FacadeRegistryPlugin implements IRecipeRegistryPlugin
|
||||
// Looking up if a certain block can be used to make a facade
|
||||
ItemStack itemStack = (ItemStack) focus.getValue();
|
||||
|
||||
if( !itemFacade.createFacadeForItem( itemStack, true ).isEmpty() )
|
||||
if( !this.itemFacade.createFacadeForItem( itemStack, true ).isEmpty() )
|
||||
{
|
||||
return Collections.singletonList( VanillaRecipeCategoryUid.CRAFTING );
|
||||
}
|
||||
@@ -92,7 +92,7 @@ class FacadeRegistryPlugin implements IRecipeRegistryPlugin
|
||||
{
|
||||
ItemFacade facadeItem = (ItemFacade) itemStack.getItem();
|
||||
ItemStack textureItem = facadeItem.getTextureItem( itemStack );
|
||||
return Collections.singletonList( (T) new FacadeRecipeWrapper( textureItem, cableAnchor, itemStack ) );
|
||||
return Collections.singletonList( (T) new FacadeRecipeWrapper( textureItem, this.cableAnchor, itemStack ) );
|
||||
}
|
||||
}
|
||||
else if( focus.getMode() == IFocus.Mode.INPUT && focus.getValue() instanceof ItemStack )
|
||||
@@ -100,11 +100,11 @@ class FacadeRegistryPlugin implements IRecipeRegistryPlugin
|
||||
// Looking up if a certain block can be used to make a facade
|
||||
|
||||
ItemStack itemStack = (ItemStack) focus.getValue();
|
||||
ItemStack facade = itemFacade.createFacadeForItem( itemStack, false );
|
||||
ItemStack facade = this.itemFacade.createFacadeForItem( itemStack, false );
|
||||
|
||||
if( !facade.isEmpty() )
|
||||
{
|
||||
return Collections.singletonList( (T) new FacadeRecipeWrapper( itemStack, cableAnchor, facade ) );
|
||||
return Collections.singletonList( (T) new FacadeRecipeWrapper( itemStack, this.cableAnchor, facade ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,13 +64,13 @@ class GrinderRecipeCategory extends BlankRecipeCategory<GrinderRecipeWrapper>
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
return localizedName;
|
||||
return this.localizedName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
return background;
|
||||
return this.background;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,11 +47,11 @@ class GrinderRecipeWrapper extends BlankRecipeWrapper
|
||||
@Override
|
||||
public void getIngredients( IIngredients ingredients )
|
||||
{
|
||||
ingredients.setInput( ItemStack.class, recipe.getInput() );
|
||||
ingredients.setInput( ItemStack.class, this.recipe.getInput() );
|
||||
List<ItemStack> outputs = new ArrayList<>( 3 );
|
||||
outputs.add( recipe.getOutput() );
|
||||
recipe.getOptionalOutput().ifPresent( outputs::add );
|
||||
recipe.getSecondOptionalOutput().ifPresent( outputs::add );
|
||||
outputs.add( this.recipe.getOutput() );
|
||||
this.recipe.getOptionalOutput().ifPresent( outputs::add );
|
||||
this.recipe.getSecondOptionalOutput().ifPresent( outputs::add );
|
||||
ingredients.setOutputs( ItemStack.class, outputs );
|
||||
}
|
||||
|
||||
@@ -67,18 +67,18 @@ class GrinderRecipeWrapper extends BlankRecipeWrapper
|
||||
final float invScale = 1 / scale;
|
||||
GlStateManager.scale( scale, scale, 1 );
|
||||
|
||||
if( recipe.getOptionalOutput() != null )
|
||||
if( this.recipe.getOptionalOutput() != null )
|
||||
{
|
||||
String text = String.format( "%d%%", (int) ( recipe.getOptionalChance() * 100 ) );
|
||||
String text = String.format( "%d%%", (int) ( this.recipe.getOptionalChance() * 100 ) );
|
||||
float width = fr.getStringWidth( text ) * scale;
|
||||
int xScaled = (int) Math.round( ( x + ( 18 - width ) / 2 ) * invScale );
|
||||
fr.drawString( text, xScaled, (int) ( 65 * invScale ), Color.gray.getRGB() );
|
||||
x += 18;
|
||||
}
|
||||
|
||||
if( recipe.getSecondOptionalOutput() != null )
|
||||
if( this.recipe.getSecondOptionalOutput() != null )
|
||||
{
|
||||
String text = String.format( "%d%%", (int) ( recipe.getSecondOptionalChance() * 100 ) );
|
||||
String text = String.format( "%d%%", (int) ( this.recipe.getSecondOptionalChance() * 100 ) );
|
||||
float width = fr.getStringWidth( text ) * scale;
|
||||
int xScaled = (int) Math.round( ( x + ( 18 - width ) / 2 ) * invScale );
|
||||
fr.drawString( text, xScaled, (int) ( 65 * invScale ), Color.gray.getRGB() );
|
||||
|
||||
@@ -70,7 +70,7 @@ class InscriberRecipeCategory extends BlankRecipeCategory<InscriberRecipeWrapper
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
return localizedName;
|
||||
return this.localizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,7 +88,7 @@ class InscriberRecipeCategory extends BlankRecipeCategory<InscriberRecipeWrapper
|
||||
@Override
|
||||
public IDrawable getBackground()
|
||||
{
|
||||
return background;
|
||||
return this.background;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,11 +45,11 @@ class InscriberRecipeWrapper extends BlankRecipeWrapper
|
||||
public void getIngredients( IIngredients ingredients )
|
||||
{
|
||||
List<List<ItemStack>> inputSlots = new ArrayList<>( 3 );
|
||||
inputSlots.add( Collections.singletonList( recipe.getTopOptional().orElse( ItemStack.EMPTY ) ) );
|
||||
inputSlots.add( recipe.getInputs() );
|
||||
inputSlots.add( Collections.singletonList( recipe.getBottomOptional().orElse( ItemStack.EMPTY ) ) );
|
||||
inputSlots.add( Collections.singletonList( this.recipe.getTopOptional().orElse( ItemStack.EMPTY ) ) );
|
||||
inputSlots.add( this.recipe.getInputs() );
|
||||
inputSlots.add( Collections.singletonList( this.recipe.getBottomOptional().orElse( ItemStack.EMPTY ) ) );
|
||||
ingredients.setInputLists( ItemStack.class, inputSlots );
|
||||
|
||||
ingredients.setOutput( ItemStack.class, recipe.getOutput() );
|
||||
ingredients.setOutput( ItemStack.class, this.recipe.getOutput() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class InscriberRegistryPlugin implements IRecipeRegistryPlugin
|
||||
if( focus.getMode() == IFocus.Mode.INPUT )
|
||||
{
|
||||
ItemStack input = (ItemStack) focus.getValue();
|
||||
for( ItemStack validInput : inscriber.getInputs() )
|
||||
for( ItemStack validInput : this.inscriber.getInputs() )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -34,25 +34,25 @@ public class JEIModule implements IJEI
|
||||
|
||||
public IJEI getJei()
|
||||
{
|
||||
return jei;
|
||||
return this.jei;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSearchText()
|
||||
{
|
||||
return jei.getSearchText();
|
||||
return this.jei.getSearchText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSearchText( String searchText )
|
||||
{
|
||||
jei.setSearchText( searchText );
|
||||
this.jei.setSearchText( searchText );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return jei.isEnabled();
|
||||
return this.jei.isEnabled();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -59,15 +59,15 @@ public class JEIPlugin extends BlankModPlugin
|
||||
|
||||
IDefinitions definitions = AEApi.instance().definitions();
|
||||
|
||||
registerFacadeRecipe( definitions, registry );
|
||||
this.registerFacadeRecipe( definitions, registry );
|
||||
|
||||
registerInscriberRecipes( definitions, registry );
|
||||
this.registerInscriberRecipes( definitions, registry );
|
||||
|
||||
registerCondenserRecipes( definitions, registry );
|
||||
this.registerCondenserRecipes( definitions, registry );
|
||||
|
||||
registerGrinderRecipes( definitions, registry );
|
||||
this.registerGrinderRecipes( definitions, registry );
|
||||
|
||||
registerDescriptions( definitions, registry );
|
||||
this.registerDescriptions( definitions, registry );
|
||||
|
||||
// Allow recipe transfer from JEI to crafting and pattern terminal
|
||||
registry.getRecipeTransferRegistry().addRecipeTransferHandler( new RecipeTransferHandler<>( ContainerCraftingTerm.class ),
|
||||
@@ -89,30 +89,30 @@ public class JEIPlugin extends BlankModPlugin
|
||||
{
|
||||
message = GuiText.ChargedQuartzFind.getLocal();
|
||||
}
|
||||
addDescription( registry, materials.certusQuartzCrystalCharged(), message );
|
||||
this.addDescription( registry, materials.certusQuartzCrystalCharged(), message );
|
||||
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.METEORITE_WORLD_GEN ) )
|
||||
{
|
||||
addDescription( registry, materials.logicProcessorPress(), GuiText.inWorldCraftingPresses.getLocal() );
|
||||
addDescription( registry, materials.calcProcessorPress(), GuiText.inWorldCraftingPresses.getLocal() );
|
||||
addDescription( registry, materials.engProcessorPress(), GuiText.inWorldCraftingPresses.getLocal() );
|
||||
this.addDescription( registry, materials.logicProcessorPress(), GuiText.inWorldCraftingPresses.getLocal() );
|
||||
this.addDescription( registry, materials.calcProcessorPress(), GuiText.inWorldCraftingPresses.getLocal() );
|
||||
this.addDescription( registry, materials.engProcessorPress(), GuiText.inWorldCraftingPresses.getLocal() );
|
||||
}
|
||||
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.IN_WORLD_FLUIX ) )
|
||||
{
|
||||
addDescription( registry, materials.fluixCrystal(), GuiText.inWorldFluix.getLocal() );
|
||||
this.addDescription( registry, materials.fluixCrystal(), GuiText.inWorldFluix.getLocal() );
|
||||
}
|
||||
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.IN_WORLD_SINGULARITY ) )
|
||||
{
|
||||
addDescription( registry, materials.qESingularity(), GuiText.inWorldSingularity.getLocal() );
|
||||
this.addDescription( registry, materials.qESingularity(), GuiText.inWorldSingularity.getLocal() );
|
||||
}
|
||||
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.IN_WORLD_PURIFICATION ) )
|
||||
{
|
||||
addDescription( registry, materials.purifiedCertusQuartzCrystal(), GuiText.inWorldPurificationCertus.getLocal() );
|
||||
addDescription( registry, materials.purifiedNetherQuartzCrystal(), GuiText.inWorldPurificationNether.getLocal() );
|
||||
addDescription( registry, materials.purifiedFluixCrystal(), GuiText.inWorldPurificationFluix.getLocal() );
|
||||
this.addDescription( registry, materials.purifiedCertusQuartzCrystal(), GuiText.inWorldPurificationCertus.getLocal() );
|
||||
this.addDescription( registry, materials.purifiedNetherQuartzCrystal(), GuiText.inWorldPurificationNether.getLocal() );
|
||||
this.addDescription( registry, materials.purifiedFluixCrystal(), GuiText.inWorldPurificationFluix.getLocal() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ class JeiRuntimeAdapter implements IJEI
|
||||
@Override
|
||||
public String getSearchText()
|
||||
{
|
||||
return Strings.nullToEmpty( runtime.getItemListOverlay().getFilterText() );
|
||||
return Strings.nullToEmpty( this.runtime.getItemListOverlay().getFilterText() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSearchText( String searchText )
|
||||
{
|
||||
runtime.getItemListOverlay().setFilterText( Strings.nullToEmpty( searchText ) );
|
||||
this.runtime.getItemListOverlay().setFilterText( Strings.nullToEmpty( searchText ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class RecipeTransferHandler<T extends Container> implements IRecipeTransferHandl
|
||||
@Override
|
||||
public Class<T> getContainerClass()
|
||||
{
|
||||
return containerClass;
|
||||
return this.containerClass;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -53,9 +53,9 @@ class ShapedRecipeWrapper extends BlankRecipeWrapper implements IShapedCraftingR
|
||||
{
|
||||
final boolean useSingleItems = AEConfig.instance().disableColoredCableRecipesInJEI();
|
||||
|
||||
Object[] items = recipe.getIIngredients();
|
||||
int width = recipe.getWidth();
|
||||
int height = recipe.getHeight();
|
||||
Object[] items = this.recipe.getIIngredients();
|
||||
int width = this.recipe.getWidth();
|
||||
int height = this.recipe.getHeight();
|
||||
|
||||
List<List<ItemStack>> in = new ArrayList<>( width * height );
|
||||
|
||||
@@ -86,18 +86,18 @@ class ShapedRecipeWrapper extends BlankRecipeWrapper implements IShapedCraftingR
|
||||
}
|
||||
|
||||
ingredients.setInputLists( ItemStack.class, in );
|
||||
ingredients.setOutput( ItemStack.class, recipe.getRecipeOutput() );
|
||||
ingredients.setOutput( ItemStack.class, this.recipe.getRecipeOutput() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWidth()
|
||||
{
|
||||
return recipe.getWidth();
|
||||
return this.recipe.getWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight()
|
||||
{
|
||||
return recipe.getHeight();
|
||||
return this.recipe.getHeight();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user