Improved readability of variables

Hopefully improved semantics of variables

Fixed typos

Added hyphenations
This commit is contained in:
thatsIch
2014-09-28 11:47:17 +02:00
parent 6b60a0996b
commit 76b147fd5b
220 changed files with 1643 additions and 1662 deletions
@@ -209,7 +209,7 @@ public class ClientHelper extends ServerHelper
}
@Override
public void postinit()
public void postInit()
{
RenderingRegistry.registerBlockHandler( WorldRender.instance );
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
+22 -22
View File
@@ -127,7 +127,7 @@ public abstract class AEBaseGui extends GuiContainer
try
{
((AEBaseContainer) inventorySlots).setTargetStack( item );
InventoryAction direction = wheel > 0 ? InventoryAction.ROLLDOWN : InventoryAction.ROLLUP;
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
int times = Math.abs( wheel );
for (int h = 0; h < times; h++)
{
@@ -176,7 +176,7 @@ public abstract class AEBaseGui extends GuiContainer
ItemStack dbl_whichItem;
Slot bl_clicked;
// dragy
// drag y
Set<Slot> drag_click = new HashSet();
@Override
@@ -187,7 +187,7 @@ public abstract class AEBaseGui extends GuiContainer
if ( slot instanceof SlotFake )
{
InventoryAction action = null;
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
if ( drag_click.size() > 1 )
return;
@@ -283,7 +283,7 @@ public abstract class AEBaseGui extends GuiContainer
switch (key)
{
case 0: // pickup / set-down.
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
break;
case 1:
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
@@ -327,11 +327,11 @@ public abstract class AEBaseGui extends GuiContainer
switch (key)
{
case 0: // pickup / set-down.
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
stack = ((SlotME) slot).getAEStack();
if ( stack != null && action == InventoryAction.PICKUP_OR_SETDOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
action = InventoryAction.AUTOCRAFT;
if ( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
action = InventoryAction.AUTO_CRAFT;
break;
case 1:
@@ -343,7 +343,7 @@ public abstract class AEBaseGui extends GuiContainer
stack = ((SlotME) slot).getAEStack();
if ( stack != null && stack.isCraftable() )
action = InventoryAction.AUTOCRAFT;
action = InventoryAction.AUTO_CRAFT;
else if ( player.capabilities.isCreativeMode )
{
@@ -428,7 +428,7 @@ public abstract class AEBaseGui extends GuiContainer
{
for (Slot dr : drag_click)
{
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SETDOWN : InventoryAction.PLACE_SINGLE,
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE,
dr.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
@@ -724,14 +724,14 @@ public abstract class AEBaseGui extends GuiContainer
return false;
}
protected Slot getSlot(int mousex, int mousey)
protected Slot getSlot(int mouseX, int mouseY)
{
for (int j1 = 0; j1 < this.inventorySlots.inventorySlots.size(); ++j1)
{
Slot slot = (Slot) this.inventorySlots.inventorySlots.get( j1 );
// isPointInRegion
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mousex, mousey ) )
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
{
return slot;
}
@@ -743,11 +743,11 @@ public abstract class AEBaseGui extends GuiContainer
protected static String join(Collection<?> s, String delimiter)
{
StringBuilder builder = new StringBuilder();
Iterator iter = s.iterator();
while (iter.hasNext())
Iterator iterator = s.iterator();
while (iterator.hasNext())
{
builder.append( iter.next() );
if ( !iter.hasNext() )
builder.append( iterator.next() );
if ( !iterator.hasNext() )
{
break;
}
@@ -758,16 +758,16 @@ public abstract class AEBaseGui extends GuiContainer
boolean useNEI = false;
private RenderItem setItemRender(RenderItem aeri2)
private RenderItem setItemRender(RenderItem item)
{
if ( AppEng.instance.isIntegrationEnabled( IntegrationType.NEI ) )
{
return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( aeri2 );
return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( item );
}
else
{
RenderItem ri = itemRender;
itemRender = aeri2;
itemRender = item;
return ri;
}
}
@@ -788,7 +788,7 @@ public abstract class AEBaseGui extends GuiContainer
}
}
AppEngRenderItem aeri = new AppEngRenderItem();
AppEngRenderItem aeRenderItem = new AppEngRenderItem();
protected boolean isPowered()
{
@@ -809,7 +809,7 @@ public abstract class AEBaseGui extends GuiContainer
{
if ( s instanceof SlotME )
{
RenderItem pIR = setItemRender( aeri );
RenderItem pIR = setItemRender( aeRenderItem );
try
{
this.zLevel = 100.0F;
@@ -826,9 +826,9 @@ public abstract class AEBaseGui extends GuiContainer
itemRender.zLevel = 0.0F;
if ( s instanceof SlotME )
aeri.aestack = ((SlotME) s).getAEStack();
aeRenderItem.aeStack = ((SlotME) s).getAEStack();
else
aeri.aestack = null;
aeRenderItem.aeStack = null;
safeDrawSlot( s );
}
@@ -18,11 +18,11 @@ public abstract class AEBaseMEGui extends AEBaseGui
super( container );
}
public List<String> handleItemTooltip(ItemStack stack, int mousex, int mousey, List<String> currenttip)
public List<String> handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip)
{
if ( stack != null )
{
Slot s = getSlot( mousex, mousey );
Slot s = getSlot( mouseX, mouseY );
if ( s instanceof SlotME )
{
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
@@ -41,18 +41,18 @@ public abstract class AEBaseMEGui extends AEBaseGui
if ( myStack != null )
{
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
if ( myStack.getCountRequestable() > 0 )
currenttip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
currentToolTip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
}
else if ( stack.stackSize > BigNumber || (stack.stackSize > 1 && stack.isItemDamaged()) )
{
currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
}
}
}
return currenttip;
return currentToolTip;
}
// Vanilla version...
@@ -78,15 +78,15 @@ public abstract class AEBaseMEGui extends AEBaseGui
if ( myStack != null )
{
List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
currenttip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
currentToolTip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
if ( myStack.getCountRequestable() > 0 )
currenttip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
drawTooltip( x, y, 0, join( currenttip, "\n" ) );
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
}
else if ( stack != null && stack.stackSize > BigNumber )
{
@@ -27,7 +27,7 @@ import appeng.util.Platform;
public class GuiCellWorkbench extends GuiUpgradeable
{
ContainerCellWorkbench ccwb;
ContainerCellWorkbench workbench;
TileCellWorkbench tcw;
GuiImgButton clear;
@@ -36,7 +36,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
public GuiCellWorkbench(InventoryPlayer inventoryPlayer, TileCellWorkbench te) {
super( new ContainerCellWorkbench( inventoryPlayer, te ) );
ccwb = (ContainerCellWorkbench) inventorySlots;
workbench = (ContainerCellWorkbench) inventorySlots;
ySize = 251;
tcw = te;
}
@@ -44,7 +44,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
@Override
protected boolean drawUpgrades()
{
return ccwb.availableUpgrades() > 0;
return workbench.availableUpgrades() > 0;
}
@Override
@@ -62,17 +62,17 @@ public class GuiCellWorkbench extends GuiUpgradeable
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
if ( drawUpgrades() )
{
if ( ccwb.availableUpgrades() <= 8 )
if ( workbench.availableUpgrades() <= 8 )
{
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + ccwb.availableUpgrades() * 18 );
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (ccwb.availableUpgrades()) * 18), 177, 151, 35, 7 );
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + workbench.availableUpgrades() * 18 );
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (workbench.availableUpgrades()) * 18), 177, 151, 35, 7 );
}
else if ( ccwb.availableUpgrades() <= 16 )
else if ( workbench.availableUpgrades() <= 16 )
{
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 );
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (8) * 18), 177, 151, 35, 7 );
int dx = ccwb.availableUpgrades() - 8;
int dx = workbench.availableUpgrades() - 8;
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
if ( dx == 8 )
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
@@ -88,7 +88,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 );
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (8) * 18), 186, 151, 35 - 8, 7 );
int dx = ccwb.availableUpgrades() - 16;
int dx = workbench.availableUpgrades() - 16;
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
if ( dx == 8 )
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
@@ -150,10 +150,10 @@ public class GuiCellWorkbench extends GuiUpgradeable
protected void handleButtonVisibility()
{
copyMode.setState( ccwb.copyMode == CopyMode.CLEAR_ON_REMOVE );
copyMode.setState( workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
boolean hasFuzzy = false;
IInventory inv = ccwb.getCellUpgradeInventory();
IInventory inv = workbench.getCellUpgradeInventory();
for (int x = 0; x < inv.getSizeInventory(); x++)
{
ItemStack is = inv.getStackInSlot( x );
@@ -84,7 +84,7 @@ public class GuiCraftConfirm extends AEBaseGui
GuiButton cancel;
GuiButton start;
GuiButton selectcpu;
GuiButton selectCPU;
@Override
public void initGui()
@@ -95,10 +95,10 @@ public class GuiCraftConfirm extends AEBaseGui
start.enabled = false;
buttonList.add( start );
selectcpu = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
selectCPU = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
+ GuiText.Automatic );
selectcpu.enabled = false;
buttonList.add( selectcpu );
selectCPU.enabled = false;
buttonList.add( selectCPU );
if ( OriginalGui != null )
cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
@@ -123,7 +123,7 @@ public class GuiCraftConfirm extends AEBaseGui
if ( ccc.noCPU )
btnTextText = GuiText.NoCraftingCPUs.getLocal();
selectcpu.displayString = btnTextText;
selectCPU.displayString = btnTextText;
}
@Override
@@ -133,7 +133,7 @@ public class GuiCraftConfirm extends AEBaseGui
boolean backwards = Mouse.isButtonDown( 1 );
if ( btn == selectcpu )
if ( btn == selectCPU )
{
try
{
@@ -315,25 +315,25 @@ public class GuiCraftConfirm extends AEBaseGui
updateCPUButtonText();
start.enabled = ccc.noCPU || isSimulation() ? false : true;
selectcpu.enabled = isSimulation() ? false : true;
selectCPU.enabled = isSimulation() ? false : true;
int x = 0;
int y = 0;
int gx = (width - xSize) / 2;
int gy = (height - ySize) / 2;
int yoff = 23;
int offY = 23;
tooltip = -1;
for (int z = 0; z <= 4 * 5; z++)
{
int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * yoff;
int minY = gy + 22 + y * offY;
if ( minX < mouse_x && minX + 67 > mouse_x )
{
if ( minY < mouse_y && minY + yoff - 2 > mouse_y )
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
{
tooltip = z;
break;
@@ -223,18 +223,18 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int gx = (width - xSize) / 2;
int gy = (height - ySize) / 2;
int yoff = 23;
int offY = 23;
tooltip = -1;
for (int z = 0; z <= 4 * 5; z++)
{
int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * yoff;
int minY = gy + 22 + y * offY;
if ( minX < mouse_x && minX + 67 > mouse_x )
{
if ( minY < mouse_y && minY + yoff - 2 > mouse_y )
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
{
tooltip = z;
break;
@@ -30,7 +30,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
{
ContainerCraftingStatus ccc;
GuiButton selectcpu;
GuiButton selectCPU;
GuiTabButton originalGuiBtn;
GuiBridge OriginalGui;
@@ -74,7 +74,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
boolean backwards = Mouse.isButtonDown( 1 );
if ( btn == selectcpu )
if ( btn == selectCPU )
{
try
{
@@ -110,9 +110,9 @@ public class GuiCraftingStatus extends GuiCraftingCPU
{
super.initGui();
selectcpu = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
// selectcpu.enabled = false;
buttonList.add( selectcpu );
selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
// selectCPU.enabled = false;
buttonList.add( selectCPU );
if ( myIcon != null )
{
@@ -139,7 +139,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
if ( ccc.noCPU )
btnTextText = GuiText.NoCraftingJobs.getLocal();
selectcpu.displayString = btnTextText;
selectCPU.displayString = btnTextText;
}
@Override
@@ -183,12 +183,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
{
lines.add( n );
ArrayList<ClientDCInternalInv> lset = new ArrayList();
lset.addAll( byName.get( n ) );
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList();
clientInventories.addAll( byName.get( n ) );
Collections.sort( lset );
Collections.sort( clientInventories );
for (ClientDCInternalInv i : lset)
for (ClientDCInternalInv i : clientInventories)
{
lines.add( i );
}
@@ -13,7 +13,7 @@ import appeng.tile.crafting.TileMolecularAssembler;
public class GuiMAC extends GuiUpgradeable
{
ContainerMAC cmac;
ContainerMAC container;
GuiProgressBar pb;
@Override
@@ -37,7 +37,7 @@ public class GuiMAC extends GuiUpgradeable
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
{
pb.max = 100;
pb.current = cmac.craftProgress;
pb.current = container.craftProgress;
pb.FullMsg = pb.current + "%";
super.drawFG( offsetX, offsetY, mouseX, mouseY );
@@ -58,7 +58,7 @@ public class GuiMAC extends GuiUpgradeable
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) {
super( new ContainerMAC( inventoryPlayer, te ) );
this.ySize = 197;
this.cmac = (ContainerMAC) this.inventorySlots;
this.container = (ContainerMAC) this.inventorySlots;
}
protected GuiText getName()
@@ -62,7 +62,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
GuiText myName;
int xoffset = 9;
int offsetX = 9;
int perRow = 9;
int reservedSpace = 0;
int lowerTextureOffset = 0;
@@ -83,7 +83,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
boolean viewCell;
ItemStack myCurrentViewCells[] = new ItemStack[5];
ContainerMEMonitorable mecontainer;
ContainerMEMonitorable monitorableContainer;
public GuiMEMonitorable(InventoryPlayer inventoryPlayer, ITerminalHost te) {
this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) );
@@ -104,7 +104,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
standardSize = xSize;
configSrc = ((IConfigurableObject) inventorySlots).getConfigManager();
(mecontainer = (ContainerMEMonitorable) inventorySlots).gui = this;
(monitorableContainer = (ContainerMEMonitorable) inventorySlots).gui = this;
viewCell = te instanceof IViewCellStorage;
@@ -180,7 +180,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
for (int x = 0; x < perRow; x++)
{
meSlots.add( new InternalSlotME( repo, x + y * perRow, xoffset + x * 18, 18 + y * 18 ) );
meSlots.add( new InternalSlotME( repo, x + y * perRow, offsetX + x * 18, 18 + y * 18 ) );
}
}
@@ -226,7 +226,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
.getSetting( Settings.TERMINAL_STYLE ) ) );
}
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, offsetX ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
searchField.setEnableBackgroundDrawing( false );
searchField.setMaxStringLength( 25 );
searchField.setTextColor( 0xFFFFFF );
@@ -373,7 +373,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
@Override
public void updateScreen()
{
repo.setPower( mecontainer.hasPower );
repo.setPower( monitorableContainer.hasPower );
super.updateScreen();
}
@@ -399,10 +399,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
for (int i = 0; i < 5; i++)
{
if ( myCurrentViewCells[i] != mecontainer.cellView[i].getStack() )
if ( myCurrentViewCells[i] != monitorableContainer.cellView[i].getStack() )
{
update = true;
myCurrentViewCells[i] = mecontainer.cellView[i].getStack();
myCurrentViewCells[i] = monitorableContainer.cellView[i].getStack();
}
}
@@ -213,11 +213,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
// @Override - NEI
public List<String> handleItemTooltip(ItemStack stack, int mousex, int mousey, List<String> currenttip)
public List<String> handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip)
{
if ( stack != null )
{
Slot s = getSlot( mousex, mousey );
Slot s = getSlot( mouseX, mouseY );
if ( s instanceof SlotME )
{
IAEItemStack myStack = null;
@@ -233,13 +233,13 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
if ( myStack != null )
{
while (currenttip.size() > 1)
currenttip.remove( 1 );
while (currentToolTip.size() > 1)
currentToolTip.remove( 1 );
}
}
}
return currenttip;
return currentToolTip;
}
// Vanilla version...
@@ -261,15 +261,15 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
if ( myStack != null )
{
List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
while (currenttip.size() > 1)
currenttip.remove( 1 );
while (currentToolTip.size() > 1)
currentToolTip.remove( 1 );
currenttip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) );
currenttip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
currentToolTip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) );
currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
drawTooltip( x, y, 0, join( currenttip, "\n" ) );
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
}
}
// super.drawItemStackTooltip( stack, x, y );
@@ -73,7 +73,7 @@ public class GuiPriority extends AEBaseGui
if ( target instanceof PartFormationPlane )
{
myIcon = AEApi.instance().parts().partFormationPlane.stack( 1 );
OriginalGui = GuiBridge.GUI_FPLANE;
OriginalGui = GuiBridge.GUI_FORMATION_PLANE;
}
if ( target instanceof TileDrive )
@@ -17,13 +17,13 @@ import appeng.util.Platform;
public class GuiSpatialIOPort extends AEBaseGui
{
ContainerSpatialIOPort csiop;
ContainerSpatialIOPort container;
GuiImgButton units;
public GuiSpatialIOPort(InventoryPlayer inventoryPlayer, TileSpatialIOPort te) {
super( new ContainerSpatialIOPort( inventoryPlayer, te ) );
this.ySize = 199;
csiop = (ContainerSpatialIOPort) inventorySlots;
container = (ContainerSpatialIOPort) inventorySlots;
}
@Override
@@ -59,10 +59,10 @@ public class GuiSpatialIOPort extends AEBaseGui
@Override
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
{
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.currentPower, false ), 13, 21, 4210752 );
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( csiop.maxPower, false ), 13, 31, 4210752 );
fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.reqPower, false ), 13, 78, 4210752 );
fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) csiop.eff) / 100) + "%", 13, 88, 4210752 );
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( container.currentPower, false ), 13, 21, 4210752 );
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( container.maxPower, false ), 13, 31, 4210752 );
fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( container.reqPower, false ), 13, 78, 4210752 );
fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) container.eff) / 100) + "%", 13, 88, 4210752 );
fontRendererObj.drawString( getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96, 4210752 );
@@ -64,13 +64,13 @@ public class GuiWireless extends AEBaseGui
if ( cw.range > 0 )
{
String msga = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m";
String msgb = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
String firstMessage = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m";
String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
int strWidth = Math.max( fontRendererObj.getStringWidth( msga ), fontRendererObj.getStringWidth( msgb ) );
int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) );
int cOffset = (this.xSize / 2) - (strWidth / 2);
fontRendererObj.drawString( msga, cOffset, 20, 4210752 );
fontRendererObj.drawString( msgb, cOffset, 20 + 12, 4210752 );
fontRendererObj.drawString( firstMessage, cOffset, 20, 4210752 );
fontRendererObj.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
}
}
+6 -6
View File
@@ -122,9 +122,9 @@ public class ItemRepo
view.ensureCapacity( list.size() );
dsp.ensureCapacity( list.size() );
Enum vmode = sortSrc.getSortDisplay();
Enum mode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
if ( mode == SearchBoxMode.NEI_AUTOSEARCH || mode == SearchBoxMode.NEI_MANUAL_SEARCH )
Enum viewMode = sortSrc.getSortDisplay();
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
if ( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
updateNEI( searchString );
innerSearch = searchString;
@@ -164,16 +164,16 @@ public class ItemRepo
continue;
}
if ( vmode == ViewItems.CRAFTABLE && !is.isCraftable() )
if ( viewMode == ViewItems.CRAFTABLE && !is.isCraftable() )
continue;
if ( vmode == ViewItems.CRAFTABLE )
if ( viewMode == ViewItems.CRAFTABLE )
{
is = is.copy();
is.setStackSize( 0 );
}
if ( vmode == ViewItems.STORED && is.getStackSize() == 0 )
if ( viewMode == ViewItems.STORED && is.getStackSize() == 0 )
continue;
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
@@ -14,7 +14,7 @@ import appeng.core.AEConfig;
public class AppEngRenderItem extends RenderItem
{
public IAEItemStack aestack;
public IAEItemStack aeStack;
private void renderQuad(Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
{
@@ -83,7 +83,7 @@ public class AppEngRenderItem extends RenderItem
GL11.glEnable( GL11.GL_DEPTH_TEST );
}
long amount = aestack != null ? aestack.getStackSize() : is.stackSize;
long amount = aeStack != null ? aeStack.getStackSize() : is.stackSize;
if ( amount > 999999999999L )
amount = 999999999999L;
@@ -255,9 +255,9 @@ public class BaseBlockRender
this( false, 20 );
}
public BaseBlockRender(boolean enableTESR, double TESRrange) {
public BaseBlockRender(boolean enableTESR, double tileEntitySpecialRendererRange) {
hasTESR = enableTESR;
MAX_DISTANCE = TESRrange;
MAX_DISTANCE = tileEntitySpecialRendererRange;
setOriMap();
}
@@ -587,52 +587,52 @@ public class BaseBlockRender
Tessellator tess = Tessellator.instance;
double offsetX = 0.0, offsetY = 0.0, offsetZ = 0.0;
double layaX = 0.0, layaY = 0.0, layaZ = 0.0;
double laybX = 0.0, laybY = 0.0, laybZ = 0.0;
double layerAX = 0.0, layerAY = 0.0, layerAZ = 0.0;
double layerBX = 0.0, layerBY = 0.0, layerBZ = 0.0;
boolean flip = false;
switch (orientation)
{
case NORTH:
layaX = 1.0;
laybY = 1.0;
layerAX = 1.0;
layerBY = 1.0;
flip = true;
break;
case SOUTH:
layaX = 1.0;
laybY = 1.0;
layerAX = 1.0;
layerBY = 1.0;
offsetZ = 1.0;
break;
case EAST:
flip = true;
layaZ = 1.0;
laybY = 1.0;
layerAZ = 1.0;
layerBY = 1.0;
offsetX = 1.0;
break;
case WEST:
layaZ = 1.0;
laybY = 1.0;
layerAZ = 1.0;
layerBY = 1.0;
break;
case UP:
flip = true;
layaX = 1.0;
laybZ = 1.0;
layerAX = 1.0;
layerBZ = 1.0;
offsetY = 1.0;
break;
case DOWN:
layaX = 1.0;
laybZ = 1.0;
layerAX = 1.0;
layerBZ = 1.0;
break;
default:
@@ -643,25 +643,25 @@ public class BaseBlockRender
offsetY += y;
offsetZ += z;
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0, 1.0,
// v -> v
0, edgeThickness, ico, flip );
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0.0, edgeThickness,
// v -> v
edgeThickness, 1.0 - edgeThickness, ico, flip );
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
1.0 - edgeThickness, 1.0,
// v -> v
edgeThickness, 1.0 - edgeThickness, ico, flip );
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0, 1.0,
// v -> v
@@ -209,14 +209,14 @@ public class BusRenderHelper implements IPartRenderHelper
}
@Override
public void setBounds(float minx, float miny, float minz, float maxx, float maxy, float maxz)
public void setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
{
minX = minx;
minY = miny;
minZ = minz;
maxX = maxx;
maxY = maxy;
maxZ = maxz;
this.minX = minX;
this.minY = minY;
this.minZ = minZ;
this.maxX = maxX;
this.maxY = maxY;
this.maxZ = maxZ;
}
public double getBound(ForgeDirection side)
@@ -19,7 +19,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class TESRWrapper extends TileEntitySpecialRenderer
{
final public RenderBlocks rbinstance = new RenderBlocks();
final public RenderBlocks renderBlocksInstance = new RenderBlocks();
final BaseBlockRender blkRender;
final double MAX_DISTANCE;
@@ -51,8 +51,8 @@ public class TESRWrapper extends TileEntitySpecialRenderer
GL11.glPushMatrix();
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
rbinstance.blockAccess = te.getWorldObj();
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, rbinstance );
renderBlocksInstance.blockAccess = te.getWorldObj();
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, renderBlocksInstance );
if ( Platform.isDrawing( tess ) )
throw new RuntimeException( "Error during rendering." );
@@ -45,7 +45,7 @@ public class RenderBlockCrank extends BaseBlockRender
}
@Override
public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks rbinstance)
public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderBlocks)
{
TileCrank tc = (TileCrank) tile;
if ( tc.getUp() == null || tc.getUp() == ForgeDirection.UNKNOWN )
@@ -69,16 +69,16 @@ public class RenderBlockCrank extends BaseBlockRender
tess.setTranslation( -tc.xCoord, -tc.yCoord, -tc.zCoord );
tess.startDrawingQuads();
rbinstance.renderAllFaces = true;
rbinstance.blockAccess = tc.getWorldObj();
renderBlocks.renderAllFaces = true;
renderBlocks.blockAccess = tc.getWorldObj();
rbinstance.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
renderBlocks.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
rbinstance.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 );
renderBlocks.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 );
rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
tess.draw();
tess.setTranslation( 0, 0, 0 );
@@ -144,17 +144,17 @@ public class RenderBlockInscriber extends BaseBlockRender
float press = 0.2f;
float base = 0.4f;
long lprogress = 0;
long absoluteProgress = 0;
if ( inv.smash )
{
long currentTime = System.currentTimeMillis();
lprogress = currentTime - inv.clientStart;
if ( lprogress > 800 )
absoluteProgress = currentTime - inv.clientStart;
if ( absoluteProgress > 800 )
inv.smash = false;
}
float rprogress = (float) (lprogress % 800) / 400.0f;
float progress = rprogress;
float relativeProgress = (float) (absoluteProgress % 800) / 400.0f;
float progress = relativeProgress;
if ( progress > 1.0f )
progress = 1.0f - (progress - 1.0f);
@@ -197,7 +197,7 @@ public class RenderBlockInscriber extends BaseBlockRender
if ( inv.getStackInSlot( 2 ) != null )
items++;
if ( rprogress > 1.0f || items == 0 )
if ( relativeProgress > 1.0f || items == 0 )
{
ItemStack is = inv.getStackInSlot( 3 );
@@ -2,6 +2,7 @@ package appeng.client.render.blocks;
import java.util.EnumSet;
import appeng.helpers.Splotch;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
@@ -12,7 +13,6 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.texture.ExtraBlockTextures;
import appeng.helpers.Splot;
import appeng.tile.misc.TilePaint;
public class RenderBlockPaint extends BaseBlockRender
@@ -42,9 +42,9 @@ public class RenderBlockPaint extends BaseBlockRender
Tessellator tess = Tessellator.instance;
int lumen = 14 << 20 | 14 << 4;
int worldb = imb.getMixedBrightnessForBlock( world, x, y, z );
int brightness = imb.getMixedBrightnessForBlock( world, x, y, z );
double offoff = 0.001;
double offsetConstant = 0.001;
EnumSet<ForgeDirection> validSides = EnumSet.noneOf( ForgeDirection.class );
@@ -54,7 +54,7 @@ public class RenderBlockPaint extends BaseBlockRender
validSides.add( side );
}
for (Splot s : tp.getDots())
for (Splotch s : tp.getDots())
{
if ( !validSides.contains( s.side ) )
continue;
@@ -67,11 +67,11 @@ public class RenderBlockPaint extends BaseBlockRender
else
{
tess.setColorOpaque_I( s.color.mediumVariant );
tess.setBrightness( worldb );
tess.setBrightness( brightness );
}
double offset = offoff;
offoff += 0.001;
double offset = offsetConstant;
offsetConstant += 0.001;
double H = 0.1;
@@ -39,13 +39,13 @@ public class RenderBlockSkyChest extends BaseBlockRender
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
float lidangle = 0.0f;
float lidAngle = 0.0f;
GL11.glScalef( 1.0F, -1F, -1F );
GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
model.chestLid.offsetY = -(0.9f / 16.0f);
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
model.renderAll();
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
@@ -100,12 +100,12 @@ public class RenderBlockSkyChest extends BaseBlockRender
if ( skyChest.lidAngle < 0.0f )
skyChest.lidAngle = 0.0f;
float lidangle = skyChest.lidAngle;
lidangle = 1.0F - lidangle;
lidangle = 1.0F - lidangle * lidangle * lidangle;
float lidAngle = skyChest.lidAngle;
lidAngle = 1.0F - lidAngle;
lidAngle = 1.0F - lidAngle * lidAngle * lidAngle;
model.chestLid.offsetY = -(1.01f / 16.0f);
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
model.renderAll();
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
@@ -30,9 +30,9 @@ public class RenderBlockWireless extends BaseBlockRender
public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj)
{
this.blk = blk;
cenx = 0;
ceny = 0;
cenz = 0;
centerX = 0;
centerY = 0;
centerZ = 0;
hasChan = false;
hasPower = false;
BlockRenderInfo ri = blk.getRendererInstance();
@@ -83,9 +83,9 @@ public class RenderBlockWireless extends BaseBlockRender
}
}
int cenx = 0;
int ceny = 0;
int cenz = 0;
int centerX = 0;
int centerY = 0;
int centerZ = 0;
AEBaseBlock blk;
boolean hasChan = false;
boolean hasPower = false;
@@ -118,9 +118,9 @@ public class RenderBlockWireless extends BaseBlockRender
renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz );
super.renderInWorld( blk, world, x, y, z, renderer );
cenx = x;
ceny = y;
cenz = z;
centerX = x;
centerY = y;
centerZ = z;
ri.setTemporaryRenderIcon( null );
renderTorchAtAngle( renderer, fdx, fdy, fdz );
@@ -235,14 +235,14 @@ public class RenderBlockWireless extends BaseBlockRender
Tessellator.instance.setColorOpaque_I( 0xffffff );
renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z );
renderFace( cenx, ceny, cenz, blk, sides, renderer, y );
renderFace( cenx, ceny, cenz, blk, sides, renderer, y.getOpposite() );
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y );
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y.getOpposite() );
renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z );
renderFace( cenx, ceny, cenz, blk, sides, renderer, x );
renderFace( cenx, ceny, cenz, blk, sides, renderer, x.getOpposite() );
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x );
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x.getOpposite() );
renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z );
renderFace( cenx, ceny, cenz, blk, r, renderer, z );
renderFace( centerX, centerY, centerZ, blk, r, renderer, z );
}
}
@@ -237,16 +237,16 @@ public class RenderDrive extends BaseBlockRender
if ( stat != 0 )
{
IIcon wico = ExtraBlockTextures.White.getIcon();
u1 = wico.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 );
u2 = wico.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 );
u3 = wico.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 );
u4 = wico.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 );
IIcon whiteIcon = ExtraBlockTextures.White.getIcon();
u1 = whiteIcon.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 );
u2 = whiteIcon.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 );
u3 = whiteIcon.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 );
u4 = whiteIcon.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 );
v1 = wico.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 );
v2 = wico.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 );
v3 = wico.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 );
v4 = wico.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 );
v1 = whiteIcon.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 );
v2 = whiteIcon.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 );
v3 = whiteIcon.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 );
v4 = whiteIcon.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 );
if ( sp.isPowered() )
tess.setBrightness( 15 << 20 | 15 << 4 );
@@ -68,26 +68,26 @@ public class RenderMEChest extends BaseBlockRender
Tessellator.instance.setBrightness( b );
Tessellator.instance.setColorOpaque_I( 0xffffff );
FlippableIcon fico = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) )
fico.setFlip( true, false );
flippableIcon.setFlip( true, false );
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST )
fico.setFlip( false, true );
flippableIcon.setFlip( false, true );
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.WEST )
fico.setFlip( true, false );
flippableIcon.setFlip( true, false );
else if ( forward == ForgeDirection.DOWN && up == ForgeDirection.EAST )
fico.setFlip( false, true );
flippableIcon.setFlip( false, true );
else if ( forward == ForgeDirection.DOWN )
fico.setFlip( true, false );
flippableIcon.setFlip( true, false );
/*
* 1.7.2
*
* else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) fico.setFlip( true, false ); else if (
* forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) fico.setFlip( true, false );
* else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false ); else if (
* forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false );
*/
renderFace( x, y, z, imb, fico, renderer, forward );
renderFace( x, y, z, imb, flippableIcon, renderer, forward );
if ( stat != 0 )
{
@@ -74,9 +74,9 @@ public class RenderQNB extends BaseBlockRender
@Override
public void renderInventory(AEBaseBlock block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] obj)
{
float px = 2.0f / 16.0f;
float maxpx = 14.0f / 16.0f;
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
float minPx = 2.0f / 16.0f;
float maxPx = 14.0f / 16.0f;
renderer.setRenderBounds( minPx, minPx, minPx, maxPx, maxPx, maxPx );
super.renderInventory( block, item, renderer, type, obj );
}
@@ -94,20 +94,20 @@ public class RenderQNB extends BaseBlockRender
{
if ( tqb.isFormed() )
{
AEColoredItemDefinition cabldef = AEApi.instance().parts().partCableGlass;
Item cable = cabldef.item( AEColor.Transparent );
AEColoredItemDefinition glassCableDefinition = AEApi.instance().parts().partCableGlass;
Item transparentGlassCable = glassCableDefinition.item( AEColor.Transparent );
AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered;
Item ccable = ccabldef.item( AEColor.Transparent );
AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered;
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
EnumSet<ForgeDirection> sides = tqb.getConnections();
renderCableAt( 0.11D, world, x, y, z, block, renderer, cable.getIconIndex( cabldef.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
renderCableAt( 0.11D, world, x, y, z, block, renderer, transparentGlassCable.getIconIndex( glassCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
}
float px = 2.0f / 16.0f;
float maxpx = 14.0f / 16.0f;
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
float renderMin = 2.0f / 16.0f;
float renderMax = 14.0f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
renderer.renderStandardBlock( block, x, y, z );
// super.renderWorldBlock(world, x, y, z, block, modelId, renderer);
}
@@ -115,9 +115,9 @@ public class RenderQNB extends BaseBlockRender
{
if ( !tqb.isFormed() )
{
float px = 2.0f / 16.0f;
float maxpx = 14.0f / 16.0f;
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
float renderMin = 2.0f / 16.0f;
float renderMax = 14.0f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
renderer.renderStandardBlock( block, x, y, z );
}
else if ( tqb.isCorner() )
@@ -125,24 +125,24 @@ public class RenderQNB extends BaseBlockRender
// renderCableAt(0.11D, world, x, y, z, block, modelId,
// renderer,
// AppEngTextureRegistry.Blocks.MECable.get(), true, 0.0D);
AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered;
Item ccable = ccabldef.item( AEColor.Transparent );
AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered;
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.05D,
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.05D,
tqb.getConnections() );
float px = 4.0f / 16.0f;
float maxpx = 12.0f / 16.0f;
float renderMin = 4.0f / 16.0f;
float renderMax = 12.0f / 16.0f;
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
renderer.renderStandardBlock( block, x, y, z );
if ( tqb.isPowered() )
{
px = 3.9f / 16.0f;
maxpx = 12.1f / 16.0f;
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
renderMin = 3.9f / 16.0f;
renderMax = 12.1f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
int bn = 15;
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
@@ -154,22 +154,22 @@ public class RenderQNB extends BaseBlockRender
}
else
{
float px = 2.0f / 16.0f;
float maxpx = 14.0f / 16.0f;
renderer.setRenderBounds( 0, px, px, 1, maxpx, maxpx );
float renderMin = 2.0f / 16.0f;
float renderMax = 14.0f / 16.0f;
renderer.setRenderBounds( 0, renderMin, renderMin, 1, renderMax, renderMax );
renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( px, 0, px, maxpx, 1, maxpx );
renderer.setRenderBounds( renderMin, 0, renderMin, renderMax, 1, renderMax );
renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( px, px, 0, maxpx, maxpx, 1 );
renderer.setRenderBounds( renderMin, renderMin, 0, renderMax, renderMax, 1 );
renderer.renderStandardBlock( block, x, y, z );
if ( tqb.isPowered() )
{
px = -0.01f / 16.0f;
maxpx = 16.01f / 16.0f;
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
renderMin = -0.01f / 16.0f;
renderMax = 16.01f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
int bn = 15;
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
@@ -32,9 +32,9 @@ public class RenderQuartzTorch extends BaseBlockRender
float Point13 = 10.0f / 16.0f;
float Point12 = 9.0f / 16.0f;
float Onepx = 1.0f / 16.0f;
float rbottom = 5.0f / 16.0f;
float rtop = 10.0f / 16.0f;
float singlePixel = 1.0f / 16.0f;
float renderBottom = 5.0f / 16.0f;
float renderTop = 10.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float top = 8.0f / 16.0f;
@@ -43,13 +43,13 @@ public class RenderQuartzTorch extends BaseBlockRender
float yOff = 0.0f;
float zOff = 0.0f;
renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff );
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff );
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff );
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff );
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
@@ -86,9 +86,9 @@ public class RenderQuartzTorch extends BaseBlockRender
float Point13 = 10.0f / 16.0f;
float Point12 = 9.0f / 16.0f;
float Onepx = 1.0f / 16.0f;
float rbottom = 5.0f / 16.0f;
float rtop = 10.0f / 16.0f;
float singlePixel = 1.0f / 16.0f;
float renderBottom = 5.0f / 16.0f;
float renderTop = 10.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float top = 8.0f / 16.0f;
@@ -106,24 +106,24 @@ public class RenderQuartzTorch extends BaseBlockRender
zOff = forward.offsetZ * -(4.0f / 16.0f);
}
renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff );
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
super.renderInWorld( block, world, x, y, z, renderer );
int r = (x + y + z) % 2;
if ( r == 0 )
{
renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff );
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
super.renderInWorld( block, world, x, y, z, renderer );
renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff );
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff );
super.renderInWorld( block, world, x, y, z, renderer );
}
else
{
renderer.setRenderBounds( Point3 + xOff, rbottom - Onepx + yOff, Point3 + zOff, Point3 + Onepx + xOff, rbottom + yOff, Point3 + Onepx + zOff );
renderer.setRenderBounds( Point3 + xOff, renderBottom - singlePixel + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderBottom + yOff, Point3 + singlePixel + zOff );
super.renderInWorld( block, world, x, y, z, renderer );
renderer.setRenderBounds( Point12 - Onepx + xOff, rtop + yOff, Point12 - Onepx + zOff, Point12 + xOff, rtop + Onepx + yOff, Point12 + zOff );
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderTop + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderTop + singlePixel + yOff, Point12 + zOff );
super.renderInWorld( block, world, x, y, z, renderer );
}
@@ -44,14 +44,14 @@ public class RenderSpatialPylon extends BaseBlockRender
if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_X )
{
ori = ForgeDirection.EAST;
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
{
renderer.uvRotateEast = 1;
renderer.uvRotateWest = 2;
renderer.uvRotateTop = 2;
renderer.uvRotateBottom = 1;
}
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
{
renderer.uvRotateEast = 2;
renderer.uvRotateWest = 1;
@@ -70,7 +70,7 @@ public class RenderSpatialPylon extends BaseBlockRender
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Y )
{
ori = ForgeDirection.UP;
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
{
renderer.uvRotateNorth = 3;
renderer.uvRotateSouth = 3;
@@ -82,12 +82,12 @@ public class RenderSpatialPylon extends BaseBlockRender
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Z )
{
ori = ForgeDirection.NORTH;
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
{
renderer.uvRotateSouth = 1;
renderer.uvRotateNorth = 2;
}
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
{
renderer.uvRotateNorth = 1;
renderer.uvRotateSouth = 2;
@@ -112,7 +112,7 @@ public class RenderSpatialPylon extends BaseBlockRender
boolean r = renderer.renderStandardBlock( imb, x, y, z );
if ( (displayBits & sp.DISPLAY_POWEREDENABLED) == sp.DISPLAY_POWEREDENABLED )
if ( (displayBits & sp.DISPLAY_POWERED_ENABLED) == sp.DISPLAY_POWERED_ENABLED )
{
int bn = 15;
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
@@ -159,10 +159,10 @@ public class RenderSpatialPylon extends BaseBlockRender
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
return ExtraBlockTextures.BlockSpatialPylonC.getIcon();
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
return blk.getIcon( 0, 0 );
@@ -178,10 +178,10 @@ public class RenderSpatialPylon extends BaseBlockRender
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
return good ? ExtraBlockTextures.BlockSpatialPylonC_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonC_red.getIcon();
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
return blk.getIcon( 0, 0 );
@@ -68,29 +68,29 @@ public class CraftingFx extends EntityBreakingFX
float f9 = this.particleTextureIndex.getMaxV();
float scale = 0.1F * this.particleScale;
float offx = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick);
float offy = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick);
float offz = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick);
float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick);
float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick);
float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick);
float f14 = 1.0F;
int blkX = MathHelper.floor_double( offx );
int blkY = MathHelper.floor_double( offy );
int blkZ = MathHelper.floor_double( offz );
int blkX = MathHelper.floor_double( offX );
int blkY = MathHelper.floor_double( offY );
int blkZ = MathHelper.floor_double( offZ );
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
{
offx -= interpPosX;
offy -= interpPosY;
offz -= interpPosZ;
offX -= interpPosX;
offY -= interpPosY;
offZ -= interpPosZ;
// AELog.info( "" + partialTick );
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( (double) (offx - x * scale - rx * scale), (double) (offy - y * scale), (double) (offz - z * scale - rz * scale),
par1Tessellator.addVertexWithUV( (double) (offX - x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ - z * scale - rz * scale),
(double) f7, (double) f9 );
par1Tessellator.addVertexWithUV( (double) (offx - x * scale + rx * scale), (double) (offy + y * scale), (double) (offz - z * scale + rz * scale),
par1Tessellator.addVertexWithUV( (double) (offX - x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ - z * scale + rz * scale),
(double) f7, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (offx + x * scale + rx * scale), (double) (offy + y * scale), (double) (offz + z * scale + rz * scale),
par1Tessellator.addVertexWithUV( (double) (offX + x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ + z * scale + rz * scale),
(double) f6, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (offx + x * scale - rx * scale), (double) (offy - y * scale), (double) (offz + z * scale - rz * scale),
par1Tessellator.addVertexWithUV( (double) (offX + x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ + z * scale - rz * scale),
(double) f6, (double) f9 );
}
}
@@ -27,7 +27,7 @@ public enum CableBusTextures
PartPatternTerm_Bright("PartPatternTerm_Bright"), PartPatternTerm_Colored("PartPatternTerm_Colored"), PartPatternTerm_Dark("PartPatternTerm_Dark"),
PartConvMonitor_Bright("PartConvMonitor_Bright"), PartConvMonitor_Colored("PartConvMonitor_Colored"), PartConvMonitor_Dark("PartConvMonitor_Dark"),
PartConversionMonitor_Bright("PartConversionMonitor_Bright"), PartConversionMonitor_Colored("PartConversionMonitor_Colored"), PartConversionMonitor_Dark("PartConversionMonitor_Dark"),
PartInterfaceTerm_Bright("PartInterfaceTerm_Bright"), PartInterfaceTerm_Colored("PartInterfaceTerm_Colored"), PartInterfaceTerm_Dark(
"PartInterfaceTerm_Dark"),