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

View file

@ -60,8 +60,8 @@ import cpw.mods.fml.relauncher.SideOnly;
public class AEBaseBlock extends BlockContainer implements IAEFeature
{
private String FeatureFullname;
private String FeatureSubname;
private String featureFullName;
private String featureSubName;
private AEFeatureHandler feature;
private Class<? extends TileEntity> tileEntityType = null;
@ -79,7 +79,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override
public String toString()
{
return FeatureFullname;
return featureFullName;
}
@SideOnly(Side.CLIENT)
@ -178,14 +178,14 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
protected void setTileEntity(Class<? extends TileEntity> c)
{
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
GameRegistry.registerTileEntity( tileEntityType = c, FeatureFullname );
GameRegistry.registerTileEntity( tileEntityType = c, featureFullName );
isInventory = IInventory.class.isAssignableFrom( c );
setTileProvider( hasBlockTileEntity() );
}
protected void setFeature(EnumSet<AEFeature> f)
{
feature = new AEFeatureHandler( f, this, FeatureSubname );
feature = new AEFeatureHandler( f, this, featureSubName );
}
protected AEBaseBlock(Class<?> c, Material mat) {
@ -203,7 +203,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
}
protected AEBaseBlock(Class<?> c, Material mat, String subname) {
protected AEBaseBlock(Class<?> c, Material mat, String subName) {
super( mat );
if ( mat == AEGlassMaterial.instance )
@ -215,8 +215,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
else
setStepSound( Block.soundTypeMetal );
FeatureFullname = AEFeatureHandler.getName( c, subname );
FeatureSubname = subname;
featureFullName = AEFeatureHandler.getName( c, subName );
featureSubName = subName;
}
@Override
@ -689,7 +689,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
if ( is.getItem() instanceof IMemoryCard && !(this instanceof BlockCableBus) )
{
IMemoryCard memc = (IMemoryCard) is.getItem();
IMemoryCard memoryCard = (IMemoryCard) is.getItem();
if ( player.isSneaking() )
{
AEBaseTile t = getTileEntity( w, x, y, z );
@ -699,24 +699,24 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
if ( data != null )
{
memc.setMemoryCardContents( is, name, data );
memc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
memoryCard.setMemoryCardContents( is, name, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
return true;
}
}
}
else
{
String name = memc.getSettingsName( is );
NBTTagCompound data = memc.getData( is );
String name = memoryCard.getSettingsName( is );
NBTTagCompound data = memoryCard.getData( is );
if ( getUnlocalizedName().equals( name ) )
{
AEBaseTile t = getTileEntity( w, x, y, z );
t.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 false;
}
}

View file

@ -31,7 +31,7 @@ public class BlockCellWorkbench extends AEBaseBlock
if ( tg != null )
{
if ( Platform.isServer() )
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELLWORKBENCH );
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELL_WORKBENCH );
return true;
}
return false;

View file

@ -52,15 +52,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
if ( !AEConfig.instance.enableEffects )
return;
TileQuartzGrowthAccelerator tqga = getTileEntity( w, x, y, z );
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = getTileEntity( w, x, y, z );
if ( tqga != null && tqga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
{
double d0 = (double) (r.nextFloat() - 0.5F);
double d1 = (double) (r.nextFloat() - 0.5F);
ForgeDirection up = tqga.getUp();
ForgeDirection forward = tqga.getForward();
ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
ForgeDirection west = Platform.crossProduct( forward, up );
double rx = 0.5 + x;

View file

@ -127,19 +127,19 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
{
if ( !w.isRemote )
{
EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() );
entitytntprimed.fuse = w.rand.nextInt( entitytntprimed.fuse / 4 ) + entitytntprimed.fuse / 8;
w.spawnEntityInWorld( entitytntprimed );
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() );
primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8;
w.spawnEntityInWorld( primedTinyTNTEntity );
}
}
public void startFuse(World w, int x, int y, int z, EntityLivingBase ignitor)
public void startFuse(World w, int x, int y, int z, EntityLivingBase igniter)
{
if ( !w.isRemote )
{
EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, ignitor );
w.spawnEntityInWorld( entitytntprimed );
w.playSoundAtEntity( entitytntprimed, "game.tnt.primed", 1.0F, 1.0F );
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, igniter );
w.spawnEntityInWorld( primedTinyTNTEntity );
w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F );
}
}

View file

@ -39,7 +39,7 @@ public class BlockVibrationChamber extends AEBaseBlock
TileVibrationChamber tc = getTileEntity( w, x, y, z );
if ( tc != null && !player.isSneaking() )
{
Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATIONCHAMBER );
Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATION_CHAMBER );
return true;
}
}

View file

@ -92,10 +92,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
@SideOnly(Side.CLIENT)
public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer)
{
Object pobj = cb( world, target.blockX, target.blockY, target.blockZ );
if ( pobj instanceof IPartHost )
Object object = cb( world, target.blockX, target.blockY, target.blockZ );
if ( object instanceof IPartHost )
{
IPartHost host = (IPartHost) pobj;
IPartHost host = (IPartHost) object;
for (ForgeDirection side : ForgeDirection.values())
{
@ -138,10 +138,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
@SideOnly(Side.CLIENT)
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
{
Object pobj = cb( world, x, y, z );
if ( pobj instanceof IPartHost )
Object object = cb( world, x, y, z );
if ( object instanceof IPartHost )
{
IPartHost host = (IPartHost) pobj;
IPartHost host = (IPartHost) object;
for (ForgeDirection side : ForgeDirection.values())
{

View file

@ -54,7 +54,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
}
@Override
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber)
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber)
{
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
if ( bridge != null )

View file

@ -30,7 +30,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
}
@Override
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber)
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber)
{
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
if ( bridge != null )

View file

@ -113,11 +113,11 @@ public class OreQuartz extends AEBaseBlock
}
@Override
public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockid, float something, int meta)
public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockID, float something, int meta)
{
super.dropBlockAsItemWithChance( w, x, y, z, blockid, something, meta );
super.dropBlockAsItemWithChance( w, x, y, z, blockID, something, meta );
if ( getItemDropped( blockid, w.rand, meta ) != Item.getItemFromBlock( this ) )
if ( getItemDropped( blockID, w.rand, meta ) != Item.getItemFromBlock( this ) )
{
int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );

View file

@ -40,7 +40,7 @@ public class BlockSpatialIOPort extends AEBaseBlock
if ( tg != null )
{
if ( Platform.isServer() )
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIALIOPORT );
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT );
return true;
}
return false;

View file

@ -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() );

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 );
}

View file

@ -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 )
{

View file

@ -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 );

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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 );
}

View file

@ -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()

View file

@ -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();
}
}

View file

@ -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 );

View file

@ -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 )

View file

@ -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 );

View file

@ -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 );
}
}

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 );

View file

@ -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;

View file

@ -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

View file

@ -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)

View file

@ -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." );

View file

@ -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 );

View file

@ -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 );

View file

@ -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;

View file

@ -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 */);

View file

@ -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 );
}
}

View file

@ -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 );

View file

@ -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 )
{

View file

@ -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 );

View file

@ -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 );
}

View file

@ -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 );

View file

@ -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 );
}
}

View file

@ -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"),

View file

@ -610,11 +610,11 @@ public abstract class AEBaseContainer extends Container
{
if ( f.isAnnotationPresent( GuiSync.class ) )
{
GuiSync anno = f.getAnnotation( GuiSync.class );
if ( syncData.containsKey( anno.value() ) )
AELog.warning( "Channel already in use: " + anno.value() + " for " + f.getName() );
GuiSync annotation = f.getAnnotation( GuiSync.class );
if ( syncData.containsKey( annotation.value() ) )
AELog.warning( "Channel already in use: " + annotation.value() + " for " + f.getName() );
else
syncData.put( anno.value(), new SyncDat( this, f, anno ) );
syncData.put( annotation.value(), new SyncDat( this, f, annotation ) );
}
}
}
@ -718,7 +718,7 @@ public abstract class AEBaseContainer extends Container
switch (action)
{
case PICKUP_OR_SETDOWN:
case PICKUP_OR_SET_DOWN:
if ( hand == null )
s.putStack( null );
@ -736,7 +736,7 @@ public abstract class AEBaseContainer extends Container
}
break;
case SPLIT_OR_PLACESINGLE:
case SPLIT_OR_PLACE_SINGLE:
ItemStack is = s.getStack();
if ( is != null )
@ -815,7 +815,7 @@ public abstract class AEBaseContainer extends Container
adp.addItems( ais.getItemStack() );
}
break;
case ROLLDOWN:
case ROLL_DOWN:
if ( powerSrc == null || cellInv == null )
return;
@ -842,7 +842,7 @@ public abstract class AEBaseContainer extends Container
}
break;
case ROLLUP:
case ROLL_UP:
case PICKUP_SINGLE:
if ( powerSrc == null || cellInv == null )
return;
@ -850,13 +850,13 @@ public abstract class AEBaseContainer extends Container
if ( slotItem != null )
{
int liftQty = 1;
ItemStack isgg = player.inventory.getItemStack();
ItemStack item = player.inventory.getItemStack();
if ( isgg != null )
if ( item != null )
{
if ( isgg.stackSize >= isgg.getMaxStackSize() )
if ( item.stackSize >= item.getMaxStackSize() )
liftQty = 0;
if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), isgg ) )
if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), item ) )
liftQty = 0;
}
@ -878,7 +878,7 @@ public abstract class AEBaseContainer extends Container
}
}
break;
case PICKUP_OR_SETDOWN:
case PICKUP_OR_SET_DOWN:
if ( powerSrc == null || cellInv == null )
return;
@ -908,7 +908,7 @@ public abstract class AEBaseContainer extends Container
}
break;
case SPLIT_OR_PLACESINGLE:
case SPLIT_OR_PLACE_SINGLE:
if ( powerSrc == null || cellInv == null )
return;

View file

