Reduces visibility of internal fields/methods

Reduces the visibility of all fields to private and create setters/getters
when necessary. Exceptions are fields with GuiSync as these need to be
public.

Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
yueh
2015-10-08 15:42:42 +02:00
parent 1ea48fb389
commit 500fc47490
463 changed files with 5670 additions and 3757 deletions
@@ -59,8 +59,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
private static final Pattern PATTERN_NEW_LINE = Pattern.compile( "\\n", Pattern.LITERAL );
private static Map<EnumPair, ButtonAppearance> appearances;
private final Enum buttonSetting;
public boolean halfSize = false;
public String fillVar;
private boolean halfSize = false;
private String fillVar;
private Enum currentValue;
public GuiImgButton( final int x, final int y, final Enum idx, final Enum val )
@@ -362,7 +362,27 @@ public class GuiImgButton extends GuiButton implements ITooltip
}
}
static class EnumPair
public boolean isHalfSize()
{
return this.halfSize;
}
public void setHalfSize( final boolean halfSize )
{
this.halfSize = halfSize;
}
public String getFillVar()
{
return this.fillVar;
}
public void setFillVar( final String fillVar )
{
this.fillVar = fillVar;
}
private static final class EnumPair
{
final Enum setting;
@@ -26,7 +26,7 @@ import net.minecraft.client.gui.GuiTextField;
public class GuiNumberBox extends GuiTextField
{
final Class type;
private final Class type;
public GuiNumberBox( final FontRenderer fontRenderer, final int x, final int y, final int width, final int height, final Class type )
{
@@ -53,7 +53,7 @@ public class GuiScrollbar implements IScrollSource
}
}
public int getRange()
private int getRange()
{
return this.maxScroll - this.minScroll;
}
@@ -36,7 +36,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
{
private final RenderItem itemRenderer;
private final String message;
public int hideEdge = 0;
private int hideEdge = 0;
private int myIcon = -1;
private ItemStack myItem;
@@ -152,4 +152,14 @@ public class GuiTabButton extends GuiButton implements ITooltip
{
return this.visible;
}
public int getHideEdge()
{
return this.hideEdge;
}
public void setHideEdge( final int hideEdge )
{
this.hideEdge = hideEdge;
}
}