Make fields final if possible to ensure immutability
This commit is contained in:
@@ -36,8 +36,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
class EnumPair
|
||||
{
|
||||
|
||||
Enum setting;
|
||||
Enum value;
|
||||
final Enum setting;
|
||||
final Enum value;
|
||||
|
||||
EnumPair(Enum a, Enum b) {
|
||||
setting = a;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
HORIZONTAL, VERTICAL
|
||||
}
|
||||
|
||||
private IProgressProvider source;
|
||||
private final IProgressProvider source;
|
||||
private ResourceLocation texture;
|
||||
private int fill_u;
|
||||
private int fill_v;
|
||||
|
||||
@@ -15,14 +15,14 @@ import appeng.client.texture.ExtraBlockTextures;
|
||||
public class GuiTabButton extends GuiButton implements ITooltip
|
||||
{
|
||||
|
||||
RenderItem itemRenderer;
|
||||
final RenderItem itemRenderer;
|
||||
|
||||
int myIcon = -1;
|
||||
public int hideEdge = 0;
|
||||
|
||||
ItemStack myItem;
|
||||
|
||||
String Msg;
|
||||
final String Msg;
|
||||
|
||||
public void setVisibility(boolean vis)
|
||||
{
|
||||
|
||||
@@ -11,11 +11,11 @@ import appeng.client.texture.ExtraBlockTextures;
|
||||
public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
{
|
||||
|
||||
int iconIdxOn;
|
||||
int iconIdxOff;
|
||||
final int iconIdxOn;
|
||||
final int iconIdxOff;
|
||||
|
||||
String Name;
|
||||
String Hint;
|
||||
final String Name;
|
||||
final String Hint;
|
||||
|
||||
boolean on;
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ import net.minecraft.client.gui.GuiTextField;
|
||||
public class MEGuiTextField extends GuiTextField
|
||||
{
|
||||
|
||||
int posX;
|
||||
int posY;
|
||||
final int posX;
|
||||
final int posY;
|
||||
|
||||
int myWidth;
|
||||
int myHeight;
|
||||
final int myWidth;
|
||||
final int myHeight;
|
||||
|
||||
public MEGuiTextField(FontRenderer par1FontRenderer, int xPos, int yPos, int width, int height) {
|
||||
super( par1FontRenderer, xPos, yPos, width, height );
|
||||
|
||||
Reference in New Issue
Block a user