@ -4,7 +4,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
/*
* Totaly useless container that does nothing.
* Totally useless container that does nothing.
*/
public class ContainerNull extends Container
{

View file

@ -22,11 +22,11 @@ public class SyncDat
private int channel;
public SyncDat(AEBaseContainer container, Field field, GuiSync anno) {
public SyncDat(AEBaseContainer container, Field field, GuiSync annotation) {
clientVersion = null;
this.source = container;
this.field = field;
channel = anno.value();
channel = annotation.value();
}
public int getChannel()

View file

@ -195,10 +195,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
int y = 29;
int offset = 0;
IInventory cell = myte.getInventoryByName( "cell" );
IInventory cell = upgradeable.getInventoryByName( "cell" );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) );
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
// null, 3 * 8 );
@ -271,7 +271,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
public void clear()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
for (int x = 0; x < inv.getSizeInventory(); x++)
inv.setInventorySlotContents( x, null );
detectAndSendChanges();
@ -279,10 +279,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
public void partition()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell()
.getCellInventory( myte.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
.getCellInventory( upgradeable.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
if ( cellInv != null )

View file

@ -8,15 +8,15 @@ import appeng.tile.storage.TileChest;
public class ContainerChest extends AEBaseContainer
{
TileChest myte;
TileChest chest;
public ContainerChest(InventoryPlayer ip, TileChest te) {
super( ip, te, null );
myte = te;
public ContainerChest(InventoryPlayer ip, TileChest chest) {
super( ip, chest, null );
this.chest = chest;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, myte, 1, 80, 37, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest, 1, 80, 37, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
}

View file

@ -13,17 +13,17 @@ import appeng.util.Platform;
public class ContainerCondenser extends AEBaseContainer
{
TileCondenser myte;
TileCondenser condenser;
public ContainerCondenser(InventoryPlayer ip, TileCondenser te) {
super( ip, te, null );
myte = te;
public ContainerCondenser(InventoryPlayer ip, TileCondenser condenser) {
super( ip, condenser, null );
this.condenser = condenser;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, te, 0, 51, 52, ip ) );
addSlotToContainer( new SlotOutput( te, 1, 105, 52, -1 ) );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, te.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, condenser, 0, 51, 52, ip ) );
addSlotToContainer( new SlotOutput( condenser, 1, 105, 52, -1 ) );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, condenser.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
}
@Override
@ -31,13 +31,13 @@ public class ContainerCondenser extends AEBaseContainer
{
if ( Platform.isServer() )
{
double maxStorage = this.myte.getStorage();
double requiredEnergy = this.myte.getRequiredPower();
double maxStorage = this.condenser.getStorage();
double requiredEnergy = this.condenser.getRequiredPower();
int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
this.requiredEnergy = (int) maxDisplay;
this.storedPower = (int) this.myte.storedPower;
this.output = (CondenserOutput) this.myte.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
this.storedPower = (int) this.condenser.storedPower;
this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
}
super.detectAndSendChanges();

View file

@ -8,19 +8,19 @@ import appeng.tile.storage.TileDrive;
public class ContainerDrive extends AEBaseContainer
{
TileDrive myte;
TileDrive drive;
public ContainerDrive(InventoryPlayer ip, TileDrive te) {
super( ip, te, null );
myte = te;
public ContainerDrive(InventoryPlayer ip, TileDrive drive) {
super( ip, drive, null );
this.drive = drive;
for (int y = 0; y < 5; y++)
for (int x = 0; x < 2; x++)
{
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, te, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
}
bindPlayerInventory( ip, 0, 199 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 );
}
}

View file

@ -43,7 +43,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
@Override
public boolean isSlotEnabled(int idx)
{
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
return upgrades > idx;
}
@ -54,7 +54,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
int xo = 8;
int yo = 23 + 6;
IInventory config = myte.getInventoryByName( "config" );
IInventory config = upgradeable.getInventoryByName( "config" );
for (int y = 0; y < 7; y++)
{
for (int x = 0; x < 9; x++)
@ -66,7 +66,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
}
}
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@ -81,7 +81,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
}
standardDetectAndSendChanges();

View file

@ -10,23 +10,23 @@ import appeng.tile.grindstone.TileGrinder;
public class ContainerGrinder extends AEBaseContainer
{
TileGrinder myte;
TileGrinder grinder;
public ContainerGrinder(InventoryPlayer ip, TileGrinder te) {
super( ip, te, null );
myte = te;
public ContainerGrinder(InventoryPlayer ip, TileGrinder grinder) {
super( ip, grinder, null );
this.grinder = grinder;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 0, 12, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 1, 12 + 18, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 2, 12 + 36, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 0, 12, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 1, 12 + 18, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 2, 12 + 36, 17, invPlayer ) );
addSlotToContainer( new SlotInaccessible( te, 6, 80, 40 ) );
addSlotToContainer( new SlotInaccessible( grinder, 6, 80, 40 ) );
addSlotToContainer( new SlotOutput( te, 3, 112, 63, 2 * 16 + 15 ) );
addSlotToContainer( new SlotOutput( te, 4, 112 + 18, 63, 2 * 16 + 15 ) );
addSlotToContainer( new SlotOutput( te, 5, 112 + 36, 63, 2 * 16 + 15 ) );
addSlotToContainer( new SlotOutput( grinder, 3, 112, 63, 2 * 16 + 15 ) );
addSlotToContainer( new SlotOutput( grinder, 4, 112 + 18, 63, 2 * 16 + 15 ) );
addSlotToContainer( new SlotOutput( grinder, 5, 112 + 36, 63, 2 * 16 + 15 ) );
bindPlayerInventory( ip, 0, 176 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 );
}
}

View file

@ -49,22 +49,22 @@ public class ContainerIOPort extends ContainerUpgradeable
@Override
protected void setupConfig()
{
int offx = 19;
int offy = 17;
int offX = 19;
int offY = 17;
IInventory cells = myte.getInventoryByName( "cells" );
IInventory cells = upgradeable.getInventoryByName( "cells" );
for (int y = 0; y < 3; y++)
for (int x = 0; x < 2; x++)
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offx + x * 18, offy + y * 18, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, invPlayer ) );
offx = 122;
offy = 17;
offX = 122;
offY = 17;
for (int y = 0; y < 3; y++)
for (int x = 0; x < 2; x++)
addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offx + x * 18, offy + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@ -77,9 +77,9 @@ public class ContainerIOPort extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.opMode = (OperationMode) myte.getConfigManager().getSetting( Settings.OPERATION_MODE );
this.fMode = (FullnessMode) this.myte.getConfigManager().getSetting( Settings.FULLNESS_MODE );
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
this.opMode = (OperationMode) upgradeable.getConfigManager().getSetting( Settings.OPERATION_MODE );
this.fMode = (FullnessMode) this.upgradeable.getConfigManager().getSetting( Settings.FULLNESS_MODE );
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
}
standardDetectAndSendChanges();

View file

@ -4,6 +4,7 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput;

View file

@ -71,7 +71,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
if ( Platform.isServer() )
g = anchor.getActionableNode().getGrid();
bindPlayerInventory( ip, 0, 222 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 222 - /* height of player inventory */82 );
}
NBTTagCompound data = new NBTTagCompound();
@ -109,7 +109,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
switch (action)
{
case PICKUP_OR_SETDOWN:
case PICKUP_OR_SET_DOWN:
if ( hasItemInHand )
{
@ -142,7 +142,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
}
break;
case SPLIT_OR_PLACESINGLE:
case SPLIT_OR_PLACE_SINGLE:
if ( hasItemInHand )
{
@ -345,12 +345,12 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
private void addItems(NBTTagCompound data, InvTracker inv, int offset, int length)
{
String name = "=" + Long.toString( inv.which, Character.MAX_RADIX );
NBTTagCompound invv = data.getCompoundTag( name );
NBTTagCompound tag = data.getCompoundTag( name );
if ( invv.hasNoTags() )
if ( tag.hasNoTags() )
{
invv.setLong( "sortBy", inv.sortBy );
invv.setString( "un", inv.unlocalizedName );
tag.setLong( "sortBy", inv.sortBy );
tag.setString( "un", inv.unlocalizedName );
}
for (int x = 0; x < length; x++)
@ -365,9 +365,9 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
if ( is != null )
is.writeToNBT( itemNBT );
invv.setTag( Integer.toString( x + offset ), itemNBT );
tag.setTag( Integer.toString( x + offset ), itemNBT );
}
data.setTag( name, invv );
data.setTag( name, tag );
}
}

View file

@ -63,7 +63,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
int x = 80 + 44;
int y = 40;
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
if ( availableUpgrades() > 0 )
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 1 )
@ -73,7 +73,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
if ( availableUpgrades() > 3 )
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
}
@ -94,10 +94,10 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.EmitterValue = lvlEmitter.getReportingValue();
this.cmType = (YesNo) this.myte.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE );
this.lvType = (LevelType) this.myte.getConfigManager().getSetting( Settings.LEVEL_TYPE );
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_EMITTER );
this.cmType = (YesNo) this.upgradeable.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE );
this.lvType = (LevelType) this.upgradeable.getConfigManager().getSetting( Settings.LEVEL_TYPE );
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_EMITTER );
}
standardDetectAndSendChanges();

View file

@ -48,7 +48,7 @@ public class ContainerMAC extends ContainerUpgradeable
public boolean isValidItemForSlot(int slotIndex, ItemStack i)
{
IInventory mac = myte.getInventoryByName( "mac" );
IInventory mac = upgradeable.getInventoryByName( "mac" );
ItemStack is = mac.getStackInSlot( 10 );
if ( is == null )
@ -69,28 +69,28 @@ public class ContainerMAC extends ContainerUpgradeable
@Override
protected void setupConfig()
{
int offx = 29;
int offy = 30;
int offX = 29;
int offY = 30;
IInventory mac = myte.getInventoryByName( "mac" );
IInventory mac = upgradeable.getInventoryByName( "mac" );
for (int y = 0; y < 3; y++)
for (int x = 0; x < 3; x++)
{
SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offx + x * 18, offy + y * 18 );
SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offX + x * 18, offY + y * 18 );
addSlotToContainer( s );
}
offx = 126;
offy = 16;
offX = 126;
offY = 16;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offx, offy, invPlayer ) );
addSlotToContainer( new SlotOutput( mac, 9, offx, offy + 32, -1 ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, invPlayer ) );
addSlotToContainer( new SlotOutput( mac, 9, offX, offY + 32, -1 ) );
offx = 122;
offy = 17;
offX = 122;
offY = 17;
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@ -105,7 +105,7 @@ public class ContainerMAC extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
}
craftProgress = this.tma.getCraftingProgress();

