Code cleanup
Added missing this, annotations, etc.
This commit is contained in:
@@ -161,16 +161,16 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
super.drawScreen( mouseX, mouseY, partialTicks );
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate( (float) this.guiLeft, (float) this.guiTop, 0.0F );
|
||||
GlStateManager.translate( this.guiLeft, this.guiTop, 0.0F );
|
||||
GlStateManager.enableDepth();
|
||||
for( final GuiCustomSlot c : this.guiSlots )
|
||||
{
|
||||
drawGuiSlot( c, mouseX, mouseY, partialTicks );
|
||||
this.drawGuiSlot( c, mouseX, mouseY, partialTicks );
|
||||
}
|
||||
GlStateManager.disableDepth();
|
||||
for( final GuiCustomSlot c : this.guiSlots )
|
||||
{
|
||||
drawTooltip( c, mouseX - this.guiLeft, mouseY - this.guiTop );
|
||||
this.drawTooltip( c, mouseX - this.guiLeft, mouseY - this.guiTop );
|
||||
}
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
@@ -180,7 +180,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
if( c instanceof ITooltip )
|
||||
{
|
||||
drawTooltip( (ITooltip) c, mouseX, mouseY );
|
||||
this.drawTooltip( (ITooltip) c, mouseX, mouseY );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public abstract class GuiCustomSlot extends Gui implements ITooltip
|
||||
|
||||
public int getId()
|
||||
{
|
||||
return id;
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public boolean canClick( final EntityPlayer player )
|
||||
|
||||
@@ -131,7 +131,9 @@ public class MEGuiTextField extends GuiTextField
|
||||
public void drawSelectionBox( int startX, int startY, int endX, int endY )
|
||||
{
|
||||
if( !this.isFocused() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( startX < endX )
|
||||
{
|
||||
@@ -165,20 +167,20 @@ public class MEGuiTextField extends GuiTextField
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder bufferbuilder = tessellator.getBuffer();
|
||||
|
||||
float red = (float) ( this.selectionColor >> 16 & 255 ) / 255.0F;
|
||||
float blue = (float) ( this.selectionColor >> 8 & 255 ) / 255.0F;
|
||||
float green = (float) ( this.selectionColor & 255 ) / 255.0F;
|
||||
float alpha = (float) ( this.selectionColor >> 24 & 255 ) / 255.0F;
|
||||
float red = ( this.selectionColor >> 16 & 255 ) / 255.0F;
|
||||
float blue = ( this.selectionColor >> 8 & 255 ) / 255.0F;
|
||||
float green = ( this.selectionColor & 255 ) / 255.0F;
|
||||
float alpha = ( this.selectionColor >> 24 & 255 ) / 255.0F;
|
||||
|
||||
GlStateManager.color( red, green, blue, alpha );
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.enableColorLogic();
|
||||
GlStateManager.colorLogicOp( GlStateManager.LogicOp.OR_REVERSE );
|
||||
bufferbuilder.begin( 7, DefaultVertexFormats.POSITION );
|
||||
bufferbuilder.pos( (double) startX, (double) endY, 0.0D ).endVertex();
|
||||
bufferbuilder.pos( (double) endX, (double) endY, 0.0D ).endVertex();
|
||||
bufferbuilder.pos( (double) endX, (double) startY, 0.0D ).endVertex();
|
||||
bufferbuilder.pos( (double) startX, (double) startY, 0.0D ).endVertex();
|
||||
bufferbuilder.pos( startX, endY, 0.0D ).endVertex();
|
||||
bufferbuilder.pos( endX, endY, 0.0D ).endVertex();
|
||||
bufferbuilder.pos( endX, startY, 0.0D ).endVertex();
|
||||
bufferbuilder.pos( startX, startY, 0.0D ).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.disableColorLogic();
|
||||
GlStateManager.enableTexture2D();
|
||||
|
||||
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user