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
+7 -7
View File
@@ -372,7 +372,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
if ( memCardIS != null && useStandardMemoryCard() && memCardIS.getItem() instanceof IMemoryCard )
{
IMemoryCard memc = (IMemoryCard) memCardIS.getItem();
IMemoryCard memoryCard = (IMemoryCard) memCardIS.getItem();
ItemStack is = getItemStack( PartItemStack.Network );
@@ -387,21 +387,21 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
NBTTagCompound data = downloadSettings( SettingsFrom.MEMORY_CARD );
if ( data != null )
{
memc.setMemoryCardContents( memCardIS, name, data );
memc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
memoryCard.setMemoryCardContents( memCardIS, name, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
}
}
else
{
String storedName = memc.getSettingsName( memCardIS );
NBTTagCompound data = memc.getData( memCardIS );
String storedName = memoryCard.getSettingsName( memCardIS );
NBTTagCompound data = memoryCard.getData( memCardIS );
if ( name.equals( storedName ) )
{
uploadSettings( SettingsFrom.MEMORY_CARD, data );
memc.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
}
else
memc.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
}
return true;
}
@@ -431,7 +431,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
return null;
}
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(boolean ignoreCableConnections, boolean includeFacades, Entity e, boolean visual)
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(boolean ignoreCableConnections, boolean includeFacades, Entity e, boolean visual)
{
List<AxisAlignedBB> boxes = new LinkedList<AxisAlignedBB>();
@@ -83,7 +83,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
if ( Platform.isClient() )
return true;
Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_FPLANE );
Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_FORMATION_PLANE );
return true;
}
@@ -117,7 +117,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
}
@MENetworkEventSubscribe
public void updateChannels(MENetworkChannelsChanged chann)
public void updateChannels(MENetworkChannelsChanged changedChannels)
{
boolean currentActive = proxy.isActive();
if ( wasActive != currentActive )
@@ -270,7 +270,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
if ( Platform.isClient() )
return true;
Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_LEVELEMITTER );
Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_LEVEL_EMITTER );
return true;
}
@@ -363,17 +363,17 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
// rh.renderInventoryBox( renderer );
}
double cenx;
double ceny;
double cenz;
double centerX;
double centerY;
double centerZ;
public void addVertexWithUV(double x, double y, double z, double u, double v)
{
Tessellator var12 = Tessellator.instance;
x -= cenx;
y -= ceny;
z -= cenz;
x -= centerX;
y -= centerY;
z -= centerZ;
if ( side == ForgeDirection.DOWN )
{
@@ -411,9 +411,9 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
y = m;
}
x += cenx;// + orientation.offsetX * 0.4;
y += ceny;// + orientation.offsetY * 0.4;
z += cenz;// + orientation.offsetZ * 0.4;
x += centerX;// + orientation.offsetX * 0.4;
y += centerY;// + orientation.offsetY * 0.4;
z += centerZ;// + orientation.offsetZ * 0.4;
var12.addVertexWithUV( x, y, z, u, v );
}
@@ -439,9 +439,9 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
IIcon offTexture = is.getIconIndex();
IIcon IIcon = (isOn ? CableBusTextures.LevelEmitterTorchOn.getIcon() : offTexture);
//
cenx = baseX + 0.5;
ceny = baseY + 0.5;
cenz = baseZ + 0.5;
centerX = baseX + 0.5;
centerY = baseY + 0.5;
centerZ = baseZ + 0.5;
baseY += 7.0 / 16.0;
;
@@ -16,7 +16,7 @@ import appeng.util.Platform;
public class UpgradeInventory extends AppEngInternalInventory implements IAEAppEngInventory
{
private final Object itemorblock;
private final Object itemOrBlock;
private final IAEAppEngInventory parent;
private boolean cached = false;
@@ -31,7 +31,7 @@ public class UpgradeInventory extends AppEngInternalInventory implements IAEAppE
super( null, s );
te = this;
parent = _te;
itemorblock = itemOrBlock;
this.itemOrBlock = itemOrBlock;
}
@Override
@@ -68,17 +68,17 @@ public class UpgradeInventory extends AppEngInternalInventory implements IAEAppE
Integer max = null;
for (ItemStack is : u.getSupported().keySet())
{
if ( is.getItem() == itemorblock )
if ( is.getItem() == itemOrBlock )
{
max = u.getSupported().get( is );
break;
}
else if ( is.getItem() instanceof ItemBlock && Block.getBlockFromItem( is.getItem() ) == itemorblock )
else if ( is.getItem() instanceof ItemBlock && Block.getBlockFromItem( is.getItem() ) == itemOrBlock )
{
max = u.getSupported().get( is );
break;
}
else if ( itemorblock instanceof ItemStack && Platform.isSameItem( (ItemStack) itemorblock, is ) )
else if ( itemOrBlock instanceof ItemStack && Platform.isSameItem( (ItemStack) itemOrBlock, is ) )
{
max = u.getSupported().get( is );
break;
@@ -14,12 +14,12 @@ public class InvLayerData
// cache of inventory state.
final private int sides[][];
final private List<ISidedInventory> invs;
final private List<ISidedInventory> inventories;
final private List<InvSot> slots;
public InvLayerData(int a[][], List<ISidedInventory> b, List<InvSot> c) {
sides = a;
invs = b;
inventories = b;
slots = c;
}
@@ -34,10 +34,10 @@ public class InvLayerData
return slots != null && slot >= 0 && slot < slots.size();
}
public ItemStack decrStackSize(int slot, int amount)
public ItemStack decreaseStackSize(int slot, int amount)
{
if ( isSlotValid( slot ) )
return slots.get( slot ).decrStackSize( amount );
return slots.get( slot ).decreaseStackSize( amount );
return null;
}
@@ -90,9 +90,9 @@ public class InvLayerData
public void markDirty()
{
if ( invs != null )
if ( inventories != null )
{
for (IInventory inv : invs)
for (IInventory inv : inventories)
inv.markDirty();
}
}
@@ -14,7 +14,7 @@ public class InvSot
index = slot;
}
public ItemStack decrStackSize(int j)
public ItemStack decreaseStackSize(int j)
{
return partInv.decrStackSize( index, j );
}
@@ -85,7 +85,7 @@ public class LayerIEnergySink extends LayerBase implements IEnergySink
interested++;
}
}
return interested == 1;// if more then one tile is interested we need to abandonship...
return interested == 1;// if more then one tile is interested we need to abandon...
}
@Override
@@ -84,7 +84,7 @@ public class LayerIEnergySource extends LayerBase implements IEnergySource
interested++;
}
}
return interested == 1;// if more then one tile is interested we need to abandonship...
return interested == 1;// if more then one tile is interested we need to abandon...
}
@Override
@@ -39,10 +39,10 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
{
// cache of inventory state.
int sideData[][] = null;
List<ISidedInventory> invs = null;
List<ISidedInventory> inventories = null;
List<InvSot> slots = null;
invs = new ArrayList();
inventories = new ArrayList();
int slotCount = 0;
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
@@ -52,13 +52,13 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
{
ISidedInventory part = (ISidedInventory) bp;
slotCount += part.getSizeInventory();
invs.add( part );
inventories.add( part );
}
}
if ( invs.isEmpty() || slotCount == 0 )
if ( inventories.isEmpty() || slotCount == 0 )
{
invs = null;
inventories = null;
sideData = null;
slots = null;
}
@@ -69,7 +69,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
int offsetForLayer = 0;
int offsetForPart = 0;
for (ISidedInventory sides : invs)
for (ISidedInventory sides : inventories)
{
offsetForPart = 0;
slotCount = sides.getSizeInventory();
@@ -94,7 +94,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
if ( sideData == null || slots == null )
invLayer = null;
else
invLayer = new InvLayerData( sideData, invs, slots );
invLayer = new InvLayerData( sideData, inventories, slots );
// make sure inventory is updated before we call FMP.
super.notifyNeighbors();
@@ -106,7 +106,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
if ( invLayer == null )
return null;
return invLayer.decrStackSize( slot, amount );
return invLayer.decreaseStackSize( slot, amount );
}
@Override
@@ -72,13 +72,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
@MENetworkEventSubscribe
public void stateChange(MENetworkChannelsChanged c)
{
duality.notifyNeightbors();
duality.notifyNeighbors();
}
@MENetworkEventSubscribe
public void stateChange(MENetworkPowerStatusChange c)
{
duality.notifyNeightbors();
duality.notifyNeighbors();
}
@Override
@@ -98,7 +98,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@MENetworkEventSubscribe
public void updateChannels(MENetworkChannelsChanged chann)
public void updateChannels(MENetworkChannelsChanged changedChannels)
{
updateStatus();
}
@@ -340,21 +340,21 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
private void checkInterfaceVsStorageBus(TileEntity target, ForgeDirection side)
{
IInterfaceHost achiv = null;
IInterfaceHost achievement = null;
if ( target instanceof IInterfaceHost )
achiv = (IInterfaceHost) target;
achievement = (IInterfaceHost) target;
if ( target instanceof IPartHost )
{
Object part = ((IPartHost) target).getPart( side );
if ( part instanceof IInterfaceHost )
achiv = (IInterfaceHost) part;
achievement = (IInterfaceHost) part;
}
if ( achiv != null )
if ( achievement != null )
{
Platform.addStat( achiv.getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() );
Platform.addStat( achievement.getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() );
Platform.addStat( getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() );
}
}
@@ -312,7 +312,7 @@ public class PartCable extends AEBasePart implements IPartCable
EnumSet<ForgeDirection> myC = connections.clone();
boolean wasPowered = powered;
powered = false;
boolean chchanged = false;
boolean channelsChanged = false;
for (ForgeDirection d : ForgeDirection.values())
{
@@ -321,7 +321,7 @@ public class PartCable extends AEBasePart implements IPartCable
int ch = (sideOut >> (d.ordinal() * 4)) & 0xF;
if ( ch != channelsOnSide[d.ordinal()] )
{
chchanged = true;
channelsChanged = true;
channelsOnSide[d.ordinal()] = ch;
}
}
@@ -342,7 +342,7 @@ public class PartCable extends AEBasePart implements IPartCable
}
}
return !myC.equals( connections ) || wasPowered != powered || chchanged;
return !myC.equals( connections ) || wasPowered != powered || channelsChanged;
}
@Override
@@ -450,15 +450,15 @@ public class PartCable extends AEBasePart implements IPartCable
public void renderGlassConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost gh = te instanceof IGridHost ? (IGridHost) te : null;
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
if ( gh != null && ccph != null && gh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( ccph.getColor() ) );
else if ( ccph == null && gh != null && gh.getCableConnectionType( of ) != AECableType.GLASS )
if ( gh != null && partHost != null && gh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( partHost.getColor() ) );
else if ( partHost == null && gh != null && gh.getCableConnectionType( of ) != AECableType.GLASS )
{
rh.setTexture( getCoveredTexture( getCableColor() ) );
switch (of)
@@ -562,15 +562,15 @@ public class PartCable extends AEBasePart implements IPartCable
public void renderCoveredConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isSmart = false;
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
if ( ghh != null && ccph != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null
&& ccph.getColor() != AEColor.Transparent )
rh.setTexture( getGlassTexture( ccph.getColor() ) );
else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS )
if ( ghh != null && partHost != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && partHost.getPart( of.getOpposite() ) == null
&& partHost.getColor() != AEColor.Transparent )
rh.setTexture( getGlassTexture( partHost.getColor() ) );
else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS )
{
rh.setTexture( getCoveredTexture( getCableColor() ) );
switch (of)
@@ -601,10 +601,10 @@ public class PartCable extends AEBasePart implements IPartCable
rh.setTexture( getTexture( getCableColor() ) );
}
else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.COVERED && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getCoveredTexture( ccph.getColor() ) );
else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.SMART && ccph.getPart( of.getOpposite() ) == null )
else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.COVERED && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getCoveredTexture( partHost.getColor() ) );
else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.SMART && partHost.getPart( of.getOpposite() ) == null )
{
isSmart = true;
rh.setTexture( getSmartTexture( getCableColor() ) );
@@ -642,8 +642,8 @@ public class PartCable extends AEBasePart implements IPartCable
if ( isSmart )
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -654,11 +654,11 @@ public class PartCable extends AEBasePart implements IPartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -668,23 +668,23 @@ public class PartCable extends AEBasePart implements IPartCable
}
@SideOnly(Side.CLIENT)
public void renderSmartConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
public void renderSmartConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = getCableColor();
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
if ( ghh != null && ccph != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null
&& ccph.getColor() != AEColor.Transparent )
if ( ghh != null && partHost != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && partHost.getPart( of.getOpposite() ) == null
&& partHost.getColor() != AEColor.Transparent )
{
isGlass = true;
rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) );
rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) );
}
else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of.getOpposite() ) != AECableType.GLASS )
else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of.getOpposite() ) != AECableType.GLASS )
{
rh.setTexture( getSmartTexture( myColor ) );
switch (of)
@@ -715,8 +715,8 @@ public class PartCable extends AEBasePart implements IPartCable
if ( true )
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -727,11 +727,11 @@ public class PartCable extends AEBasePart implements IPartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -740,9 +740,9 @@ public class PartCable extends AEBasePart implements IPartCable
rh.setTexture( getTexture( getCableColor() ) );
}
else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getSmartTexture( myColor = ccph.getColor() ) );
else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getSmartTexture( myColor = partHost.getColor() ) );
else
rh.setTexture( getSmartTexture( getCableColor() ) );
@@ -777,16 +777,16 @@ public class PartCable extends AEBasePart implements IPartCable
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -867,9 +867,9 @@ public class PartCable extends AEBasePart implements IPartCable
else if ( connections.contains( dir ) )
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost gh = te instanceof IGridHost ? (IGridHost) te : null;
if ( ccph == null && gh != null && gh.getCableConnectionType( dir ) != AECableType.GLASS )
if ( partHost == null && gh != null && gh.getCableConnectionType( dir ) != AECableType.GLASS )
requireDetailed = true;
}
}
@@ -109,19 +109,19 @@ public class PartCableCovered extends PartCable
GL11.glTranslated( -0.0, -0.0, 0.3 );
rh.setBounds( 5.0f, 5.0f, 2.0f, 11.0f, 11.0f, 14.0f );
float offu = 0;
float offv = 9;
float offU = 0;
float offV = 9;
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
rh.renderInventoryFace( main, side, renderer );
}
offu = 9;
offv = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
offU = 9;
offV = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -70,12 +70,12 @@ public class PartCableSmart extends PartCable
{
GL11.glTranslated( -0.0, -0.0, 0.3 );
float offu = 0;
float offv = 9;
float offU = 0;
float offV = 9;
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
@@ -85,11 +85,11 @@ public class PartCableSmart extends PartCable
rh.renderInventoryFace( ch2, side, renderer );
}
offu = 9;
offv = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
offU = 9;
offV = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -207,8 +207,8 @@ public class PartCableSmart extends PartCable
rh.renderBlock( x, y, z, renderer );
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -219,11 +219,11 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -237,7 +237,7 @@ public class PartCableSmart extends PartCable
{
for (ForgeDirection of : connections)
{
renderSmartConection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
}
rh.setTexture( getCoveredTexture( getCableColor() ) );
@@ -258,11 +258,11 @@ public class PartCableSmart extends PartCable
IIcon def = getTexture( getCableColor() );
IIcon off = new OffsetIcon( def, 0, -12 );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon offa = new OffsetIcon( defa, 0, -12 );
IIcon firstTaughtIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstOffsetIcon = new OffsetIcon( firstTaughtIcon, 0, -12 );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon offb = new OffsetIcon( defb, 0, -12 );
IIcon secondTaughtIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondOffsetIcon = new OffsetIcon( secondTaughtIcon, 0, -12 );
switch (selectedSide)
{
@@ -280,11 +280,11 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, offa, offa, offa, offa );
rh.setTexture( firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, offb, offb, offb, offb );
rh.setTexture( secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case EAST:
@@ -306,21 +306,21 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
FlippableIcon fpA = new FlippableIcon( defa );
FlippableIcon fpB = new FlippableIcon( defb );
FlippableIcon fpA = new FlippableIcon( firstTaughtIcon );
FlippableIcon fpB = new FlippableIcon( secondTaughtIcon );
fpA = new FlippableIcon( defa );
fpB = new FlippableIcon( defb );
fpA = new FlippableIcon( firstTaughtIcon );
fpB = new FlippableIcon( secondTaughtIcon );
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, offa, offa, defa, fpA );
rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, offb, offb, defb, fpB );
rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH:
@@ -337,11 +337,11 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, defa, defa, offa, offa );
rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, defb, defb, offb, offb );
rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
default:
@@ -85,12 +85,12 @@ public class PartDenseCable extends PartCable
GL11.glTranslated( -0.0, -0.0, 0.3 );
rh.setBounds( 4.0f, 4.0f, 2.0f, 12.0f, 12.0f, 14.0f );
float offu = 0;
float offv = 9;
float offU = 0;
float offV = 9;
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
@@ -99,11 +99,11 @@ public class PartDenseCable extends PartCable
rh.renderInventoryFace( ch2, side, renderer );
}
offu = 9;
offv = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
offU = 9;
offV = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -227,22 +227,22 @@ public class PartDenseCable extends PartCable
public void renderDenseConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = getCableColor();
/*
* ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getPart(
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) );
* } else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
* ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getPart(
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) );
* } else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN: rh.setBounds( 3, 0, 3, 13, 4, 13 );
* break; case EAST: rh.setBounds( 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13, 13, 4
* ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 ); break; case UP: rh.setBounds( 3, 12, 3, 13, 16,
* 13 ); break; case WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; } rh.renderBlock( x, y,
* z, renderer );
*
* if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon defa = new TaughtIcon( getChannelTex(
* channels, false ).getIcon(), -0.2f ); IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(),
* if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon firstIcon = new TaughtIcon( getChannelTex(
* channels, false ).getIcon(), -0.2f ); IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(),
* -0.2f );
*
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { AEBaseBlock blk = (AEBaseBlock)
@@ -250,11 +250,11 @@ public class PartDenseCable extends PartCable
* false, true ); }
*
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.instance.setColorOpaque_I(
* myColor.mediumVariant ); rh.setTexture( defa, defa, defa, defa, defa, defa ); renderAllFaces( (AEBaseBlock)
* myColor.mediumVariant ); rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock)
* rh.getBlock(), x, y, z, renderer );
*
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( defb, defb, defb, defb, defb,
* defb ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon,
* secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
*
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
* renderer.uvRotateTop = renderer.uvRotateWest = 0; }
@@ -263,9 +263,9 @@ public class PartDenseCable extends PartCable
*/
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of, of.getOpposite() ) ) );
if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( myColor = ccph.getColor() ) );
if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( myColor = partHost.getColor() ) );
else
rh.setTexture( getTexture( getCableColor() ) );
@@ -300,16 +300,16 @@ public class PartDenseCable extends PartCable
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -339,7 +339,7 @@ public class PartDenseCable extends PartCable
if ( isDense( of ) )
renderDenseConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
else if ( isSmart( of ) )
renderSmartConection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
else
renderCoveredConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
}
@@ -362,11 +362,11 @@ public class PartDenseCable extends PartCable
IIcon def = getTexture( getCableColor() );
IIcon off = new OffsetIcon( def, 0, -12 );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon offa = new OffsetIcon( defa, 0, -12 );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstOffset = new OffsetIcon( firstIcon, 0, -12 );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon offb = new OffsetIcon( defb, 0, -12 );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondOffset = new OffsetIcon( secondIcon, 0, -12 );
switch (selectedSide)
{
@@ -384,11 +384,11 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, offa, offa, offa, offa );
rh.setTexture( firstIcon, firstIcon, firstOffset, firstOffset, firstOffset, firstOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, offb, offb, offb, offb );
rh.setTexture( secondIcon, secondIcon, secondOffset, secondOffset, secondOffset, secondOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case EAST:
@@ -410,21 +410,18 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
FlippableIcon fpA = new FlippableIcon( defa );
FlippableIcon fpB = new FlippableIcon( defb );
fpA = new FlippableIcon( defa );
fpB = new FlippableIcon( defb );
FlippableIcon fpA = new FlippableIcon( firstIcon );
FlippableIcon fpB = new FlippableIcon( secondIcon );
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, offa, offa, defa, fpA );
rh.setTexture( firstOffset, firstOffset, firstOffset, firstOffset, firstIcon, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, offb, offb, defb, fpB );
rh.setTexture( secondOffset, secondOffset, secondOffset, secondOffset, secondIcon, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH:
@@ -441,11 +438,11 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, defa, defa, offa, offa );
rh.setTexture( firstOffset, firstOffset, firstIcon, firstIcon, firstOffset, firstOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, defb, defb, offb, offb );
rh.setTexture( secondOffset, secondOffset, secondIcon, secondIcon, secondOffset, secondOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
default:
@@ -1,5 +1,6 @@
package appeng.parts.p2p;
import appeng.integration.abstraction.helpers.BaseMJPerdition;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -18,7 +19,6 @@ import appeng.core.settings.TickRates;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IMJ5;
import appeng.integration.abstraction.IMJ6;
import appeng.integration.abstraction.helpers.BaseMJperdition;
import appeng.me.GridAccessException;
import appeng.me.cache.helpers.TunnelCollection;
import appeng.transformer.annotations.integration.Interface;
@@ -40,7 +40,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPowerReceptor, ISidedBatteryProvider, IBatteryObject, IGridTickable
{
BaseMJperdition pp;
BaseMJPerdition pp;
public TunnelType getTunnelType()
{
@@ -55,7 +55,7 @@ public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPo
if ( AppEng.instance.isIntegrationEnabled( IntegrationType.MJ5 ) )
{
pp = (BaseMJperdition) ((IMJ5) AppEng.instance.getIntegration( IntegrationType.MJ5 )).createPerdition( this );
pp = (BaseMJPerdition) ((IMJ5) AppEng.instance.getIntegration( IntegrationType.MJ5 )).createPerdition( this );
if ( pp != null )
pp.configure( 1, 380, 1.0f / 5.0f, 1000 );
}
@@ -75,18 +75,18 @@ public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPo
if ( !output && proxy.isActive() )
{
float totalRequiredPower = 0.0f;
TunnelCollection<PartP2PBCPower> tunnelset;
TunnelCollection<PartP2PBCPower> tunnels;
try
{
tunnelset = getOutputs();
tunnels = getOutputs();
}
catch (GridAccessException e)
{
return TickRateModulation.IDLE;
}
for (PartP2PBCPower o : tunnelset)
for (PartP2PBCPower o : tunnels)
{
IPowerReceptor target = o.getPowerTarget();
if ( target != null )
@@ -94,14 +94,14 @@ public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPo
PowerReceiver tp = target.getPowerReceiver( side.getOpposite() );
if ( tp != null )
{
double howmuch = tp.powerRequest();
double request = tp.powerRequest();
if ( howmuch > tp.getMaxEnergyReceived() )
howmuch = tp.getMaxEnergyReceived();
if ( request > tp.getMaxEnergyReceived() )
request = tp.getMaxEnergyReceived();
if ( howmuch > 0.01 && howmuch > tp.getMinEnergyReceived() )
if ( request > 0.01 && request > tp.getMinEnergyReceived() )
{
totalRequiredPower += howmuch;
totalRequiredPower += request;
}
}
}
@@ -114,7 +114,7 @@ public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPo
if ( currentTotal < 0.01 )
return TickRateModulation.SLOWER;
for (PartP2PBCPower o : tunnelset)
for (PartP2PBCPower o : tunnels)
{
IPowerReceptor target = o.getPowerTarget();
if ( target != null )
@@ -122,14 +122,14 @@ public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPo
PowerReceiver tp = target.getPowerReceiver( side.getOpposite() );
if ( tp != null )
{
double howmuch = tp.powerRequest();
double request = tp.powerRequest();
if ( howmuch > tp.getMaxEnergyReceived() )
howmuch = tp.getMaxEnergyReceived();
if ( request > tp.getMaxEnergyReceived() )
request = tp.getMaxEnergyReceived();
if ( howmuch > 0.01 && howmuch > tp.getMinEnergyReceived() )
if ( request > 0.01 && request > tp.getMinEnergyReceived() )
{
double toPull = currentTotal * (howmuch / totalRequiredPower);
double toPull = currentTotal * (request / totalRequiredPower);
double pulled = pp.useEnergy( 0, toPull, true );
QueueTunnelDrain( PowerUnits.MJ, pulled );
@@ -204,7 +204,7 @@ public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPo
public PowerReceiver getPowerReceiver(ForgeDirection side)
{
if ( side.equals( side ) )
return ((BaseMJperdition) pp).getPowerReceiver();
return ((BaseMJPerdition) pp).getPowerReceiver();
return null;
}
@@ -93,10 +93,10 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
{
for (PartP2PLiquids l : getOutputs())
{
IFluidHandler targ = l.getTarget();
if ( targ != null )
IFluidHandler handler = l.getTarget();
if ( handler != null )
{
if ( targ.canFill( l.side.getOpposite(), input ) )
if ( handler.canFill( l.side.getOpposite(), input ) )
outs.add( l );
}
}
@@ -114,9 +114,9 @@ public class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements cof
{
if ( Platform.getRandomInt() % 2 > 0 )
{
int recv = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate );
maxReceive -= recv;
total += recv;
int receiver = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate );
maxReceive -= receiver;
total += receiver;
if ( maxReceive <= 0 )
break;
@@ -127,9 +127,9 @@ public class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements cof
{
for (PartP2PRFPower t : getOutputs())
{
int recv = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate );
maxReceive -= recv;
total += recv;
int receiver = t.getOutput().receiveEnergy( t.side.getOpposite(), maxReceive, simulate );
maxReceive -= receiver;
total += receiver;
if ( maxReceive <= 0 )
break;
@@ -118,7 +118,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
}
mc.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
}
else if ( tt != null ) // attune-ment
else if ( tt != null ) // attunement
{
ItemStack newType = null;
@@ -268,12 +268,12 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
if ( freq == 0 )
return null;
PartP2PTunnel tunn;
PartP2PTunnel tunnel;
try
{
tunn = proxy.getP2P().getInput( freq );
if ( getClass().isInstance( tunn ) )
return (T) tunn;
tunnel = proxy.getP2P().getInput( freq );
if ( getClass().isInstance( tunnel ) )
return (T) tunnel;
}
catch (GridAccessException e)
{
@@ -23,10 +23,10 @@ public class PartConversionMonitor extends PartStorageMonitor
public PartConversionMonitor(ItemStack is) {
super( PartConversionMonitor.class, is );
frontBright = CableBusTextures.PartConvMonitor_Bright;
frontColored = CableBusTextures.PartConvMonitor_Colored;
frontDark = CableBusTextures.PartConvMonitor_Dark;
// frontSolid = CableBusTextures.PartConvMonitor_Solid;
frontBright = CableBusTextures.PartConversionMonitor_Bright;
frontColored = CableBusTextures.PartConversionMonitor_Colored;
frontDark = CableBusTextures.PartConversionMonitor_Dark;
// frontSolid = CableBusTextures.PartConversionMonitor_Solid;
}
@Override
@@ -105,14 +105,14 @@ public class PartPatternTerminal extends PartTerminal implements IAEAppEngInvent
for (int x = 0; x < crafting.getSizeInventory() && x < details.getInputs().length; x++)
{
IAEItemStack aeis = details.getInputs()[x];
crafting.setInventorySlotContents( x, aeis == null ? null : aeis.getItemStack() );
IAEItemStack item = details.getInputs()[x];
crafting.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
}
for (int x = 0; x < output.getSizeInventory() && x < details.getOutputs().length; x++)
{
IAEItemStack aeis = details.getOutputs()[x];
output.setInventorySlotContents( x, aeis == null ? null : aeis.getItemStack() );
IAEItemStack item = details.getOutputs()[x];
output.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
}
}
}