View file

@ -121,7 +121,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
{
for (int y = 0; y < 5; y++)
{
cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEWCELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
invPlayer );
cellView[y].allowEdit = canAccessViewCells;
addSlotToContainer( cellView[y] );

View file

@ -27,7 +27,7 @@ public class ContainerNetworkTool extends AEBaseContainer
for (int x = 0; x < 3; x++)
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, te, y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, invPlayer )) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
public void toggleFacadeMode()

View file

@ -178,7 +178,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
ItemStack[] in = getInputs();
ItemStack[] out = getOutputs();
// if theres no input, this would be silly.
// if there is no input, this would be silly.
if ( in == null || out == null )
return;

View file

@ -8,13 +8,13 @@ import appeng.tile.qnb.TileQuantumBridge;
public class ContainerQNB extends AEBaseContainer
{
TileQuantumBridge myte;
TileQuantumBridge quantumBridge;
public ContainerQNB(InventoryPlayer ip, TileQuantumBridge te) {
super( ip, te, null );
myte = te;
public ContainerQNB(InventoryPlayer ip, TileQuantumBridge quantumBridge) {
super( ip, quantumBridge, null );
this.quantumBridge = quantumBridge;
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, te, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, quantumBridge, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}

View file

@ -41,7 +41,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
lockPlayerInventorySlot( ip.currentItem );
bindPlayerInventory( ip, 0, 184 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 184 - /* height of player inventory */82 );
}
@Override

View file

@ -39,7 +39,7 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
addSlotToContainer( configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) );
addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODEABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) );
bindPlayerInventory( ip, 0, 0 );
@ -117,18 +117,18 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
if ( wirelessIn.getHasStack() )
{
ItemStack term = wirelessIn.getStack().copy();
INetworkEncodable netEncodeable = null;
INetworkEncodable networkEncodable = null;
if ( term.getItem() instanceof INetworkEncodable )
netEncodeable = (INetworkEncodable) term.getItem();
networkEncodable = (INetworkEncodable) term.getItem();
IWirelessTermHandler wTermHandler = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term );
if ( wTermHandler != null )
netEncodeable = wTermHandler;
networkEncodable = wTermHandler;
if ( netEncodeable != null )
if ( networkEncodable != null )
{
netEncodeable.setEncryptionKey( term, "" + securityBox.securityKey, "" );
networkEncodable.setEncryptionKey( term, "" + securityBox.securityKey, "" );
wirelessIn.putStack( null );
wirelessOut.putStack( term );

View file

@ -11,29 +11,29 @@ import appeng.tile.storage.TileSkyChest;
public class ContainerSkyChest extends AEBaseContainer
{
TileSkyChest myte;
TileSkyChest chest;
public ContainerSkyChest(InventoryPlayer ip, TileSkyChest te) {
super( ip, te, null );
myte = te;
public ContainerSkyChest(InventoryPlayer ip, TileSkyChest chest) {
super( ip, chest, null );
this.chest = chest;
for (int y = 0; y < 4; y++)
{
for (int x = 0; x < 9; x++)
{
addSlotToContainer( new SlotNormal( myte, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
addSlotToContainer( new SlotNormal( this.chest, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
}
}
myte.openInventory();
this.chest.openInventory();
bindPlayerInventory( ip, 0, 195 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
}
@Override
public void onContainerClosed(EntityPlayer par1EntityPlayer)
{
super.onContainerClosed( par1EntityPlayer );
myte.closeInventory();
chest.closeInventory();
}
}

View file

@ -16,7 +16,7 @@ import appeng.util.Platform;
public class ContainerSpatialIOPort extends AEBaseContainer
{
TileSpatialIOPort myte;
TileSpatialIOPort spatialIOPort;
IGrid network;
@ -31,17 +31,17 @@ public class ContainerSpatialIOPort extends AEBaseContainer
int delay = 40;
public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort te) {
super( ip, te, null );
myte = te;
public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort spatialIOPort) {
super( ip, spatialIOPort, null );
this.spatialIOPort = spatialIOPort;
if ( Platform.isServer() )
network = te.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
network = spatialIOPort.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, te, 0, 52, 48, invPlayer ) );
addSlotToContainer( new SlotOutput( te, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, spatialIOPort, 0, 52, 48, invPlayer ) );
addSlotToContainer( new SlotOutput( spatialIOPort, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
}
@Override

View file

@ -60,7 +60,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
@Override
public boolean isSlotEnabled(int idx)
{
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
return upgrades > idx;
}
@ -71,7 +71,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
int xo = 8;
int yo = 23 + 6;
IInventory config = myte.getInventoryByName( "config" );
IInventory config = upgradeable.getInventoryByName( "config" );
for (int y = 0; y < 7; y++)
{
for (int x = 0; x < 9; x++)
@ -83,7 +83,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
}
}
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@ -98,9 +98,9 @@ public class ContainerStorageBus extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.rwMode = (AccessRestriction) this.myte.getConfigManager().getSetting( Settings.ACCESS );
this.storageFilter = (StorageFilter) this.myte.getConfigManager().getSetting( Settings.STORAGE_FILTER );
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.rwMode = (AccessRestriction) this.upgradeable.getConfigManager().getSetting( Settings.ACCESS );
this.storageFilter = (StorageFilter) this.upgradeable.getConfigManager().getSetting( Settings.STORAGE_FILTER );
}
standardDetectAndSendChanges();
@ -108,7 +108,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
public void clear()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
for (int x = 0; x < inv.getSizeInventory(); x++)
inv.setInventorySlotContents( x, null );
detectAndSendChanges();
@ -116,7 +116,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
public void partition()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
IMEInventory<IAEItemStack> cellInv = storageBus.getInternalHandler();

View file

@ -29,25 +29,25 @@ import appeng.util.Platform;
public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost
{
IUpgradeableHost myte;
IUpgradeableHost upgradeable;
int tbslot;
NetworkToolViewer tbinv;
int tbSlot;
NetworkToolViewer tbInventory;
public ContainerUpgradeable(InventoryPlayer ip, IUpgradeableHost te) {
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
myte = te;
upgradeable = te;
World w = null;
int xCoor = 0, yCoor = 0, zCoor = 0;
int xCoord = 0, yCoord = 0, zCoord = 0;
if ( te instanceof TileEntity )
{
TileEntity myTile = (TileEntity) te;
w = myTile.getWorldObj();
xCoor = myTile.xCoord;
yCoor = myTile.yCoord;
zCoor = myTile.zCoord;
xCoord = myTile.xCoord;
yCoord = myTile.yCoord;
zCoord = myTile.zCoord;
}
if ( te instanceof IPart )
@ -55,9 +55,9 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
IUpgradeableHost myTile = (IUpgradeableHost) te;
TileEntity mk = myTile.getTile();
w = mk.getWorldObj();
xCoor = mk.xCoord;
yCoor = mk.yCoord;
zCoor = mk.zCoord;
xCoord = mk.xCoord;
yCoord = mk.yCoord;
zCoord = mk.zCoord;
}
IInventory pi = getPlayerInv();
@ -67,8 +67,8 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
if ( pii != null && pii.getItem() instanceof ToolNetworkTool )
{
lockPlayerInventorySlot( x );
tbslot = x;
tbinv = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoor, yCoor, zCoor );
tbSlot = x;
tbInventory = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoord, yCoord, zCoord );
break;
}
}
@ -77,18 +77,18 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{
for (int v = 0; v < 3; v++)
for (int u = 0; u < 3; u++)
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbinv, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbInventory, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
invPlayer )).setPlayerSide() );
}
setupConfig();
bindPlayerInventory( ip, 0, getHeight() - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, getHeight() - /* height of player inventory */82 );
}
protected void setupUpgrades()
{
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
if ( availableUpgrades() > 0 )
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 1 )
@ -105,7 +105,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
int y = 40;
setupUpgrades();
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
if ( supportCapacity() )
@ -150,14 +150,14 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{
if ( hasToolbox() )
{
ItemStack currentItem = getPlayerInv().getStackInSlot( tbslot );
ItemStack currentItem = getPlayerInv().getStackInSlot( tbSlot );
if ( currentItem != tbinv.getItemStack() )
if ( currentItem != tbInventory.getItemStack() )
{
if ( currentItem != null )
{
if ( Platform.isSameItem( tbinv.getItemStack(), currentItem ) )
getPlayerInv().setInventorySlotContents( tbslot, tbinv.getItemStack() );
if ( Platform.isSameItem( tbInventory.getItemStack(), currentItem ) )
getPlayerInv().setInventorySlotContents( tbSlot, tbInventory.getItemStack() );
else
isContainerValid = false;
}
@ -174,7 +174,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
if ( Platform.isServer() )
{
IConfigManager cm = this.myte.getConfigManager();
IConfigManager cm = this.upgradeable.getConfigManager();
loadSettingsFromHost( cm );
}
@ -197,7 +197,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{
this.fzMode = (FuzzyMode) cm.getSetting( Settings.FUZZY_MODE );
this.rsMode = (RedstoneMode) cm.getSetting( Settings.REDSTONE_CONTROLLED );
if ( myte instanceof PartExportBus )
if ( upgradeable instanceof PartExportBus )
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
}
@ -208,13 +208,13 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
public boolean hasToolbox()
{
return tbinv != null;
return tbInventory != null;
}
@Override
public boolean isSlotEnabled(int idx)
{
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
if ( idx == 1 && upgrades > 0 )
return true;

View file

@ -10,15 +10,15 @@ import appeng.util.Platform;
public class ContainerVibrationChamber extends AEBaseContainer
{
TileVibrationChamber myte;
TileVibrationChamber vibrationChamber;
public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber te) {
super( ip, te, null );
myte = te;
public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber vibrationChamber) {
super( ip, vibrationChamber, null );
this.vibrationChamber = vibrationChamber;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, te, 0, 80, 37, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
public int aePerTick = 5;
@ -34,8 +34,8 @@ public class ContainerVibrationChamber extends AEBaseContainer
{
if ( Platform.isServer() )
{
this.burnProgress = (int) (this.myte.maxBurnTime <= 0 ? 0 : 12 * this.myte.burnTime / this.myte.maxBurnTime);
this.burnSpeed = this.myte.burnSpeed;
this.burnProgress = (int) (this.vibrationChamber.maxBurnTime <= 0 ? 0 : 12 * this.vibrationChamber.burnTime / this.vibrationChamber.maxBurnTime);
this.burnSpeed = this.vibrationChamber.burnSpeed;
}
super.detectAndSendChanges();

View file

@ -10,7 +10,7 @@ import appeng.tile.networking.TileWireless;
public class ContainerWireless extends AEBaseContainer
{
TileWireless myte;
TileWireless wirelessTerminal;
@GuiSync(1)
public long range = 0;
@ -22,11 +22,11 @@ public class ContainerWireless extends AEBaseContainer
public ContainerWireless(InventoryPlayer ip, TileWireless te) {
super( ip, te, null );
myte = te;
wirelessTerminal = te;
addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, myte, 0, 80, 47, invPlayer ) );
addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, wirelessTerminal, 0, 80, 47, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
@Override

View file

@ -9,11 +9,11 @@ import appeng.util.Platform;
public class ContainerWirelessTerm extends ContainerMEPortableCell
{
WirelessTerminalGuiObject wtgo;
WirelessTerminalGuiObject wirelessTerminalGUIObject;
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject monitorable) {
super( ip, monitorable );
wtgo = monitorable;
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject wirelessTerminalGUIObject) {
super( ip, wirelessTerminalGUIObject );
this.wirelessTerminalGUIObject = wirelessTerminalGUIObject;
}
@Override
@ -21,7 +21,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
{
super.detectAndSendChanges();
if ( !wtgo.rangeCheck() )
if ( !wirelessTerminalGUIObject.rangeCheck() )
{
if ( Platform.isServer() && isContainerValid )
getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
@ -30,7 +30,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
}
else
{
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wtgo.getRange() );
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wirelessTerminalGUIObject.getRange() );
}
}
}

View file

@ -9,9 +9,9 @@ public class OptionalSlotRestrictedInput extends SlotRestrictedInput
final int groupNum;
IOptionalSlotHost host;
public OptionalSlotRestrictedInput(PlacableItemType valid, IInventory i, IOptionalSlotHost host, int slotnum, int x, int y, int grpNum,
public OptionalSlotRestrictedInput(PlacableItemType valid, IInventory i, IOptionalSlotHost host, int slotIndex, int x, int y, int grpNum,
InventoryPlayer invPlayer) {
super( valid, i, slotnum, x, y, invPlayer );
super( valid, i, slotIndex, x, y, invPlayer );
this.groupNum = grpNum;
this.host = host;
}

View file

@ -20,12 +20,12 @@ public class SlotPatternTerm extends SlotCraftingTerm
IOptionalSlotHost host;
public SlotPatternTerm(EntityPlayer player, BaseActionSource mySrc, IEnergySource energySrc, IStorageMonitorable storage, IInventory cMatrix,
IInventory secondMatrix, IInventory output, int x, int y, IOptionalSlotHost h, int grpnum, IContainerCraftingPacket c)
IInventory secondMatrix, IInventory output, int x, int y, IOptionalSlotHost h, int groupNumber, IContainerCraftingPacket c)
{
super( player, mySrc, energySrc, storage, cMatrix, secondMatrix, output, x, y, c );
host = h;
groupNum = grpnum;
groupNum = groupNumber;
}

View file

@ -30,13 +30,13 @@ public class SlotRestrictedInput extends AppEngSlot
{
STORAGE_CELLS(15), ORE(1 * 16 + 15), STORAGE_COMPONENT(3 * 16 + 15),
ENCODEABLE_ITEM(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15),
ENCODABLE_ITEM(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15),
ENCODED_CRAFTING_PATTERN(7 * 16 + 15), ENCODED_PATTERN(7 * 16 + 15), PATTERN(8 * 16 + 15), BLANK_PATTERN(8 * 16 + 15), POWERED_TOOL(9 * 16 + 15),
RANGE_BOOSTER(6 * 16 + 15), QE_SINGULARITY(10 * 16 + 15), SPATIAL_STORAGE_CELLS(11 * 16 + 15),
FUEL(12 * 16 + 15), UPGRADES(13 * 16 + 15), WORKBENCH_CELL(15), BIOMETRIC_CARD(14 * 16 + 15), VIEWCELL(4 * 16 + 14),
FUEL(12 * 16 + 15), UPGRADES(13 * 16 + 15), WORKBENCH_CELL(15), BIOMETRIC_CARD(14 * 16 + 15), VIEW_CELL(4 * 16 + 14),
INSCRIBER_PLATE(2 * 16 + 14), INSCRIBER_INPUT(3 * 16 + 14), METAL_INGOTS(3 * 16 + 14);
@ -85,8 +85,8 @@ public class SlotRestrictedInput extends AppEngSlot
return this;
}
public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotnum, int x, int y, InventoryPlayer p) {
super( i, slotnum, x, y );
public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotIndex, int x, int y, InventoryPlayer p) {
super( i, slotIndex, x, y );
which = valid;
IIcon = valid.IIcon;
this.p = p;
@ -179,7 +179,7 @@ public class SlotRestrictedInput extends AppEngSlot
return isMetalIngot( i );
case VIEWCELL:
case VIEW_CELL:
return AEApi.instance().items().itemViewCell.sameAsStack( i );
case ORE:
return appeng.api.AEApi.instance().registries().grinder().getRecipeForInput( i ) != null;
@ -206,7 +206,7 @@ public class SlotRestrictedInput extends AppEngSlot
if ( i.getItem() instanceof IStorageComponent && ((IStorageComponent) i.getItem()).isStorageComponent( i ) )
return false;
return true;
case ENCODEABLE_ITEM:
case ENCODABLE_ITEM:
return i.getItem() instanceof INetworkEncodable || AEApi.instance().registries().wireless().isWirelessTerminal( i );
case BIOMETRIC_CARD:
return i.getItem() instanceof IBiometricCard;

View file

@ -96,7 +96,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
return prop;
}
public double spatialPowerScaler = 1.35;
public double spatialPowerExponent = 1.35;
public double spatialPowerMultiplier = 1250.0;
public String grinderOres[] = {
@ -117,12 +117,12 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
public int[] priorityByStacks = new int[] { 1, 10, 100, 1000 };
public int[] levelByStacks = new int[] { 1, 10, 100, 1000 };
public int wireless_battery = 1600000;
public int manipulator_battery = 200000;
public int mattercannon_battery = 200000;
public int portablecell_battery = 20000;
public int colorapplicator_battery = 20000;
public int staff_battery = 8000;
public int wirelessTerminalBattery = 1600000;
public int entropyManipulatorBattery = 200000;
public int matterCannonBattery = 200000;
public int portableCellBattery = 20000;
public int colorApplicatorBattery = 20000;
public int chargedStaffBattery = 8000;
public boolean disableColoredCableRecipesInNEI = true;
@ -257,20 +257,20 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
formationPlaneEntityLimit = get( "automation", "formationPlaneEntityLimit", formationPlaneEntityLimit ).getInt( formationPlaneEntityLimit );
wireless_battery = get( "battery", "wireless", wireless_battery ).getInt( wireless_battery );
staff_battery = get( "battery", "staff", staff_battery ).getInt( staff_battery );
manipulator_battery = get( "battery", "manipulator", manipulator_battery ).getInt( manipulator_battery );
portablecell_battery = get( "battery", "portablecell", portablecell_battery ).getInt( portablecell_battery );
colorapplicator_battery = get( "battery", "colorapplicator", colorapplicator_battery ).getInt( colorapplicator_battery );
mattercannon_battery = get( "battery", "mattercannon", mattercannon_battery ).getInt( mattercannon_battery );
wirelessTerminalBattery = get( "battery", "wirelessTerminal", wirelessTerminalBattery ).getInt( wirelessTerminalBattery );
chargedStaffBattery = get( "battery", "chargedStaff", chargedStaffBattery ).getInt( chargedStaffBattery );
entropyManipulatorBattery = get( "battery", "entropyManipulator", entropyManipulatorBattery ).getInt( entropyManipulatorBattery );
portableCellBattery = get( "battery", "portableCell", portableCellBattery ).getInt( portableCellBattery );
colorApplicatorBattery = get( "battery", "colorApplicator", colorApplicatorBattery ).getInt( colorApplicatorBattery );
matterCannonBattery = get( "battery", "matterCannon", matterCannonBattery ).getInt( matterCannonBattery );
clientSync();
for (AEFeature feature : AEFeature.values())
{
if ( feature.isVisible() )
if ( feature.isVisible )
{
if ( get( "Features." + feature.getCategory(), feature.name(), feature.defaultValue() ).getBoolean( feature.defaultValue() ) )
if ( get( "Features." + feature.category, feature.name(), feature.defaultValue ).getBoolean( feature.defaultValue ) )
featureFlags.add( feature );
}
else
@ -304,12 +304,12 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
storageBiomeID = get( "spatialio", "storageBiomeID", storageBiomeID ).getInt( storageBiomeID );
storageProviderID = get( "spatialio", "storageProviderID", storageProviderID ).getInt( storageProviderID );
spatialPowerMultiplier = get( "spatialio", "spatialPowerMultiplier", spatialPowerMultiplier ).getDouble( spatialPowerMultiplier );
spatialPowerScaler = get( "spatialio", "spatialPowerScaler", spatialPowerScaler ).getDouble( spatialPowerScaler );
spatialPowerExponent = get( "spatialio", "spatialPowerExponent", spatialPowerExponent ).getDouble( spatialPowerExponent );
}
if ( isFeatureEnabled( AEFeature.CraftingCPU ) )
{
craftingCalculationTimePerTick = get( "craftingcpu", "craftingCalculationTimePerTick", craftingCalculationTimePerTick ).getInt(
craftingCalculationTimePerTick = get( "craftingCPU", "craftingCalculationTimePerTick", craftingCalculationTimePerTick ).getInt(
craftingCalculationTimePerTick );
}

View file

@ -156,10 +156,10 @@ public class AppEng
AELog.info( "PostInit" );
Registration.instance.PostInit( event );
IntegrationRegistry.instance.postinit();
IntegrationRegistry.instance.postInit();
FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( CrashInfo.INTEGRATION ) );
CommonHelper.proxy.postinit();
CommonHelper.proxy.postInit();
AEConfig.instance.save();
NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler );

View file

@ -37,7 +37,7 @@ public abstract class CommonHelper
public abstract void doRenderItem(ItemStack itemstack, World w);
public abstract void postinit();
public abstract void postInit();
public abstract CableRenderMode getRenderMode();

View file

@ -9,7 +9,6 @@ import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.RecipeSorter;
import net.minecraftforge.oredict.RecipeSorter.Category;
import appeng.api.AEApi;
@ -403,17 +402,17 @@ public class Registration
items.itemFacade = addFeature( ItemFacade.class );
items.itemCrystalSeed = addFeature( ItemCrystalSeed.class );
ColoredItemDefinition pbreg, pbregl;
items.itemPaintBall = pbreg = new ColoredItemDefinition();
items.itemLumenPaintBall = pbregl = new ColoredItemDefinition();
ColoredItemDefinition paintBall, lumenPaintBall;
items.itemPaintBall = paintBall = new ColoredItemDefinition();
items.itemLumenPaintBall = lumenPaintBall = new ColoredItemDefinition();
AEItemDefinition pb = addFeature( ItemPaintBall.class );
for (AEColor c : AEColor.values())
{
if ( c != AEColor.Transparent )
{
pbreg.add( c, new ItemStackSrc( pb.item(), c.ordinal() ) );
pbregl.add( c, new ItemStackSrc( pb.item(), 20 + c.ordinal() ) );
paintBall.add( c, new ItemStackSrc( pb.item(), c.ordinal() ) );
lumenPaintBall.add( c, new ItemStackSrc( pb.item(), 20 + c.ordinal() ) );
}
}
@ -519,7 +518,7 @@ public class Registration
public void Init(FMLInitializationEvent event)
{
// Perform ore camouflage!
ItemMultiMaterial.instance.unduplicate();
ItemMultiMaterial.instance.makeUnique();
if ( AEConfig.instance.isFeatureEnabled( AEFeature.CustomRecipes ) )
recipeHandler.parseRecipes( new ConfigLoader( AppEng.instance.getConfigPath() ), "index.recipe" );
@ -591,7 +590,7 @@ public class Registration
// default settings..
((P2PTunnelRegistry) AEApi.instance().registries().p2pTunnel()).configure();
// add to localizaiton..
// add to localization..
PlayerMessages.values();
GuiText.values();

View file

@ -247,26 +247,26 @@ public class ApiPart implements IPartHelper
// n.accept( cw );
// n.accept( new TraceClassVisitor( new PrintWriter( System.out ) ) );
byte[] barray = cw.toByteArray();
int size = barray.length;
Class nclass = loadClass( n.name.replace( "/", "." ), barray );
byte[] byteArray = cw.toByteArray();
int size = byteArray.length;
Class clazz = loadClass( n.name.replace( "/", "." ), byteArray );
try
{
Object fish = nclass.newInstance();
Object fish = clazz.newInstance();
Class rootC = Class.forName( root );
boolean bads = false;
boolean hasError = false;
if ( !rootC.isInstance( fish ) )
{
bads = true;
hasError = true;
AELog.severe( "Error, Expected layer to implement " + root + " did not." );
}
if ( fish instanceof LayerBase )
{
bads = true;
hasError = true;
AELog.severe( "Error, Expected layer to NOT implement LayerBase but it DID." );
}
@ -274,18 +274,18 @@ public class ApiPart implements IPartHelper
{
if ( !(fish instanceof TileCableBus) )
{
bads = true;
hasError = true;
AELog.severe( "Error, Expected layer to implement TileCableBus did not." );
}
if ( !(fish instanceof TileEntity) )
{
bads = true;
hasError = true;
AELog.severe( "Error, Expected layer to implement TileEntity did not." );
}
}
if ( !bads )
if ( !hasError )
{
AELog.info( "Layer: " + n.name + " loaded successfully - " + size + " bytes" );
}
@ -297,8 +297,8 @@ public class ApiPart implements IPartHelper
AELog.error( t );
}
roots.put( fullPath, nclass );
return nclass;
roots.put( fullPath, clazz );
return clazz;
}
private void processNode(AbstractInsnNode next, String nePar)

View file

@ -56,33 +56,19 @@ public enum AEFeature
ChunkLoggerTrace("Commands", false), LogSecurityAudits("Misc", false), Achievements("Misc");
String Category;
boolean visible = true;
boolean defValue = true;
public final String category;
public final boolean isVisible;
public final boolean defaultValue;
private AEFeature(String cat) {
Category = cat;
visible = !this.name().equals( "Core" );
this.category = cat;
this.isVisible = !this.name().equals( "Core" );
this.defaultValue = true;
}
private AEFeature(String cat, boolean defv) {
this( cat );
defValue = defv;
private AEFeature(String cat, boolean defaultValue) {
this.category = cat;
this.isVisible = !this.name().equals( "Core" );
this.defaultValue = defaultValue;
}
public String getCategory()
{
return Category;
}
public Boolean defaultValue()
{
return defValue;
}
public Boolean isVisible()
{
return visible;
}
}

View file

@ -21,32 +21,32 @@ import cpw.mods.fml.common.registry.GameRegistry;
public class AEFeatureHandler implements AEItemDefinition
{
private final EnumSet<AEFeature> myFeatures;
private final EnumSet<AEFeature> features;
private final String subname;
private IAEFeature obj;
private final String subName;
private IAEFeature feature;
private Item ItemData;
private Block BlockData;
public AEFeatureHandler(EnumSet<AEFeature> featureSet, IAEFeature _obj, String _subname) {
myFeatures = featureSet;
obj = _obj;
subname = _subname;
public AEFeatureHandler(EnumSet<AEFeature> features, IAEFeature feature, String subName) {
this.features = features;
this.feature = feature;
this.subName = subName;
}
public void register()
{
if ( isFeatureAvailable() )
{
if ( obj instanceof Item )
initItem( (Item) obj );
if ( obj instanceof Block )
initBlock( (Block) obj );
if ( feature instanceof Item )
initItem( (Item) feature );
if ( feature instanceof Block )
initBlock( (Block) feature );
}
}
public static String getName(Class o, String subname)
public static String getName(Class o, String subName)
{
String name = o.getSimpleName();
@ -55,19 +55,19 @@ public class AEFeatureHandler implements AEItemDefinition
else if ( name.startsWith( "ItemMultiMaterial" ) )
name = name.replace( "ItemMultiMaterial", "ItemMaterial" );
if ( subname != null )
if ( subName != null )
{
// simple hack to allow me to do get nice names for these without
// mode code outside of AEBaseItem
if ( subname.startsWith( "P2PTunnel" ) )
if ( subName.startsWith( "P2PTunnel" ) )
return "ItemPart.P2PTunnel";
if ( subname.equals( "CertusQuartzTools" ) )
if ( subName.equals( "CertusQuartzTools" ) )
return name.replace( "Quartz", "CertusQuartz" );
if ( subname.equals( "NetherQuartzTools" ) )
if ( subName.equals( "NetherQuartzTools" ) )
return name.replace( "Quartz", "NetherQuartz" );
name += "." + subname;
name += "." + subName;
}
return name;
@ -77,7 +77,7 @@ public class AEFeatureHandler implements AEItemDefinition
{
ItemData = i;
String name = getName( i.getClass(), subname );
String name = getName( i.getClass(), subName );
i.setTextureName( "appliedenergistics2:" + name );
i.setUnlocalizedName( /* "item." */"appliedenergistics2." + name );
@ -98,7 +98,7 @@ public class AEFeatureHandler implements AEItemDefinition
{
BlockData = b;
String name = getName( b.getClass(), subname );
String name = getName( b.getClass(), subName );
b.setCreativeTab( CreativeTab.instance );
b.setBlockName( /* "tile." */"appliedenergistics2." + name );
b.setBlockTextureName( "appliedenergistics2:" + name );
@ -118,14 +118,14 @@ public class AEFeatureHandler implements AEItemDefinition
public EnumSet<AEFeature> getFeatures()
{
return myFeatures.clone();
return features.clone();
}
public boolean isFeatureAvailable()
{
boolean enabled = true;
for (AEFeature f : myFeatures)
for (AEFeature f : features)
enabled = enabled && AEConfig.instance.isFeatureEnabled( f );
return enabled;

View file

@ -28,7 +28,7 @@ public class RegistryContainer implements IRegistryContainer
private P2PTunnelRegistry P2PRegistry = new P2PTunnelRegistry();
private MovableTileRegistry MovableReg = new MovableTileRegistry();
private MatterCannonAmmoRegistry matterCannonReg = new MatterCannonAmmoRegistry();
private PlayerRegistry playerreg = new PlayerRegistry();
private PlayerRegistry playerRegistry = new PlayerRegistry();
private IRecipeHandlerRegistry recipeReg = new RecipeHandlerRegistry();
@Override
@ -94,7 +94,7 @@ public class RegistryContainer implements IRegistryContainer
@Override
public IPlayerRegistry players()
{
return playerreg;
return playerRegistry;
}
@Override

View file

@ -60,12 +60,12 @@ public class WorldGenRegistry implements IWorldGen
}
@Override
public void disableWorldGenForDimension(WorldGenType type, int dimid)
public void disableWorldGenForDimension(WorldGenType type, int dimensionID)
{
if ( type == null )
throw new IllegalArgumentException( "Bad Type Passed" );
types[type.ordinal()].badDimensions.add( dimid );
types[type.ordinal()].badDimensions.add( dimensionID );
}
}

View file

@ -51,13 +51,13 @@ public class AppEngPacketHandlerBase
PACKET_MULTIPART(PacketMultiPart.class),
PACKET_PARTPLACEMENT(PacketPartPlacement.class),
PACKET_PART_PLACEMENT(PacketPartPlacement.class),
PACKET_LIGHTNING(PacketLightning.class),
PACKET_MATTERCANNON(PacketMatterCannon.class),
PACKET_MATTER_CANNON(PacketMatterCannon.class),
PACKET_MOCKEXPLOSION(PacketMockExplosion.class),
PACKET_MOCK_EXPLOSION(PacketMockExplosion.class),
PACKET_VALUE_CONFIG(PacketValueConfig.class),

View file

@ -128,7 +128,7 @@ public enum GuiBridge implements IGuiHandler
GUI_DRIVE(ContainerDrive.class, TileDrive.class, WORLD, SecurityPermissions.BUILD),
GUI_VIBRATIONCHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null),
GUI_VIBRATION_CHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null),
GUI_CONDENSER(ContainerCondenser.class, TileCondenser.class, WORLD, null),
@ -140,7 +140,7 @@ public enum GuiBridge implements IGuiHandler
GUI_STORAGEBUS(ContainerStorageBus.class, PartStorageBus.class, WORLD, SecurityPermissions.BUILD),
GUI_FPLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD),
GUI_FORMATION_PLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD),
GUI_PRIORITY(ContainerPriority.class, IPriorityHost.class, WORLD, SecurityPermissions.BUILD),
@ -151,13 +151,13 @@ public enum GuiBridge implements IGuiHandler
GUI_PATTERN_TERMINAL(ContainerPatternTerm.class, PartPatternTerminal.class, WORLD, SecurityPermissions.CRAFT),
// extends (Container/Gui) + Bus
GUI_LEVELEMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD),
GUI_LEVEL_EMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD),
GUI_SPATIALIOPORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD),
GUI_SPATIAL_IO_PORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD),
GUI_INSCRIBER(ContainerInscriber.class, TileInscriber.class, WORLD, null),
GUI_CELLWORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null),
GUI_CELL_WORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null),
GUI_MAC(ContainerMAC.class, TileMolecularAssembler.class, WORLD, null),
@ -335,9 +335,9 @@ public enum GuiBridge implements IGuiHandler
{
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
GuiBridge ID = values()[ID_ORDINAL >> 4];
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
boolean stem = ((ID_ORDINAL >> 3) & 1) == 1;
if ( ID.type.isItem() && istem )
if ( ID.type.isItem() && stem )
{
ItemStack it = player.inventory.getCurrentItem();
Object myItem = getGuiObject( it, player, w, x, y, z );
@ -387,9 +387,9 @@ public enum GuiBridge implements IGuiHandler
{
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
GuiBridge ID = values()[ID_ORDINAL >> 4];
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
boolean stem = ((ID_ORDINAL >> 3) & 1) == 1;
if ( ID.type.isItem() && istem )
if ( ID.type.isItem() && stem )
{
ItemStack it = player.inventory.getCurrentItem();
Object myItem = getGuiObject( it, player, w, x, y, z );

View file

@ -31,10 +31,10 @@ public class PacketConfigButton extends AppEngPacket
public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
{
EntityPlayerMP sender = (EntityPlayerMP) player;
AEBaseContainer aebc = (AEBaseContainer) sender.openContainer;
if ( aebc.getTarget() instanceof IConfigurableObject )
AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
if ( baseContainer.getTarget() instanceof IConfigurableObject )
{
IConfigManager cm = ((IConfigurableObject) aebc.getTarget()).getConfigManager();
IConfigManager cm = ((IConfigurableObject) baseContainer.getTarget()).getConfigManager();
Enum newState = Platform.rotateEnum( cm.getSetting( option ), rotationDirection, option.getPossibleValues() );
cm.putSetting( option, newState );
}

View file

@ -41,10 +41,10 @@ public class PacketCraftRequest extends AppEngPacket
if ( player.openContainer instanceof ContainerCraftAmount )
{
ContainerCraftAmount cca = (ContainerCraftAmount) player.openContainer;
Object targ = cca.getTarget();
if ( targ instanceof IGridHost )
Object target = cca.getTarget();
if ( target instanceof IGridHost )
{
IGridHost gh = (IGridHost) targ;
IGridHost gh = (IGridHost) target;
IGridNode gn = gh.getGridNode( ForgeDirection.UNKNOWN );
if ( gn == null )
return;

View file

@ -46,23 +46,23 @@ public class PacketInventoryAction extends AppEngPacket
EntityPlayerMP sender = (EntityPlayerMP) player;
if ( sender.openContainer instanceof AEBaseContainer )
{
AEBaseContainer aebc = (AEBaseContainer) sender.openContainer;
if ( action == InventoryAction.AUTOCRAFT )
AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
if ( action == InventoryAction.AUTO_CRAFT )
{
ContainerOpenContext context = aebc.openContext;
ContainerOpenContext context = baseContainer.openContext;
if ( context != null )
{
TileEntity te = context.getTile();
Platform.openGUI( sender, te, aebc.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );
Platform.openGUI( sender, te, baseContainer.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );
if ( sender.openContainer instanceof ContainerCraftAmount )
{
ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;
if ( aebc.getTargetStack() != null )
if ( baseContainer.getTargetStack() != null )
{
cca.craftingItem.putStack( aebc.getTargetStack().getItemStack() );
cca.whatToMake = aebc.getTargetStack();
cca.craftingItem.putStack( baseContainer.getTargetStack().getItemStack() );
cca.whatToMake = baseContainer.getTargetStack();
}
cca.detectAndSendChanges();
@ -71,7 +71,7 @@ public class PacketInventoryAction extends AppEngPacket
}
else
{
aebc.doAction( sender, action, slot, id );
baseContainer.doAction( sender, action, slot, id );
}
}
}

View file

@ -76,7 +76,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket
gzReader.close();
// int uncompressedBytes = uncompressed.readableBytes();
// AELog.info( "Recv: " + originalBytes + " -> " + uncompressedBytes );
// AELog.info( "Receiver: " + originalBytes + " -> " + uncompressedBytes );
while (uncompressed.readableBytes() > 0)
list.add( AEItemStack.loadItemStackFromPacket( uncompressed ) );

View file

@ -108,8 +108,8 @@ public class PacketNEIRecipe extends AppEngPacket
if ( is != null )
{
IMEMonitor<IAEItemStack> stor = inv.getItemInventory();
IItemList all = stor.getStorageList();
IMEMonitor<IAEItemStack> storage = inv.getItemInventory();
IItemList all = storage.getStorageList();
IPartitionList<IAEItemStack> filter = ItemViewCell.createFilter( cct.getViewCells() );
for (int x = 0; x < craftMatrix.getSizeInventory(); x++)
@ -120,15 +120,15 @@ public class PacketNEIRecipe extends AppEngPacket
if ( currentItem != null )
{
ic.setInventorySlotContents( x, currentItem );
ItemStack newis = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null;
ItemStack newItemStack = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null;
ic.setInventorySlotContents( x, PatternItem );
if ( newis == null || !Platform.isSameItemPrecise( newis, is ) )
if ( newItemStack == null || !Platform.isSameItemPrecise( newItemStack, is ) )
{
IAEItemStack in = AEItemStack.create( currentItem );
if ( in != null )
{
IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, stor, in,
IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, storage, in,
cct.getSource() );
if ( out != null )
craftMatrix.setInventorySlotContents( x, out.getItemStack() );
@ -142,7 +142,7 @@ public class PacketNEIRecipe extends AppEngPacket
if ( PatternItem != null && currentItem == null )
{
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), stor, player.worldObj, r, is, ic,
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), storage, player.worldObj, r, is, ic,
PatternItem, x, all, realForFake, filter );
if ( whichItem == null )
@ -155,7 +155,7 @@ public class PacketNEIRecipe extends AppEngPacket
if ( filter == null || filter.isListed( request ) )
{
request.setStackSize( 1 );
IAEItemStack out = Platform.poweredExtraction( energy, stor, request, cct.getSource() );
IAEItemStack out = Platform.poweredExtraction( energy, storage, request, cct.getSource() );
if ( out != null )
{
whichItem = out.getItemStack();
@ -183,11 +183,11 @@ public class PacketNEIRecipe extends AppEngPacket
ByteBuf data = Unpooled.buffer();
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
DataOutputStream datao = new DataOutputStream( bytes );
DataOutputStream outputStream = new DataOutputStream( bytes );
data.writeInt( getPacketID() );
CompressedStreamTools.writeCompressed( recipe, datao );
CompressedStreamTools.writeCompressed( recipe, outputStream );
data.writeBytes( bytes.toByteArray() );
configureWrite( data );

View file

@ -51,8 +51,8 @@ public class PacketPatternSlot extends AppEngPacket
EntityPlayerMP sender = (EntityPlayerMP) player;
if ( sender.openContainer instanceof ContainerPatternTerm )
{
ContainerPatternTerm aebc = (ContainerPatternTerm) sender.openContainer;
aebc.craftOrGetItem( this );
ContainerPatternTerm patternTerminal = (ContainerPatternTerm) sender.openContainer;
patternTerminal.craftOrGetItem( this );
}
}

View file

@ -139,15 +139,15 @@ public class CraftingJob implements Runnable, ICraftingJob
try
{
TickHandler.instance.registerCraftingSimulation( world, this );
handlepausing();
handlePausing();
Stopwatch timer = Stopwatch.createStarted();
MECraftingInventory meci = new MECraftingInventory( original, true, false, true );
meci.ignore( output );
MECraftingInventory craftingInventory = new MECraftingInventory( original, true, false, true );
craftingInventory.ignore( output );
availableCheck = new MECraftingInventory( original, false, false, false );
tree.request( meci, output.getStackSize(), actionSrc );
tree.request( craftingInventory, output.getStackSize(), actionSrc );
tree.dive( this );
for (String s : opsAndMultiplier.keySet())
@ -158,7 +158,7 @@ public class CraftingJob implements Runnable, ICraftingJob
AELog.crafting( "------------- " + getByteTotal() + "b real" + timer.elapsed( TimeUnit.MILLISECONDS ) + "ms" );
// if ( mode == Actionable.MODULATE )
// meci.moveItemsToStorage( storage );
// craftingInventory.moveItemsToStorage( storage );
}
catch (CraftBranchFailure e)
{
@ -167,13 +167,13 @@ public class CraftingJob implements Runnable, ICraftingJob
try
{
Stopwatch timer = Stopwatch.createStarted();
MECraftingInventory meci = new MECraftingInventory( original, true, false, true );
meci.ignore( output );
MECraftingInventory craftingInventory = new MECraftingInventory( original, true, false, true );
craftingInventory.ignore( output );
availableCheck = new MECraftingInventory( original, false, false, false );
tree.setSimulate();
tree.request( meci, output.getStackSize(), actionSrc );
tree.request( craftingInventory, output.getStackSize(), actionSrc );
tree.dive( this );
for (String s : opsAndMultiplier.keySet())
@ -300,7 +300,7 @@ public class CraftingJob implements Runnable, ICraftingJob
private int incTime = Integer.MAX_VALUE;
public void handlepausing() throws InterruptedException
public void handlePausing() throws InterruptedException
{
if ( incTime++ > 100 )
{

View file

@ -93,7 +93,7 @@ public class CraftingTreeNode
public IAEItemStack request(MECraftingInventory inv, long l, BaseActionSource src) throws CraftBranchFailure, InterruptedException
{
job.handlepausing();
job.handlePausing();
List<IAEItemStack> thingsUsed = new LinkedList();

View file

@ -31,7 +31,7 @@ public class CraftingTreeProcess
long crafts = 0;
boolean containerItems;
boolean limitQty;
boolean fullsimulation;
boolean fullSimulation;
private long bytes = 0;
final private int depth;
@ -61,7 +61,7 @@ public class CraftingTreeProcess
{
ItemStack g = ic.getStackInSlot( x );
if ( g != null && g.stackSize > 1 )
fullsimulation = true;
fullSimulation = true;
}
for ( IAEItemStack part : details.getCondensedInputs() )
@ -100,8 +100,8 @@ public class CraftingTreeProcess
{
for (int x = 0; x < list.length; x++)
{
IAEItemStack ppart = list[x];
if ( part != null && part.equals( ppart ) )
IAEItemStack comparePart = list[x];
if ( part != null && part.equals( comparePart ) )
{
// use the first slot...
nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() );
@ -142,7 +142,7 @@ public class CraftingTreeProcess
long getTimes(long remaining, long stackSize)
{
if ( limitQty || fullsimulation )
if ( limitQty || fullSimulation )
return 1;
return (remaining / stackSize) + (remaining % stackSize != 0 ? 1 : 0);
}
@ -175,9 +175,9 @@ public class CraftingTreeProcess
public void request(MECraftingInventory inv, long i, BaseActionSource src) throws CraftBranchFailure, InterruptedException
{
job.handlepausing();
job.handlePausing();
if ( fullsimulation )
if ( fullSimulation )
{
InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 );

View file

@ -121,28 +121,28 @@ final public class EntityGrowingCrystal extends EntityItem
int qty = 0;
if ( isAccel( x + 1, y, z ) )
if ( isAccelerated( x + 1, y, z ) )
qty += per + qty * mul;
if ( isAccel( x, y + 1, z ) )
if ( isAccelerated( x, y + 1, z ) )
qty += per + qty * mul;
if ( isAccel( x, y, z + 1 ) )
if ( isAccelerated( x, y, z + 1 ) )
qty += per + qty * mul;
if ( isAccel( x - 1, y, z ) )
if ( isAccelerated( x - 1, y, z ) )
qty += per + qty * mul;
if ( isAccel( x, y - 1, z ) )
if ( isAccelerated( x, y - 1, z ) )
qty += per + qty * mul;
if ( isAccel( x, y, z - 1 ) )
if ( isAccelerated( x, y, z - 1 ) )
qty += per + qty * mul;
return qty;
}
private boolean isAccel(int x, int y, int z)
private boolean isAccelerated(int x, int y, int z)
{
TileEntity te = worldObj.getTileEntity( x, y, z );
if ( te instanceof ICrystalGrowthAccelerator )

View file

@ -30,8 +30,8 @@ final public class EntityTinyTNTPrimed extends EntityTNTPrimed implements IEntit
this.setSize( 0.35F, 0.35F );
}
public EntityTinyTNTPrimed(World w, double x, double y, double z, EntityLivingBase ignitor) {
super( w, x, y, z, ignitor );
public EntityTinyTNTPrimed(World w, double x, double y, double z, EntityLivingBase igniter) {
super( w, x, y, z, igniter );
this.setSize( 0.55F, 0.55F );
this.yOffset = this.height / 2.0F;
}

View file

@ -79,7 +79,7 @@ public class FacadeContainer implements IFacadeContainer
else if ( !isBC )
{
ItemFacade ifa = (ItemFacade) AEApi.instance().items().itemFacade.item();
ItemStack facade = ifa.createFromInts( ids );
ItemStack facade = ifa.createFromIDs( ids );
if ( facade != null )
{
changed = changed || storage.getFacade( x ) == null;
@ -180,18 +180,18 @@ public class FacadeContainer implements IFacadeContainer
public void rotateLeft()
{
IFacadePart newfacades[] = new FacadePart[6];
IFacadePart newFacades[] = new FacadePart[6];
newfacades[ForgeDirection.UP.ordinal()] = storage.getFacade( ForgeDirection.UP.ordinal() );
newfacades[ForgeDirection.DOWN.ordinal()] = storage.getFacade( ForgeDirection.DOWN.ordinal() );
newFacades[ForgeDirection.UP.ordinal()] = storage.getFacade( ForgeDirection.UP.ordinal() );
newFacades[ForgeDirection.DOWN.ordinal()] = storage.getFacade( ForgeDirection.DOWN.ordinal() );
newfacades[ForgeDirection.EAST.ordinal()] = storage.getFacade( ForgeDirection.NORTH.ordinal() );
newfacades[ForgeDirection.SOUTH.ordinal()] = storage.getFacade( ForgeDirection.EAST.ordinal() );
newFacades[ForgeDirection.EAST.ordinal()] = storage.getFacade( ForgeDirection.NORTH.ordinal() );
newFacades[ForgeDirection.SOUTH.ordinal()] = storage.getFacade( ForgeDirection.EAST.ordinal() );
newfacades[ForgeDirection.WEST.ordinal()] = storage.getFacade( ForgeDirection.SOUTH.ordinal() );
newfacades[ForgeDirection.NORTH.ordinal()] = storage.getFacade( ForgeDirection.WEST.ordinal() );
newFacades[ForgeDirection.WEST.ordinal()] = storage.getFacade( ForgeDirection.SOUTH.ordinal() );
newFacades[ForgeDirection.NORTH.ordinal()] = storage.getFacade( ForgeDirection.WEST.ordinal() );
for (int x = 0; x < facades; x++)
storage.setFacade( x, newfacades[x] );
storage.setFacade( x, newFacades[x] );
}
}

View file

@ -154,8 +154,8 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
{
if ( len > 0 )
{
ByteBuf bybuff = Unpooled.wrappedBuffer( data );
cb.readFromStream( bybuff );
ByteBuf byteBuffer = Unpooled.wrappedBuffer( data );
cb.readFromStream( byteBuffer );
}
}
catch (IOException e)
@ -169,7 +169,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
{
AxisAlignedBB b = null;
for (AxisAlignedBB bx : cb.getSelectedBoundingBoxsFromPool( false, true, null, true ))
for (AxisAlignedBB bx : cb.getSelectedBoundingBoxesFromPool( false, true, null, true ))
{
if ( b == null )
b = bx;
@ -403,16 +403,16 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
}
@Override
public boolean occlusionTest(TMultiPart npart)
public boolean occlusionTest(TMultiPart part)
{
return NormalOcclusionTest.apply( this, npart );
return NormalOcclusionTest.apply( this, part );
}
@Override
public Iterable<Cuboid6> getCollisionBoxes()
{
LinkedList l = new LinkedList();
for (AxisAlignedBB b : cb.getSelectedBoundingBoxsFromPool( false, true, null, false ))
for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( false, true, null, false ))
{
l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) );
}
@ -435,7 +435,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
public Iterable<Cuboid6> getOcclusionBoxes()
{
LinkedList l = new LinkedList();
for (AxisAlignedBB b : cb.getSelectedBoundingBoxsFromPool( true, disableFacadeOcclusion.get() == null, null, true ))
for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( true, disableFacadeOcclusion.get() == null, null, true ))
{
l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) );
}

View file

@ -58,7 +58,7 @@ import appeng.core.settings.TickRates;
import appeng.me.GridAccessException;
import appeng.me.helpers.AENetworkProxy;
import appeng.me.storage.MEMonitorIInventory;
import appeng.me.storage.MEMonitorPassthu;
import appeng.me.storage.MEMonitorPassThrough;
import appeng.me.storage.NullInventory;
import appeng.parts.automation.UpgradeInventory;
import appeng.tile.inventory.AppEngInternalAEInventory;
@ -196,8 +196,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
}
}
public DualityInterface(AENetworkProxy prox, IInterfaceHost ih) {
gridProxy = prox;
public DualityInterface(AENetworkProxy networkProxy, IInterfaceHost ih) {
gridProxy = networkProxy;
gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL );
upgrades = new UpgradeInventory( gridProxy.getMachineRepresentation(), this, 1 );
@ -250,7 +250,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
}
}
notifyNeightbors();
notifyNeighbors();
}
public void writeToNBT(NBTTagCompound data)
@ -513,8 +513,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
return patterns;
}
MEMonitorPassthu<IAEItemStack> items = new MEMonitorPassthu<IAEItemStack>( new NullInventory(), StorageChannel.ITEMS );
MEMonitorPassthu<IAEFluidStack> fluids = new MEMonitorPassthu<IAEFluidStack>( new NullInventory(), StorageChannel.FLUIDS );
MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<IAEItemStack>( new NullInventory(), StorageChannel.ITEMS );
MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<IAEFluidStack>( new NullInventory(), StorageChannel.FLUIDS );
public void gridChanged()
{
@ -529,7 +529,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
fluids.setInternal( new NullInventory() );
}
notifyNeightbors();
notifyNeighbors();
}
public AECableType getCableConnectionType(ForgeDirection dir)
@ -936,7 +936,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
drops.add( is );
}
public void notifyNeightbors()
public void notifyNeighbors()
{
if ( gridProxy.isActive() )
{

View file

@ -3,11 +3,11 @@ package appeng.helpers;
public enum InventoryAction
{
// standard vanilla mechanics.
PICKUP_OR_SETDOWN, SPLIT_OR_PLACESINGLE, CREATIVE_DUPLICATE, SHIFT_CLICK,
PICKUP_OR_SET_DOWN, SPLIT_OR_PLACE_SINGLE, CREATIVE_DUPLICATE, SHIFT_CLICK,
// crafting term
CRAFT_STACK, CRAFT_ITEM, CRAFT_SHIFT,
// extra...
MOVE_REGION, PICKUP_SINGLE, UPDATE_HAND, ROLLUP, ROLLDOWN, AUTOCRAFT, PLACE_SINGLE
MOVE_REGION, PICKUP_SINGLE, UPDATE_HAND, ROLL_UP, ROLL_DOWN, AUTO_CRAFT, PLACE_SINGLE
}

View file

@ -30,7 +30,7 @@ public class MeteoritePlacer
private class Fallout
{
public int adjustCrator()
public int adjustCrater()
{
return 0;
}
@ -111,7 +111,7 @@ public class MeteoritePlacer
super( w, x, y, z );
}
public int adjustCrator()
public int adjustCrater()
{
return 2;
}
@ -131,7 +131,7 @@ public class MeteoritePlacer
super( w, x, y, z );
}
public int adjustCrator()
public int adjustCrater()
{
return 2;
}
@ -381,10 +381,10 @@ public class MeteoritePlacer
Block skychest;
double real_sizeOfMeteorite = (Math.random() * 6.0) + 2;
double real_crator = real_sizeOfMeteorite * 2 + 5;
double realCrater = real_sizeOfMeteorite * 2 + 5;
double sizeOfMeteorite = real_sizeOfMeteorite * real_sizeOfMeteorite;
double crator = real_crator * real_crator;
double crater = realCrater * realCrater;
public MeteoritePlacer() {
@ -431,9 +431,9 @@ public class MeteoritePlacer
int z = settings.getInteger( "z" );
real_sizeOfMeteorite = settings.getDouble( "real_sizeOfMeteorite" );
real_crator = settings.getDouble( "real_crator" );
realCrater = settings.getDouble( "realCrater" );
sizeOfMeteorite = settings.getDouble( "sizeOfMeteorite" );
crator = settings.getDouble( "crator" );
crater = settings.getDouble( "crater" );
Block blk = Block.getBlockById( settings.getInteger( "blk" ) );
@ -448,7 +448,7 @@ public class MeteoritePlacer
// creator
if ( skyMode > 10 )
placeCrator( w, x, y, z );
placeCrater( w, x, y, z );
placeMeteorite( w, x, y, z );
@ -486,9 +486,9 @@ public class MeteoritePlacer
settings.setInteger( "blk", Block.getIdFromBlock( blk ) );
settings.setDouble( "real_sizeOfMeteorite", real_sizeOfMeteorite );
settings.setDouble( "real_crator", real_crator );
settings.setDouble( "realCrater", realCrater );
settings.setDouble( "sizeOfMeteorite", sizeOfMeteorite );
settings.setDouble( "crator", crator );
settings.setDouble( "crater", crater );
settings.setBoolean( "lava", Math.random() > 0.9 );
@ -547,7 +547,7 @@ public class MeteoritePlacer
// creator
if ( skyMode > 10 )
placeCrator( w, x, y, z );
placeCrater( w, x, y, z );
placeMeteorite( w, x, y, z );
@ -564,7 +564,7 @@ public class MeteoritePlacer
return false;
}
private void placeCrator(IMeteoriteWorld w, int x, int y, int z)
private void placeCrater(IMeteoriteWorld w, int x, int y, int z)
{
boolean lava = settings.getBoolean( "lava" );
@ -583,7 +583,7 @@ public class MeteoritePlacer
{
double dx = i - x;
double dz = k - z;
double h = y - real_sizeOfMeteorite + 1 + type.adjustCrator();
double h = y - real_sizeOfMeteorite + 1 + type.adjustCrater();
double distanceFrom = dx * dx + dz * dz;
@ -610,15 +610,15 @@ public class MeteoritePlacer
private void placeMeteorite(IMeteoriteWorld w, int x, int y, int z)
{
int Xmeteor_l = w.minX( x - 8 );
int Xmeteor_h = w.maxX( x + 8 );
int Zmeteor_l = w.minZ( z - 8 );
int Zmeteor_h = w.maxZ( z + 8 );
int meteorXLength = w.minX( x - 8 );
int meteorXHeight = w.maxX( x + 8 );
int meteorZLength = w.minZ( z - 8 );
int meteorZHeight = w.maxZ( z + 8 );
// spawn metor
for (int i = Xmeteor_l; i < Xmeteor_h; i++)
// spawn meteor
for (int i = meteorXLength; i < meteorXHeight; i++)
for (int j = y - 8; j < y + 8; j++)
for (int k = Zmeteor_l; k < Zmeteor_h; k++)
for (int k = meteorZLength; k < meteorZHeight; k++)
{
double dx = i - x;
double dy = j - y;
@ -724,13 +724,13 @@ public class MeteoritePlacer
{
double randomShit = 0;
int Xmeteor_l = w.minX( x - 30 );
int Xmeteor_h = w.maxX( x + 30 );
int Zmeteor_l = w.minZ( z - 30 );
int Zmeteor_h = w.maxZ( z + 30 );
int meteorXLength = w.minX( x - 30 );
int meteorXHeight = w.maxX( x + 30 );
int meteorZLength = w.minZ( z - 30 );
int meteorZHeight = w.maxZ( z + 30 );
for (int i = Xmeteor_l; i < Xmeteor_h; i++)
for (int k = Zmeteor_l; k < Zmeteor_h; k++)
for (int i = meteorXLength; i < meteorXHeight; i++)
for (int k = meteorZLength; k < meteorZHeight; k++)
for (int j = y - 9; j < y + 30; j++)
{
Block blk = w.getBlock( i, j, k );
@ -749,7 +749,7 @@ public class MeteoritePlacer
w.setBlock( i, j, k, blk_b, meta_b, 3 );
w.setBlock( i, j + 1, k, blk );
}
else if ( randomShit < 100 * crator )
else if ( randomShit < 100 * crater )
{
double dx = i - x;
double dy = j - y;
@ -759,8 +759,8 @@ public class MeteoritePlacer
Block xf = w.getBlock( i, j - 1, k );
if ( !xf.isReplaceable( w.getWorld(), i, j - 1, k ) )
{
double extrRange = Math.random() * 0.6;
double height = crator * (extrRange + 0.2) - Math.abs( dist - crator * 1.7 );
double extraRange = Math.random() * 0.6;
double height = crater * (extraRange + 0.2) - Math.abs( dist - crater * 1.7 );
if ( xf != blk && height > 0 && Math.random() > 0.6 )
{
@ -782,7 +782,7 @@ public class MeteoritePlacer
double dy = j - y;
double dz = k - z;
if ( dx * dx + dy * dy + dz * dz < crator * 1.6 )
if ( dx * dx + dy * dy + dz * dz < crater * 1.6 )
{
type.getRandomInset( w, i, j, k );
}

View file

@ -62,19 +62,19 @@ public class MultiCraftingTracker
{
if ( ais != null && d.simulateAdd( ais.getItemStack() ) == null )
{
Future<ICraftingJob> cjob = getJob( x );
Future<ICraftingJob> craftingJob = getJob( x );
if ( getLink( x ) != null )
{
return false;
}
else if ( cjob != null )
else if ( craftingJob != null )
{
ICraftingJob job = null;
try
{
if ( cjob.isDone() )
job = cjob.get();
else if ( cjob.isCancelled() )
if ( craftingJob.isDone() )
job = craftingJob.get();
else if ( craftingJob.isCancelled() )
job = null;
if ( job != null )

View file

@ -25,7 +25,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
{
final ItemStack patternItem;
private IAEItemStack aepattern;
private IAEItemStack pattern;
final InventoryCrafting crafting = new InventoryCrafting( new ContainerNull(), 3, 3 );
final InventoryCrafting testFrame = new InventoryCrafting( new ContainerNull(), 3, 3 );
@ -120,7 +120,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
NBTTagList outTag = encodedValue.getTagList( "out", 10 );
isCrafting = encodedValue.getBoolean( "crafting" );
patternItem = is;
aepattern = AEItemStack.create( is );
pattern = AEItemStack.create( is );
List<IAEItemStack> in = new ArrayList();
List<IAEItemStack> out = new ArrayList();
@ -331,13 +331,13 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
@Override
public int hashCode()
{
return aepattern.hashCode();
return pattern.hashCode();
}
@Override
public boolean equals(Object obj)
{
return aepattern.equals( ((PatternHelper) obj).aepattern );
return pattern.equals( ((PatternHelper) obj).pattern );
}
@Override

Some files were not shown because too many files have changed in this diff Show more