Code cleanup

Added missing this, annotations, etc.
This commit is contained in:
yueh
2018-08-30 20:33:08 +02:00
parent fed12cb99f
commit a2091d10fe
77 changed files with 227 additions and 270 deletions
@@ -50,7 +50,7 @@ public class DummyFluidBakedModel implements IBakedModel
@Override
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
{
return quads;
return this.quads;
}
@Override
@@ -104,13 +104,13 @@ public class DummyFluidDispatcherBakedModel extends DelegateBakedModel
fluidStack = new FluidStack( FluidRegistry.WATER, Fluid.BUCKET_VOLUME );
}
TextureAtlasSprite sprite = bakedTextureGetter.apply( fluidStack.getFluid().getStill( fluidStack ) );
TextureAtlasSprite sprite = DummyFluidDispatcherBakedModel.this.bakedTextureGetter.apply( fluidStack.getFluid().getStill( fluidStack ) );
if( sprite == null )
{
return new DummyFluidBakedModel( ImmutableList.of() );
}
return new DummyFluidBakedModel( ItemLayerModel.getQuadsForSprite( 0, sprite, format, Optional.empty() ) );
return new DummyFluidBakedModel( ItemLayerModel.getQuadsForSprite( 0, sprite, DummyFluidDispatcherBakedModel.this.format, Optional.empty() ) );
}
};
}
@@ -51,7 +51,7 @@ public class DummyFluidItemModel implements IModel
{
try
{
baseModel = ModelLoaderRegistry.getModel( MODEL_BASE );
this.baseModel = ModelLoaderRegistry.getModel( MODEL_BASE );
}
catch( Exception e )
{
@@ -84,6 +84,6 @@ public class DummyFluidItemModel implements IModel
@Override
public IModelState getDefaultState()
{
return getBaseModel().getDefaultState();
return this.getBaseModel().getDefaultState();
}
}
@@ -188,7 +188,7 @@ public class CableBusRenderState
{
return false;
}
if( getClass() != obj.getClass() )
if( this.getClass() != obj.getClass() )
{
return false;
}
@@ -56,7 +56,7 @@ public class P2PTunnelFrequencyBakedModel implements IBakedModel, IPartBakedMode
frequency = (short) ( partFlags.longValue() & 0xffffL );
active = ( partFlags.longValue() & 0x10000L ) != 0;
}
return getQuadsForFrequency( frequency, active );
return this.getQuadsForFrequency( frequency, active );
} );
}
catch( ExecutionException e )
@@ -72,7 +72,7 @@ public class P2PTunnelFrequencyBakedModel implements IBakedModel, IPartBakedMode
{
return Collections.emptyList();
}
return getPartQuads( null, rand );
return this.getPartQuads( null, rand );
}
private List<BakedQuad> getQuadsForFrequency( final short frequency, final boolean active )
@@ -100,7 +100,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
{
if( this.baseModel instanceof IBakedModel )
{
return ( (IBakedModel) this.baseModel ).handlePerspective( cameraTransformType );
return this.baseModel.handlePerspective( cameraTransformType );
}
return PerspectiveMapWrapper.handlePerspective( this, this.transforms, cameraTransformType );
@@ -150,7 +150,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
if( selectedModel instanceof IBakedModel )
{
return ( (IBakedModel) selectedModel ).handlePerspective( cameraTransformType );
return selectedModel.handlePerspective( cameraTransformType );
}
return PerspectiveMapWrapper.handlePerspective( this, ItemEncodedPatternBakedModel.this.transforms, cameraTransformType );
@@ -77,7 +77,7 @@ public class AssemblerFX extends Particle implements ICanDie
this.setExpired();
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.motionY -= 0.04D * this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
@@ -142,7 +142,7 @@ public class CraftingFx extends ParticleBreaking
this.setExpired();
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.motionY -= 0.04D * this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
@@ -132,7 +132,7 @@ public class EnergyFx extends ParticleBreaking
this.setExpired();
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.motionY -= 0.04D * this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
@@ -88,7 +88,7 @@ public class LightningFX extends Particle
this.setExpired();
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.motionY -= 0.04D * this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
@@ -67,7 +67,7 @@ public class MatterCannonFX extends ParticleBreaking
this.setExpired();
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.motionY -= 0.04D * this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
@@ -19,7 +19,6 @@
package appeng.client.render.model;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
@@ -263,7 +262,7 @@ public enum UVLModelLoader implements ICustomModelLoader
finally
{
IOUtils.closeQuietly( reader );
IOUtils.closeQuietly( (Closeable) iresource );
IOUtils.closeQuietly( iresource );
}
model = lvt_5_1_;