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 f054bd699b
commit e94a0cfccf
497 changed files with 7865 additions and 6908 deletions
@@ -47,19 +47,17 @@ import appeng.util.Platform;
public class GuiCellWorkbench extends GuiUpgradeable
{
final ContainerCellWorkbench workbench;
final TileCellWorkbench tcw;
private final ContainerCellWorkbench workbench;
GuiImgButton clear;
GuiImgButton partition;
GuiToggleButton copyMode;
private GuiImgButton clear;
private GuiImgButton partition;
private GuiToggleButton copyMode;
public GuiCellWorkbench( final InventoryPlayer inventoryPlayer, final TileCellWorkbench te )
{
super( new ContainerCellWorkbench( inventoryPlayer, te ) );
this.workbench = (ContainerCellWorkbench) this.inventorySlots;
this.ySize = 251;
this.tcw = te;
}
@Override
@@ -135,7 +133,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
@Override
protected void handleButtonVisibility()
{
this.copyMode.setState( this.workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
this.copyMode.setState( this.workbench.getCopyMode() == CopyMode.CLEAR_ON_REMOVE );
boolean hasFuzzy = false;
final IInventory inv = this.workbench.getCellUpgradeInventory();
@@ -36,7 +36,7 @@ import appeng.tile.storage.TileChest;
public class GuiChest extends AEBaseGui
{
GuiTabButton priority;
private GuiTabButton priority;
public GuiChest( final InventoryPlayer inventoryPlayer, final TileChest te )
{
@@ -41,9 +41,9 @@ import appeng.tile.misc.TileCondenser;
public class GuiCondenser extends AEBaseGui
{
final ContainerCondenser cvc;
GuiProgressBar pb;
GuiImgButton mode;
private final ContainerCondenser cvc;
private GuiProgressBar pb;
private GuiImgButton mode;
public GuiCondenser( final InventoryPlayer inventoryPlayer, final TileCondenser te )
{
@@ -72,7 +72,7 @@ public class GuiCondenser extends AEBaseGui
this.pb = new GuiProgressBar( this.cvc, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop, 178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal() );
this.mode = new GuiImgButton( 128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT, this.cvc.output );
this.mode = new GuiImgButton( 128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT, this.cvc.getOutput() );
this.buttonList.add( this.pb );
this.buttonList.add( this.mode );
@@ -84,8 +84,8 @@ public class GuiCondenser extends AEBaseGui
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.mode.set( this.cvc.output );
this.mode.fillVar = String.valueOf( this.cvc.output.requiredPower );
this.mode.set( this.cvc.getOutput() );
this.mode.setFillVar( String.valueOf( this.cvc.getOutput().requiredPower ) );
}
@Override
@@ -58,28 +58,30 @@ import com.google.common.base.Joiner;
public class GuiCraftConfirm extends AEBaseGui
{
final ContainerCraftConfirm ccc;
private final ContainerCraftConfirm ccc;
final int rows = 5;
private final int rows = 5;
final IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
final IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
final IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
private final IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
private final IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
private final IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
final List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
private final List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
GuiBridge OriginalGui;
GuiButton cancel;
GuiButton start;
GuiButton selectCPU;
int tooltip = -1;
private GuiBridge OriginalGui;
private GuiButton cancel;
private GuiButton start;
private GuiButton selectCPU;
private int tooltip = -1;
public GuiCraftConfirm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{
super( new ContainerCraftConfirm( inventoryPlayer, te ) );
this.xSize = 238;
this.ySize = 206;
this.myScrollBar = new GuiScrollbar();
final GuiScrollbar scrollbar = new GuiScrollbar();
this.setScrollBar( scrollbar );
this.ccc = (ContainerCraftConfirm) this.inventorySlots;
@@ -106,7 +108,7 @@ public class GuiCraftConfirm extends AEBaseGui
boolean isAutoStart()
{
return ( (ContainerCraftConfirm) this.inventorySlots ).autoStart;
return ( (ContainerCraftConfirm) this.inventorySlots ).isAutoStart();
}
@Override
@@ -135,7 +137,7 @@ public class GuiCraftConfirm extends AEBaseGui
{
this.updateCPUButtonText();
this.start.enabled = !( this.ccc.noCPU || this.isSimulation() );
this.start.enabled = !( this.ccc.hasNoCPU() || this.isSimulation() );
this.selectCPU.enabled = !this.isSimulation();
final int gx = ( this.width - this.xSize ) / 2;
@@ -175,20 +177,20 @@ public class GuiCraftConfirm extends AEBaseGui
private void updateCPUButtonText()
{
String btnTextText = GuiText.CraftingCPU.getLocal() + ": " + GuiText.Automatic.getLocal();
if( this.ccc.selectedCpu >= 0 )// && status.selectedCpu < status.cpus.size() )
if( this.ccc.getSelectedCpu() >= 0 )// && status.selectedCpu < status.cpus.size() )
{
if( this.ccc.myName.length() > 0 )
if( this.ccc.getName().length() > 0 )
{
final String name = this.ccc.myName.substring( 0, Math.min( 20, this.ccc.myName.length() ) );
final String name = this.ccc.getName().substring( 0, Math.min( 20, this.ccc.getName().length() ) );
btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name;
}
else
{
btnTextText = GuiText.CraftingCPU.getLocal() + ": #" + this.ccc.selectedCpu;
btnTextText = GuiText.CraftingCPU.getLocal() + ": #" + this.ccc.getSelectedCpu();
}
}
if( this.ccc.noCPU )
if( this.ccc.hasNoCPU() )
{
btnTextText = GuiText.NoCraftingCPUs.getLocal();
}
@@ -196,15 +198,15 @@ public class GuiCraftConfirm extends AEBaseGui
this.selectCPU.displayString = btnTextText;
}
boolean isSimulation()
private boolean isSimulation()
{
return ( (ContainerCraftConfirm) this.inventorySlots ).simulation;
return ( (ContainerCraftConfirm) this.inventorySlots ).isSimulation();
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
final long BytesUsed = this.ccc.bytesUsed;
final long BytesUsed = this.ccc.getUsedBytes();
final String byteUsed = NumberFormat.getInstance().format( BytesUsed );
final String Add = BytesUsed > 0 ? ( byteUsed + ' ' + GuiText.BytesUsed.getLocal() ) : GuiText.CalculatingWait.getLocal();
this.fontRendererObj.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 );
@@ -217,7 +219,7 @@ public class GuiCraftConfirm extends AEBaseGui
}
else
{
dsp = this.ccc.cpuBytesAvail > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.cpuBytesAvail + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.cpuCoProcessors ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
dsp = this.ccc.getCpuAvailableBytes() > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.getCpuAvailableBytes() + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.getCpuCoProcessors() ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
}
final int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2;
@@ -229,7 +231,7 @@ public class GuiCraftConfirm extends AEBaseGui
int y = 0;
final int xo = 9;
final int yo = 22;
final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
final int viewStart = this.getScrollBar().getCurrentScroll() * 3;
final int viewEnd = viewStart + 3 * this.rows;
String dspToolTip = "";
@@ -399,8 +401,8 @@ public class GuiCraftConfirm extends AEBaseGui
{
final int size = this.visual.size();
this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 114 );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - this.rows, 1 );
this.getScrollBar().setTop( 19 ).setLeft( 218 ).setHeight( 114 );
this.getScrollBar().setRange( 0, ( size + 2 ) / 3 - this.rows, 1 );
}
public void postUpdate( final List<IAEItemStack> list, final byte ref )
@@ -103,7 +103,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
this.craftingCpu = container;
this.ySize = GUI_HEIGHT;
this.xSize = GUI_WIDTH;
this.myScrollBar = new GuiScrollbar();
final GuiScrollbar scrollbar = new GuiScrollbar();
this.setScrollBar( scrollbar );
}
public void clearItems()
@@ -145,8 +147,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
final int size = this.visual.size();
this.myScrollBar.setTop( SCROLLBAR_TOP ).setLeft( SCROLLBAR_LEFT ).setHeight( SCROLLBAR_HEIGHT );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - DISPLAYED_ROWS, 1 );
this.getScrollBar().setTop( SCROLLBAR_TOP ).setLeft( SCROLLBAR_LEFT ).setHeight( SCROLLBAR_HEIGHT );
this.getScrollBar().setRange( 0, ( size + 2 ) / 3 - DISPLAYED_ROWS, 1 );
}
@Override
@@ -193,9 +195,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() );
if( this.craftingCpu.eta > 0 && !this.visual.isEmpty() )
if( this.craftingCpu.getEstimatedTime() > 0 && !this.visual.isEmpty() )
{
final long etaInMilliseconds = TimeUnit.MILLISECONDS.convert( this.craftingCpu.eta, TimeUnit.NANOSECONDS );
final long etaInMilliseconds = TimeUnit.MILLISECONDS.convert( this.craftingCpu.getEstimatedTime(), TimeUnit.NANOSECONDS );
final String etaTimeText = DurationFormatUtils.formatDuration( etaInMilliseconds, GuiText.ETAFormat.getLocal() );
title += " - " + etaTimeText;
}
@@ -204,7 +206,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int x = 0;
int y = 0;
final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
final int viewStart = this.getScrollBar().getCurrentScroll() * 3;
final int viewEnd = viewStart + 3 * 6;
String dspToolTip = "";
@@ -52,12 +52,12 @@ import appeng.parts.reporting.PartTerminal;
public class GuiCraftingStatus extends GuiCraftingCPU
{
final ContainerCraftingStatus status;
GuiButton selectCPU;
private final ContainerCraftingStatus status;
private GuiButton selectCPU;
GuiTabButton originalGuiBtn;
GuiBridge originalGui;
ItemStack myIcon = null;
private GuiTabButton originalGuiBtn;
private GuiBridge originalGui;
private ItemStack myIcon = null;
public GuiCraftingStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{
@@ -143,7 +143,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
if( this.myIcon != null )
{
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, this.myIcon, this.myIcon.getDisplayName(), this.itemRender ) );
this.originalGuiBtn.hideEdge = 13;
this.originalGuiBtn.setHideEdge( 13 );
}
}
@@ -38,12 +38,12 @@ import appeng.helpers.InventoryAction;
public class GuiCraftingTerm extends GuiMEMonitorable
{
GuiImgButton clearBtn;
private GuiImgButton clearBtn;
public GuiCraftingTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
this.reservedSpace = 73;
this.setReservedSpace( 73 );
}
@Override
@@ -76,14 +76,14 @@ public class GuiCraftingTerm extends GuiMEMonitorable
{
super.initGui();
this.buttonList.add( this.clearBtn = new GuiImgButton( this.guiLeft + 92, this.guiTop + this.ySize - 156, Settings.ACTIONS, ActionItems.STASH ) );
this.clearBtn.halfSize = true;
this.clearBtn.setHalfSize( true );
}
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.getReservedSpace(), 4210752 );
}
@Override
@@ -36,7 +36,7 @@ import appeng.tile.storage.TileDrive;
public class GuiDrive extends AEBaseGui
{
GuiTabButton priority;
private GuiTabButton priority;
public GuiDrive( final InventoryPlayer inventoryPlayer, final TileDrive te )
{
@@ -43,8 +43,8 @@ import appeng.parts.automation.PartFormationPlane;
public class GuiFormationPlane extends GuiUpgradeable
{
GuiTabButton priority;
GuiImgButton placeMode;
private GuiTabButton priority;
private GuiImgButton placeMode;
public GuiFormationPlane( final InventoryPlayer inventoryPlayer, final PartFormationPlane te )
{
@@ -72,12 +72,12 @@ public class GuiFormationPlane extends GuiUpgradeable
if( this.fuzzyMode != null )
{
this.fuzzyMode.set( this.cvb.fzMode );
this.fuzzyMode.set( this.cvb.getFuzzyMode() );
}
if( this.placeMode != null )
{
this.placeMode.set( ( (ContainerFormationPlane) this.cvb ).placeMode );
this.placeMode.set( ( (ContainerFormationPlane) this.cvb ).getPlaceMode() );
}
}
@@ -44,8 +44,8 @@ import appeng.tile.storage.TileIOPort;
public class GuiIOPort extends GuiUpgradeable
{
GuiImgButton fullMode;
GuiImgButton operationMode;
private GuiImgButton fullMode;
private GuiImgButton operationMode;
public GuiIOPort( final InventoryPlayer inventoryPlayer, final TileIOPort te )
{
@@ -73,17 +73,17 @@ public class GuiIOPort extends GuiUpgradeable
if( this.redstoneMode != null )
{
this.redstoneMode.set( this.cvb.rsMode );
this.redstoneMode.set( this.cvb.getRedStoneMode() );
}
if( this.operationMode != null )
{
this.operationMode.set( ( (ContainerIOPort) this.cvb ).opMode );
this.operationMode.set( ( (ContainerIOPort) this.cvb ).getOperationMode() );
}
if( this.fullMode != null )
{
this.fullMode.set( ( (ContainerIOPort) this.cvb ).fMode );
this.fullMode.set( ( (ContainerIOPort) this.cvb ).getFullMode() );
}
}
@@ -32,8 +32,8 @@ import appeng.tile.misc.TileInscriber;
public class GuiInscriber extends AEBaseGui
{
final ContainerInscriber cvc;
GuiProgressBar pb;
private final ContainerInscriber cvc;
private GuiProgressBar pb;
public GuiInscriber( final InventoryPlayer inventoryPlayer, final TileInscriber te )
{
@@ -43,7 +43,7 @@ public class GuiInscriber extends AEBaseGui
this.xSize = this.hasToolbox() ? 246 : 211;
}
protected boolean hasToolbox()
private boolean hasToolbox()
{
return ( (ContainerUpgradeable) this.inventorySlots ).hasToolbox();
}
@@ -85,7 +85,7 @@ public class GuiInscriber extends AEBaseGui
}
}
protected boolean drawUpgrades()
private boolean drawUpgrades()
{
return true;
}
@@ -43,9 +43,9 @@ import appeng.helpers.IInterfaceHost;
public class GuiInterface extends GuiUpgradeable
{
GuiTabButton priority;
GuiImgButton BlockMode;
GuiToggleButton interfaceMode;
private GuiTabButton priority;
private GuiImgButton BlockMode;
private GuiToggleButton interfaceMode;
public GuiInterface( final InventoryPlayer inventoryPlayer, final IInterfaceHost te )
{
@@ -71,12 +71,12 @@ public class GuiInterface extends GuiUpgradeable
{
if( this.BlockMode != null )
{
this.BlockMode.set( ( (ContainerInterface) this.cvb ).bMode );
this.BlockMode.set( ( (ContainerInterface) this.cvb ).getBlockingMode() );
}
if( this.interfaceMode != null )
{
this.interfaceMode.setState( ( (ContainerInterface) this.cvb ).iTermMode == YesNo.YES );
this.interfaceMode.setState( ( (ContainerInterface) this.cvb ).getInterfaceTerminalMode() == YesNo.YES );
}
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
@@ -56,7 +56,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
private static final int LINES_ON_PAGE = 6;
// TODO: copied from GuiMEMonitorable. It looks not changed, maybe unneeded?
final int offsetX = 9;
private final int offsetX = 9;
private final HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
private final HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
@@ -71,7 +71,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
public GuiInterfaceTerminal( final InventoryPlayer inventoryPlayer, final PartInterfaceTerminal te )
{
super( new ContainerInterfaceTerminal( inventoryPlayer, te ) );
this.myScrollBar = new GuiScrollbar();
final GuiScrollbar scrollbar = new GuiScrollbar();
this.setScrollBar( scrollbar );
this.xSize = 195;
this.ySize = 222;
}
@@ -81,9 +83,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
{
super.initGui();
this.myScrollBar.setLeft( 175 );
this.myScrollBar.setHeight( 106 );
this.myScrollBar.setTop( 18 );
this.getScrollBar().setLeft( 175 );
this.getScrollBar().setHeight( 106 );
this.getScrollBar().setTop( 18 );
this.searchField = new MEGuiTextField( this.fontRendererObj, this.guiLeft + Math.max( 104, this.offsetX ), this.guiTop + 4, 65, 12 );
this.searchField.setEnableBackgroundDrawing( false );
@@ -99,7 +101,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
final int ex = this.myScrollBar.getCurrentScroll();
final int ex = this.getScrollBar().getCurrentScroll();
final Iterator<Object> o = this.inventorySlots.inventorySlots.iterator();
while( o.hasNext() )
@@ -117,7 +119,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
if( lineObj instanceof ClientDCInternalInv )
{
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
for( int z = 0; z < inv.inv.getSizeInventory(); z++ )
for( int z = 0; z < inv.getInventory().getSizeInventory(); z++ )
{
this.inventorySlots.inventorySlots.add( new SlotDisconnected( inv, z, z * 18 + 8, 1 + offset ) );
}
@@ -163,7 +165,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
int offset = 17;
final int ex = this.myScrollBar.getCurrentScroll();
final int ex = this.getScrollBar().getCurrentScroll();
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
{
@@ -173,7 +175,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
GL11.glColor4f( 1, 1, 1, 1 );
final int width = inv.inv.getSizeInventory() * 18;
final int width = inv.getInventory().getSizeInventory() * 18;
this.drawTexturedModalRect( offsetX + 7, offsetY + offset, 7, 139, width, 18 );
}
offset += 18;
@@ -225,12 +227,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
final NBTTagCompound invData = in.getCompoundTag( key );
final ClientDCInternalInv current = this.getById( id, invData.getLong( "sortBy" ), invData.getString( "un" ) );
for( int x = 0; x < current.inv.getSizeInventory(); x++ )
for( int x = 0; x < current.getInventory().getSizeInventory(); x++ )
{
final String which = Integer.toString( x );
if( invData.hasKey( which ) )
{
current.inv.setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
current.getInventory().setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
}
}
}
@@ -277,7 +279,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
// Search if the current inventory holds a pattern containing the search term.
if( !found && !searchFilterLowerCase.isEmpty() )
{
for( final ItemStack itemStack : entry.inv )
for( final ItemStack itemStack : entry.getInventory() )
{
found = this.itemStackMatchesSearchTerm( itemStack, searchFilterLowerCase );
if( found )
@@ -318,7 +320,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
this.lines.addAll( clientInventories );
}
this.myScrollBar.setRange( 0, this.lines.size() - LINES_ON_PAGE, 2 );
this.getScrollBar().setRange( 0, this.lines.size() - LINES_ON_PAGE, 2 );
}
private boolean itemStackMatchesSearchTerm( final ItemStack itemStack, final String searchTerm )
@@ -47,19 +47,19 @@ import appeng.parts.automation.PartLevelEmitter;
public class GuiLevelEmitter extends GuiUpgradeable
{
GuiNumberBox level;
private GuiNumberBox level;
GuiButton plus1;
GuiButton plus10;
GuiButton plus100;
GuiButton plus1000;
GuiButton minus1;
GuiButton minus10;
GuiButton minus100;
GuiButton minus1000;
private GuiButton plus1;
private GuiButton plus10;
private GuiButton plus100;
private GuiButton plus1000;
private GuiButton minus1;
private GuiButton minus10;
private GuiButton minus100;
private GuiButton minus1000;
GuiImgButton levelMode;
GuiImgButton craftingMode;
private GuiImgButton levelMode;
private GuiImgButton craftingMode;
public GuiLevelEmitter( final InventoryPlayer inventoryPlayer, final PartLevelEmitter te )
{
@@ -131,12 +131,12 @@ public class GuiLevelEmitter extends GuiUpgradeable
if( this.craftingMode != null )
{
this.craftingMode.set( ( (ContainerLevelEmitter) this.cvb ).cmType );
this.craftingMode.set( ( (ContainerLevelEmitter) this.cvb ).getCraftingMode() );
}
if( this.levelMode != null )
{
this.levelMode.set( ( (ContainerLevelEmitter) this.cvb ).lvType );
this.levelMode.set( ( (ContainerLevelEmitter) this.cvb ).getLevelMode() );
}
}
@@ -33,8 +33,8 @@ import appeng.tile.crafting.TileMolecularAssembler;
public class GuiMAC extends GuiUpgradeable
{
final ContainerMAC container;
GuiProgressBar pb;
private final ContainerMAC container;
private GuiProgressBar pb;
public GuiMAC( final InventoryPlayer inventoryPlayer, final TileMolecularAssembler te )
{
@@ -71,30 +71,31 @@ import appeng.util.Platform;
public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfigManagerHost
{
public static int CraftingGridOffsetX;
public static int CraftingGridOffsetY;
private static int craftingGridOffsetX;
private static int craftingGridOffsetY;
private static String memoryText = "";
final ItemRepo repo;
final int offsetX = 9;
final int lowerTextureOffset = 0;
final IConfigManager configSrc;
final boolean viewCell;
final ItemStack[] myCurrentViewCells = new ItemStack[5];
final ContainerMEMonitorable monitorableContainer;
GuiTabButton craftingStatusBtn;
MEGuiTextField searchField;
GuiText myName;
int perRow = 9;
int reservedSpace = 0;
boolean customSortOrder = true;
int rows = 0;
int maxRows = Integer.MAX_VALUE;
int standardSize;
GuiImgButton ViewBox;
GuiImgButton SortByBox;
GuiImgButton SortDirBox;
GuiImgButton searchBoxSettings;
GuiImgButton terminalStyleBox;
private final ItemRepo repo;
private final int offsetX = 9;
private final int lowerTextureOffset = 0;
private final IConfigManager configSrc;
private final boolean viewCell;
private final ItemStack[] myCurrentViewCells = new ItemStack[5];
private final ContainerMEMonitorable monitorableContainer;
private GuiTabButton craftingStatusBtn;
private MEGuiTextField searchField;
private GuiText myName;
private int perRow = 9;
private int reservedSpace = 0;
private boolean customSortOrder = true;
private int rows = 0;
private int maxRows = Integer.MAX_VALUE;
private int standardSize;
private GuiImgButton ViewBox;
private GuiImgButton SortByBox;
private GuiImgButton SortDirBox;
private GuiImgButton searchBoxSettings;
private GuiImgButton terminalStyleBox;
public GuiMEMonitorable( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{
@@ -105,8 +106,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
super( c );
this.myScrollBar = new GuiScrollbar();
this.repo = new ItemRepo( this.myScrollBar, this );
final GuiScrollbar scrollbar = new GuiScrollbar();
this.setScrollBar( scrollbar );
this.repo = new ItemRepo( scrollbar, this );
this.xSize = 185;
this.ySize = 204;
@@ -119,7 +122,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.standardSize = this.xSize;
this.configSrc = ( (IConfigurableObject) this.inventorySlots ).getConfigManager();
( this.monitorableContainer = (ContainerMEMonitorable) this.inventorySlots ).gui = this;
( this.monitorableContainer = (ContainerMEMonitorable) this.inventorySlots ).setGui( this );
this.viewCell = te instanceof IViewCellStorage;
@@ -158,8 +161,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
private void setScrollBar()
{
this.myScrollBar.setTop( 18 ).setLeft( 175 ).setHeight( this.rows * 18 - 2 );
this.myScrollBar.setRange( 0, ( this.repo.size() + this.perRow - 1 ) / this.perRow - this.rows, Math.max( 1, this.rows / 6 ) );
this.getScrollBar().setTop( 18 ).setLeft( 175 ).setHeight( this.rows * 18 - 2 );
this.getScrollBar().setRange( 0, ( this.repo.size() + this.perRow - 1 ) / this.perRow - this.rows, Math.max( 1, this.rows / 6 ) );
}
@Override
@@ -204,13 +207,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class )
{
this.re_init();
this.reinitalize();
}
}
}
}
public void re_init()
private void reinitalize()
{
this.buttonList.clear();
this.initGui();
@@ -249,12 +252,12 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.rows = 3;
}
this.meSlots.clear();
this.getMeSlots().clear();
for( int y = 0; y < this.rows; y++ )
{
for( int x = 0; x < this.perRow; x++ )
{
this.meSlots.add( new InternalSlotME( this.repo, x + y * this.perRow, this.offsetX + x * 18, 18 + y * 18 ) );
this.getMeSlots().add( new InternalSlotME( this.repo, x + y * this.perRow, this.offsetX + x * 18, 18 + y * 18 ) );
}
}
@@ -311,7 +314,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( this.viewCell || this instanceof GuiWirelessTerm )
{
this.buttonList.add( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus.getLocal(), this.itemRender ) );
this.craftingStatusBtn.hideEdge = 13;
this.craftingStatusBtn.setHideEdge( 13 );
}
// Enum setting = AEConfig.INSTANCE.getSetting( "Terminal", SearchBoxMode.class, SearchBoxMode.AUTOSEARCH );
@@ -321,13 +324,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( this.isSubGui() )
{
this.searchField.setText( memoryText );
this.repo.searchString = memoryText;
this.repo.setSearchString( memoryText );
this.repo.updateView();
this.setScrollBar();
}
CraftingGridOffsetX = Integer.MAX_VALUE;
CraftingGridOffsetY = Integer.MAX_VALUE;
craftingGridOffsetX = Integer.MAX_VALUE;
craftingGridOffsetY = Integer.MAX_VALUE;
for( final Object s : this.inventorySlots.inventorySlots )
{
@@ -344,14 +347,14 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
final Slot g = (Slot) s;
if( g.xDisplayPosition > 0 && g.yDisplayPosition > 0 )
{
CraftingGridOffsetX = Math.min( CraftingGridOffsetX, g.xDisplayPosition );
CraftingGridOffsetY = Math.min( CraftingGridOffsetY, g.yDisplayPosition );
craftingGridOffsetX = Math.min( craftingGridOffsetX, g.xDisplayPosition );
craftingGridOffsetY = Math.min( craftingGridOffsetY, g.yDisplayPosition );
}
}
}
CraftingGridOffsetX -= 25;
CraftingGridOffsetY -= 6;
craftingGridOffsetX -= 25;
craftingGridOffsetY -= 6;
}
@Override
@@ -374,7 +377,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( btn == 1 && this.searchField.isMouseIn( xCoord, yCoord ) )
{
this.searchField.setText( "" );
this.repo.searchString = "";
this.repo.setSearchString( "" );
this.repo.updateView();
this.setScrollBar();
}
@@ -416,10 +419,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
for( int i = 0; i < 5; i++ )
{
if( this.myCurrentViewCells[i] != this.monitorableContainer.cellView[i].getStack() )
if( this.myCurrentViewCells[i] != this.monitorableContainer.getCellViewSlot( i ).getStack() )
{
update = true;
this.myCurrentViewCells[i] = this.monitorableContainer.cellView[i].getStack();
this.myCurrentViewCells[i] = this.monitorableContainer.getCellViewSlot( i ).getStack();
}
}
@@ -453,7 +456,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
protected void repositionSlot( final AppEngSlot s )
{
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
s.yDisplayPosition = s.getY() + this.ySize - 78 - 5;
}
@Override
@@ -468,7 +471,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( this.searchField.textboxKeyTyped( character, key ) )
{
this.repo.searchString = this.searchField.getText();
this.repo.setSearchString( this.searchField.getText() );
this.repo.updateView();
this.setScrollBar();
}
@@ -482,7 +485,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
@Override
public void updateScreen()
{
this.repo.setPower( this.monitorableContainer.hasPower );
this.repo.setPower( this.monitorableContainer.isPowered() );
super.updateScreen();
}
@@ -524,4 +527,34 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.repo.updateView();
}
int getReservedSpace()
{
return this.reservedSpace;
}
void setReservedSpace( final int reservedSpace )
{
this.reservedSpace = reservedSpace;
}
public boolean isCustomSortOrder()
{
return this.customSortOrder;
}
void setCustomSortOrder( final boolean customSortOrder )
{
this.customSortOrder = customSortOrder;
}
public int getStandardSize()
{
return this.standardSize;
}
void setStandardSize( final int standardSize )
{
this.standardSize = standardSize;
}
}
@@ -51,19 +51,21 @@ import appeng.util.Platform;
public class GuiNetworkStatus extends AEBaseGui implements ISortSource
{
final ItemRepo repo;
final int rows = 4;
GuiImgButton units;
int tooltip = -1;
private final ItemRepo repo;
private final int rows = 4;
private GuiImgButton units;
private int tooltip = -1;
public GuiNetworkStatus( final InventoryPlayer inventoryPlayer, final INetworkTool te )
{
super( new ContainerNetworkStatus( inventoryPlayer, te ) );
final GuiScrollbar scrollbar = new GuiScrollbar();
this.setScrollBar( scrollbar );
this.repo = new ItemRepo( scrollbar, this );
this.ySize = 153;
this.xSize = 195;
this.myScrollBar = new GuiScrollbar();
this.repo = new ItemRepo( this.myScrollBar, this );
this.repo.rowSize = 5;
this.repo.setRowSize( 5 );
}
@Override
@@ -133,11 +135,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
this.fontRendererObj.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( ns.currentPower, false ), 13, 16, 4210752 );
this.fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( ns.maxPower, false ), 13, 26, 4210752 );
this.fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( ns.getCurrentPower(), false ), 13, 16, 4210752 );
this.fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( ns.getMaxPower(), false ), 13, 26, 4210752 );
this.fontRendererObj.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.avgAddition, true ), 13, 143 - 10, 4210752 );
this.fontRendererObj.drawString( GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( ns.powerUsage, true ), 13, 143 - 20, 4210752 );
this.fontRendererObj.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.getAverageAddition(), true ), 13, 143 - 10, 4210752 );
this.fontRendererObj.drawString( GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( ns.getPowerUsage(), true ), 13, 143 - 20, 4210752 );
final int sectionLength = 30;
@@ -230,8 +232,8 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
private void setScrollBar()
{
final int size = this.repo.size();
this.myScrollBar.setTop( 39 ).setLeft( 175 ).setHeight( 78 );
this.myScrollBar.setRange( 0, ( size + 4 ) / 5 - this.rows, 1 );
this.getScrollBar().setTop( 39 ).setLeft( 175 ).setHeight( 78 );
this.getScrollBar().setRange( 0, ( size + 4 ) / 5 - this.rows, 1 );
}
// @Override - NEI
@@ -36,7 +36,7 @@ import appeng.core.sync.packets.PacketValueConfig;
public class GuiNetworkTool extends AEBaseGui
{
GuiToggleButton tFacades;
private GuiToggleButton tFacades;
public GuiNetworkTool( final InventoryPlayer inventoryPlayer, final INetworkTool te )
{
@@ -77,7 +77,7 @@ public class GuiNetworkTool extends AEBaseGui
{
if( this.tFacades != null )
{
this.tFacades.setState( ( (ContainerNetworkTool) this.inventorySlots ).facadeMode );
this.tFacades.setState( ( (ContainerNetworkTool) this.inventorySlots ).isFacadeMode() );
}
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 4210752 );
@@ -60,7 +60,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
{
super( inventoryPlayer, te, new ContainerPatternTerm( inventoryPlayer, te ) );
this.container = (ContainerPatternTerm) this.inventorySlots;
this.reservedSpace = 81;
this.setReservedSpace( 81 );
}
@Override
@@ -110,15 +110,15 @@ public class GuiPatternTerm extends GuiMEMonitorable
this.buttonList.add( this.tabProcessButton );
this.substitutionsEnabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.ENABLED );
this.substitutionsEnabledBtn.halfSize = true;
this.substitutionsEnabledBtn.setHalfSize( true );
this.buttonList.add( this.substitutionsEnabledBtn );
this.substitutionsDisabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.DISABLED );
this.substitutionsDisabledBtn.halfSize = true;
this.substitutionsDisabledBtn.setHalfSize( true );
this.buttonList.add( this.substitutionsDisabledBtn );
this.clearBtn = new GuiImgButton( this.guiLeft + 74, this.guiTop + this.ySize - 163, Settings.ACTIONS, ActionItems.CLOSE );
this.clearBtn.halfSize = true;
this.clearBtn.setHalfSize( true );
this.buttonList.add( this.clearBtn );
this.encodeBtn = new GuiImgButton( this.guiLeft + 147, this.guiTop + this.ySize - 142, Settings.ACTIONS, ActionItems.ENCODE );
@@ -128,7 +128,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
if( !this.container.craftingMode )
if( !this.container.isCraftingMode() )
{
this.tabCraftButton.visible = false;
this.tabProcessButton.visible = true;
@@ -151,13 +151,13 @@ public class GuiPatternTerm extends GuiMEMonitorable
}
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRendererObj.drawString( GuiText.PatternTerminal.getLocal(), 8, this.ySize - 96 + 2 - this.reservedSpace, 4210752 );
this.fontRendererObj.drawString( GuiText.PatternTerminal.getLocal(), 8, this.ySize - 96 + 2 - this.getReservedSpace(), 4210752 );
}
@Override
protected String getBackground()
{
if( this.container.craftingMode )
if( this.container.isCraftingMode() )
{
return "guis/pattern.png";
}
@@ -169,11 +169,11 @@ public class GuiPatternTerm extends GuiMEMonitorable
{
if( s.isPlayerSide() )
{
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
s.yDisplayPosition = s.getY() + this.ySize - 78 - 5;
}
else
{
s.yDisplayPosition = s.defY + this.ySize - 78 - 3;
s.yDisplayPosition = s.getY() + this.ySize - 78 - 3;
}
}
}
@@ -52,19 +52,19 @@ import appeng.tile.storage.TileDrive;
public class GuiPriority extends AEBaseGui
{
GuiNumberBox priority;
GuiTabButton originalGuiBtn;
private GuiNumberBox priority;
private GuiTabButton originalGuiBtn;
GuiButton plus1;
GuiButton plus10;
GuiButton plus100;
GuiButton plus1000;
GuiButton minus1;
GuiButton minus10;
GuiButton minus100;
GuiButton minus1000;
private GuiButton plus1;
private GuiButton plus10;
private GuiButton plus100;
private GuiButton plus1000;
private GuiButton minus1;
private GuiButton minus10;
private GuiButton minus100;
private GuiButton minus1000;
GuiBridge OriginalGui;
private GuiBridge OriginalGui;
public GuiPriority( final InventoryPlayer inventoryPlayer, final IPriorityHost te )
{
@@ -35,7 +35,7 @@ import appeng.items.contents.QuartzKnifeObj;
public class GuiQuartzKnife extends AEBaseGui
{
GuiTextField name;
private GuiTextField name;
public GuiQuartzKnife( final InventoryPlayer inventoryPlayer, final QuartzKnifeObj te )
{
@@ -36,21 +36,21 @@ import appeng.core.sync.packets.PacketValueConfig;
public class GuiSecurity extends GuiMEMonitorable
{
GuiToggleButton inject;
GuiToggleButton extract;
GuiToggleButton craft;
GuiToggleButton build;
GuiToggleButton security;
private GuiToggleButton inject;
private GuiToggleButton extract;
private GuiToggleButton craft;
private GuiToggleButton build;
private GuiToggleButton security;
public GuiSecurity( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{
super( inventoryPlayer, te, new ContainerSecurity( inventoryPlayer, te ) );
this.customSortOrder = false;
this.reservedSpace = 33;
this.setCustomSortOrder( false );
this.setReservedSpace( 33 );
// increase size so that the slot is over the gui.
this.xSize += 56;
this.standardSize = this.xSize;
this.setStandardSize( this.xSize );
}
@Override
@@ -115,7 +115,7 @@ public class GuiSecurity extends GuiMEMonitorable
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRendererObj.drawString( GuiText.SecurityCardEditor.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
this.fontRendererObj.drawString( GuiText.SecurityCardEditor.getLocal(), 8, this.ySize - 96 + 1 - this.getReservedSpace(), 4210752 );
}
@Override
@@ -123,11 +123,11 @@ public class GuiSecurity extends GuiMEMonitorable
{
final ContainerSecurity cs = (ContainerSecurity) this.inventorySlots;
this.inject.setState( ( cs.security & ( 1 << SecurityPermissions.INJECT.ordinal() ) ) > 0 );
this.extract.setState( ( cs.security & ( 1 << SecurityPermissions.EXTRACT.ordinal() ) ) > 0 );
this.craft.setState( ( cs.security & ( 1 << SecurityPermissions.CRAFT.ordinal() ) ) > 0 );
this.build.setState( ( cs.security & ( 1 << SecurityPermissions.BUILD.ordinal() ) ) > 0 );
this.security.setState( ( cs.security & ( 1 << SecurityPermissions.SECURITY.ordinal() ) ) > 0 );
this.inject.setState( ( cs.getPermissionMode() & ( 1 << SecurityPermissions.INJECT.ordinal() ) ) > 0 );
this.extract.setState( ( cs.getPermissionMode() & ( 1 << SecurityPermissions.EXTRACT.ordinal() ) ) > 0 );
this.craft.setState( ( cs.getPermissionMode() & ( 1 << SecurityPermissions.CRAFT.ordinal() ) ) > 0 );
this.build.setState( ( cs.getPermissionMode() & ( 1 << SecurityPermissions.BUILD.ordinal() ) ) > 0 );
this.security.setState( ( cs.getPermissionMode() & ( 1 << SecurityPermissions.SECURITY.ordinal() ) ) > 0 );
return "guis/security.png";
}
@@ -39,8 +39,8 @@ import appeng.util.Platform;
public class GuiSpatialIOPort extends AEBaseGui
{
final ContainerSpatialIOPort container;
GuiImgButton units;
private final ContainerSpatialIOPort container;
private GuiImgButton units;
public GuiSpatialIOPort( final InventoryPlayer inventoryPlayer, final TileSpatialIOPort te )
{
@@ -75,10 +75,10 @@ public class GuiSpatialIOPort extends AEBaseGui
@Override
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{
this.fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.currentPower, false ), 13, 21, 4210752 );
this.fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( this.container.maxPower, false ), 13, 31, 4210752 );
this.fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.reqPower, false ), 13, 78, 4210752 );
this.fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + ( ( (float) this.container.eff ) / 100 ) + '%', 13, 88, 4210752 );
this.fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getCurrentPower(), false ), 13, 21, 4210752 );
this.fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getMaxPower(), false ), 13, 31, 4210752 );
this.fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getRequiredPower(), false ), 13, 78, 4210752 );
this.fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + ( ( (float) this.container.getEfficency() ) / 100 ) + '%', 13, 88, 4210752 );
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96, 4210752 );
@@ -47,11 +47,11 @@ import appeng.parts.misc.PartStorageBus;
public class GuiStorageBus extends GuiUpgradeable
{
GuiImgButton rwMode;
GuiImgButton storageFilter;
GuiTabButton priority;
GuiImgButton partition;
GuiImgButton clear;
private GuiImgButton rwMode;
private GuiImgButton storageFilter;
private GuiTabButton priority;
private GuiImgButton partition;
private GuiImgButton clear;
public GuiStorageBus( final InventoryPlayer inventoryPlayer, final PartStorageBus te )
{
@@ -85,17 +85,17 @@ public class GuiStorageBus extends GuiUpgradeable
if( this.fuzzyMode != null )
{
this.fuzzyMode.set( this.cvb.fzMode );
this.fuzzyMode.set( this.cvb.getFuzzyMode() );
}
if( this.storageFilter != null )
{
this.storageFilter.set( ( (ContainerStorageBus) this.cvb ).storageFilter );
this.storageFilter.set( ( (ContainerStorageBus) this.cvb ).getStorageFilter() );
}
if( this.rwMode != null )
{
this.rwMode.set( ( (ContainerStorageBus) this.cvb ).rwMode );
this.rwMode.set( ( (ContainerStorageBus) this.cvb ).getReadWriteMode() );
}
}
@@ -46,13 +46,13 @@ import appeng.parts.automation.PartImportBus;
public class GuiUpgradeable extends AEBaseGui
{
final ContainerUpgradeable cvb;
final IUpgradeableHost bc;
protected final ContainerUpgradeable cvb;
protected final IUpgradeableHost bc;
GuiImgButton redstoneMode;
GuiImgButton fuzzyMode;
GuiImgButton craftMode;
GuiImgButton schedulingMode;
protected GuiImgButton redstoneMode;
protected GuiImgButton fuzzyMode;
protected GuiImgButton craftMode;
protected GuiImgButton schedulingMode;
public GuiUpgradeable( final InventoryPlayer inventoryPlayer, final IUpgradeableHost te )
{
@@ -102,22 +102,22 @@ public class GuiUpgradeable extends AEBaseGui
if( this.redstoneMode != null )
{
this.redstoneMode.set( this.cvb.rsMode );
this.redstoneMode.set( this.cvb.getRedStoneMode() );
}
if( this.fuzzyMode != null )
{
this.fuzzyMode.set( this.cvb.fzMode );
this.fuzzyMode.set( this.cvb.getFuzzyMode() );
}
if( this.craftMode != null )
{
this.craftMode.set( this.cvb.cMode );
this.craftMode.set( this.cvb.getCraftingMode() );
}
if( this.schedulingMode != null )
{
this.schedulingMode.set( this.cvb.schedulingMode );
this.schedulingMode.set( this.cvb.getSchedulingMode() );
}
}
@@ -34,8 +34,8 @@ import appeng.tile.misc.TileVibrationChamber;
public class GuiVibrationChamber extends AEBaseGui
{
final ContainerVibrationChamber cvc;
GuiProgressBar pb;
private final ContainerVibrationChamber cvc;
private GuiProgressBar pb;
public GuiVibrationChamber( final InventoryPlayer inventoryPlayer, final TileVibrationChamber te )
{
@@ -59,7 +59,7 @@ public class GuiVibrationChamber extends AEBaseGui
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.pb.setFullMsg( this.cvc.aePerTick * this.cvc.getCurrentProgress() / 100 + " AE/t" );
this.pb.setFullMsg( this.cvc.getAePerTick() * this.cvc.getCurrentProgress() / 100 + " AE/t" );
if( this.cvc.getCurrentProgress() > 0 )
{
@@ -39,7 +39,7 @@ import appeng.util.Platform;
public class GuiWireless extends AEBaseGui
{
GuiImgButton units;
private GuiImgButton units;
public GuiWireless( final InventoryPlayer inventoryPlayer, final TileWireless te )
{
@@ -78,10 +78,10 @@ public class GuiWireless extends AEBaseGui
final ContainerWireless cw = (ContainerWireless) this.inventorySlots;
if( cw.range > 0 )
if( cw.getRange() > 0 )
{
final String firstMessage = GuiText.Range.getLocal() + ": " + ( cw.range / 10.0 ) + " m";
final String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
final String firstMessage = GuiText.Range.getLocal() + ": " + ( cw.getRange() / 10.0 ) + " m";
final String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.getDrain(), true );
final int strWidth = Math.max( this.fontRendererObj.getStringWidth( firstMessage ), this.fontRendererObj.getStringWidth( secondMessage ) );
final int cOffset = ( this.xSize / 2 ) - ( strWidth / 2 );
@@ -29,7 +29,6 @@ public class GuiWirelessTerm extends GuiMEPortableCell
public GuiWirelessTerm( final InventoryPlayer inventoryPlayer, final IPortableCell te )
{
super( inventoryPlayer, te );
this.maxRows = Integer.MAX_VALUE;
}
@Override