Merged in TypoTake2 (pull request #1)

Typos within appeng code

Also: f9625d882c

To fix broken Localization.
This commit is contained in:
AlgorithmX2 2014-09-22 11:56:06 -05:00
commit fe927ce65d
247 changed files with 1109 additions and 1147 deletions

View file

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import appeng.client.texture.FlippableIcon;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -36,7 +37,6 @@ import appeng.block.networking.BlockCableBus;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.render.BlockRenderInfo; import appeng.client.render.BlockRenderInfo;
import appeng.client.render.WorldRender; import appeng.client.render.WorldRender;
import appeng.client.texture.FlipableIcon;
import appeng.client.texture.MissingIcon; import appeng.client.texture.MissingIcon;
import appeng.core.features.AEFeature; import appeng.core.features.AEFeature;
import appeng.core.features.AEFeatureHandler; import appeng.core.features.AEFeatureHandler;
@ -94,11 +94,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private FlipableIcon optionaIcon(IIconRegister ir, String Name, IIcon substitute) private FlippableIcon optionalIcon(IIconRegister ir, String Name, IIcon substitute)
{ {
// if the input is an flippable IIcon find the original. // if the input is an flippable IIcon find the original.
while (substitute instanceof FlipableIcon) while (substitute instanceof FlippableIcon)
substitute = ((FlipableIcon) substitute).getOriginal(); substitute = ((FlippableIcon) substitute).getOriginal();
if ( substitute != null ) if ( substitute != null )
{ {
@ -110,15 +110,15 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc ); IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
if ( res != null ) if ( res != null )
return new FlipableIcon( ir.registerIcon( Name ) ); return new FlippableIcon( ir.registerIcon( Name ) );
} }
catch (Throwable e) catch (Throwable e)
{ {
return new FlipableIcon( substitute ); return new FlippableIcon( substitute );
} }
} }
return new FlipableIcon( ir.registerIcon( Name ) ); return new FlippableIcon( ir.registerIcon( Name ) );
} }
@Override @Override
@ -126,21 +126,21 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public void registerBlockIcons(IIconRegister iconRegistry) public void registerBlockIcons(IIconRegister iconRegistry)
{ {
BlockRenderInfo info = getRendererInstance(); BlockRenderInfo info = getRendererInstance();
FlipableIcon topIcon; FlippableIcon topIcon;
FlipableIcon bottomIcon; FlippableIcon bottomIcon;
FlipableIcon sideIcon; FlippableIcon sideIcon;
FlipableIcon eastIcon; FlippableIcon eastIcon;
FlipableIcon westIcon; FlippableIcon westIcon;
FlipableIcon southIcon; FlippableIcon southIcon;
FlipableIcon northIcon; FlippableIcon northIcon;
this.blockIcon = topIcon = optionaIcon( iconRegistry, this.getTextureName(), null ); this.blockIcon = topIcon = optionalIcon( iconRegistry, this.getTextureName(), null );
bottomIcon = optionaIcon( iconRegistry, this.getTextureName() + "Bottom", topIcon ); bottomIcon = optionalIcon( iconRegistry, this.getTextureName() + "Bottom", topIcon );
sideIcon = optionaIcon( iconRegistry, this.getTextureName() + "Side", topIcon ); sideIcon = optionalIcon( iconRegistry, this.getTextureName() + "Side", topIcon );
eastIcon = optionaIcon( iconRegistry, this.getTextureName() + "East", sideIcon ); eastIcon = optionalIcon( iconRegistry, this.getTextureName() + "East", sideIcon );
westIcon = optionaIcon( iconRegistry, this.getTextureName() + "West", sideIcon ); westIcon = optionalIcon( iconRegistry, this.getTextureName() + "West", sideIcon );
southIcon = optionaIcon( iconRegistry, this.getTextureName() + "Front", sideIcon ); southIcon = optionalIcon( iconRegistry, this.getTextureName() + "Front", sideIcon );
northIcon = optionaIcon( iconRegistry, this.getTextureName() + "Back", sideIcon ); northIcon = optionalIcon( iconRegistry, this.getTextureName() + "Back", sideIcon );
info.updateIcons( bottomIcon, topIcon, northIcon, southIcon, eastIcon, westIcon ); info.updateIcons( bottomIcon, topIcon, northIcon, southIcon, eastIcon, westIcon );
} }
@ -148,7 +148,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public void registerNoIcons() public void registerNoIcons()
{ {
BlockRenderInfo info = getRendererInstance(); BlockRenderInfo info = getRendererInstance();
FlipableIcon i = new FlipableIcon( new MissingIcon( this ) ); FlippableIcon i = new FlippableIcon( new MissingIcon( this ) );
info.updateIcons( i, i, i, i, i, i ); info.updateIcons( i, i, i, i, i, i );
} }
@ -173,7 +173,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return getIcon( mapRotation( w, x, y, z, s ), w.getBlockMetadata( x, y, z ) ); return getIcon( mapRotation( w, x, y, z, s ), w.getBlockMetadata( x, y, z ) );
} }
protected void setTileEntiy(Class<? extends TileEntity> c) protected void setTileEntity(Class<? extends TileEntity> c)
{ {
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) ); AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
GameRegistry.registerTileEntity( tileEntityType = c, FeatureFullname ); GameRegistry.registerTileEntity( tileEntityType = c, FeatureFullname );
@ -181,7 +181,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
setTileProvider( hasBlockTileEntity() ); setTileProvider( hasBlockTileEntity() );
} }
protected void setfeature(EnumSet<AEFeature> f) protected void setFeature(EnumSet<AEFeature> f)
{ {
feature = new AEFeatureHandler( f, this, FeatureSubname ); feature = new AEFeatureHandler( f, this, FeatureSubname );
} }
@ -475,7 +475,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
if ( collisionHandler != null ) if ( collisionHandler != null )
{ {
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxsFromPool( w, x, y, z, null, true ); Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, true );
MovingObjectPosition br = null; MovingObjectPosition br = null;
double lastDist = 0; double lastDist = 0;
@ -537,7 +537,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
EntityPlayer player = Minecraft.getMinecraft().thePlayer; EntityPlayer player = Minecraft.getMinecraft().thePlayer;
LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) ); LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) );
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxsFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true ); Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true );
AxisAlignedBB br = null; AxisAlignedBB br = null;
double lastDist = 0; double lastDist = 0;
@ -572,7 +572,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
} }
} }
for (AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxsFromPool( w, x, y, z, null, false )) for (AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, false ))
{ {
if ( b == null ) if ( b == null )
b = bx; b = bx;

View file

@ -18,7 +18,7 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
public BlockCraftingMonitor() { public BlockCraftingMonitor() {
super( BlockCraftingMonitor.class ); super( BlockCraftingMonitor.class );
setTileEntiy( TileCraftingMonitorTile.class ); setTileEntity( TileCraftingMonitorTile.class );
} }
@Override @Override

View file

@ -14,7 +14,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
public BlockCraftingStorage() { public BlockCraftingStorage() {
super( BlockCraftingStorage.class ); super( BlockCraftingStorage.class );
setTileEntiy( TileCraftingStorageTile.class ); setTileEntity( TileCraftingStorageTile.class );
} }
@Override @Override

View file

@ -30,12 +30,12 @@ public class BlockCraftingUnit extends AEBaseBlock
public BlockCraftingUnit(Class<? extends BlockCraftingUnit> childClass) { public BlockCraftingUnit(Class<? extends BlockCraftingUnit> childClass) {
super( childClass, Material.iron ); super( childClass, Material.iron );
hasSubtypes = true; hasSubtypes = true;
setfeature( EnumSet.of( AEFeature.CraftingCPU ) ); setFeature( EnumSet.of( AEFeature.CraftingCPU ) );
} }
public BlockCraftingUnit() { public BlockCraftingUnit() {
this( BlockCraftingUnit.class ); this( BlockCraftingUnit.class );
setTileEntiy( TileCraftingTile.class ); setTileEntity( TileCraftingTile.class );
} }
@Override @Override

View file

@ -21,8 +21,8 @@ public class BlockMolecularAssembler extends AEBaseBlock
public BlockMolecularAssembler() { public BlockMolecularAssembler() {
super( BlockMolecularAssembler.class, Material.iron ); super( BlockMolecularAssembler.class, Material.iron );
setfeature( EnumSet.of( AEFeature.MolecularAssembler ) ); setFeature( EnumSet.of( AEFeature.MolecularAssembler ) );
setTileEntiy( TileMolecularAssembler.class ); setTileEntity( TileMolecularAssembler.class );
isOpaque = false; isOpaque = false;
lightOpacity = 1; lightOpacity = 1;
} }

View file

@ -25,8 +25,8 @@ public class BlockCrank extends AEBaseBlock
public BlockCrank() { public BlockCrank() {
super( BlockCrank.class, Material.wood ); super( BlockCrank.class, Material.wood );
setfeature( EnumSet.of( AEFeature.GrindStone ) ); setFeature( EnumSet.of( AEFeature.GrindStone ) );
setTileEntiy( TileCrank.class ); setTileEntity( TileCrank.class );
setLightOpacity( 0 ); setLightOpacity( 0 );
isFullSize = isOpaque = false; isFullSize = isOpaque = false;
} }

View file

@ -17,8 +17,8 @@ public class BlockGrinder extends AEBaseBlock
public BlockGrinder() { public BlockGrinder() {
super( BlockGrinder.class, Material.rock ); super( BlockGrinder.class, Material.rock );
setfeature( EnumSet.of( AEFeature.GrindStone ) ); setFeature( EnumSet.of( AEFeature.GrindStone ) );
setTileEntiy( TileGrinder.class ); setTileEntity( TileGrinder.class );
setHardness( 3.2F ); setHardness( 3.2F );
} }

View file

@ -17,8 +17,8 @@ public class BlockCellWorkbench extends AEBaseBlock
public BlockCellWorkbench() { public BlockCellWorkbench() {
super( BlockCellWorkbench.class, Material.iron ); super( BlockCellWorkbench.class, Material.iron );
setfeature( EnumSet.of( AEFeature.StorageCells ) ); setFeature( EnumSet.of( AEFeature.StorageCells ) );
setTileEntiy( TileCellWorkbench.class ); setTileEntity( TileCellWorkbench.class );
} }
@Override @Override

View file

@ -33,8 +33,8 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
public BlockCharger() { public BlockCharger() {
super( BlockCharger.class, Material.iron ); super( BlockCharger.class, Material.iron );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntiy( TileCharger.class ); setTileEntity( TileCharger.class );
setLightOpacity( 2 ); setLightOpacity( 2 );
isFullSize = isOpaque = false; isFullSize = isOpaque = false;
} }
@ -98,7 +98,7 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
TileCharger tile = getTileEntity( w, x, y, z ); TileCharger tile = getTileEntity( w, x, y, z );
if ( tile != null ) if ( tile != null )

View file

@ -17,8 +17,8 @@ public class BlockCondenser extends AEBaseBlock
public BlockCondenser() { public BlockCondenser() {
super( BlockCondenser.class, Material.iron ); super( BlockCondenser.class, Material.iron );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntiy( TileCondenser.class ); setTileEntity( TileCondenser.class );
} }
@Override @Override

View file

@ -19,8 +19,8 @@ public class BlockInscriber extends AEBaseBlock
public BlockInscriber() { public BlockInscriber() {
super( BlockInscriber.class, Material.iron ); super( BlockInscriber.class, Material.iron );
setfeature( EnumSet.of( AEFeature.Inscriber ) ); setFeature( EnumSet.of( AEFeature.Inscriber ) );
setTileEntiy( TileInscriber.class ); setTileEntity( TileInscriber.class );
setLightOpacity( 2 ); setLightOpacity( 2 );
isFullSize = isOpaque = false; isFullSize = isOpaque = false;
} }

View file

@ -20,8 +20,8 @@ public class BlockInterface extends AEBaseBlock
public BlockInterface() { public BlockInterface() {
super( BlockInterface.class, Material.iron ); super( BlockInterface.class, Material.iron );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntiy( TileInterface.class ); setTileEntity( TileInterface.class );
} }
@Override @Override

View file

@ -15,8 +15,8 @@ public class BlockLightDetector extends BlockQuartzTorch
public BlockLightDetector() { public BlockLightDetector() {
super( BlockLightDetector.class ); super( BlockLightDetector.class );
setfeature( EnumSet.of( AEFeature.LightDetector ) ); setFeature( EnumSet.of( AEFeature.LightDetector ) );
setTileEntiy( TileLightDetector.class ); setTileEntity( TileLightDetector.class );
} }
@Override @Override

View file

@ -24,8 +24,8 @@ public class BlockPaint extends AEBaseBlock
public BlockPaint() { public BlockPaint() {
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) ); super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
setfeature( EnumSet.of( AEFeature.PaintBalls ) ); setFeature( EnumSet.of( AEFeature.PaintBalls ) );
setTileEntiy( TilePaint.class ); setTileEntity( TilePaint.class );
setLightOpacity( 0 ); setLightOpacity( 0 );
isFullSize = false; isFullSize = false;
isOpaque = false; isOpaque = false;

View file

@ -29,8 +29,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
public BlockQuartzGrowthAccelerator() { public BlockQuartzGrowthAccelerator() {
super( BlockQuartzGrowthAccelerator.class, Material.rock ); super( BlockQuartzGrowthAccelerator.class, Material.rock );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntiy( TileQuartzGrowthAccelerator.class ); setTileEntity( TileQuartzGrowthAccelerator.class );
} }
@Override @Override

View file

@ -39,7 +39,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
public BlockQuartzTorch() { public BlockQuartzTorch() {
this( BlockQuartzTorch.class ); this( BlockQuartzTorch.class );
setfeature( EnumSet.of( AEFeature.DecorativeLights ) ); setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
setLightLevel( 0.9375F ); setLightLevel( 0.9375F );
} }
@ -91,7 +91,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
ForgeDirection up = getOrientable( w, x, y, z ).getUp(); ForgeDirection up = getOrientable( w, x, y, z ).getUp();
double xOff = -0.3 * up.offsetX; double xOff = -0.3 * up.offsetX;

View file

@ -19,8 +19,8 @@ public class BlockSecurity extends AEBaseBlock
public BlockSecurity() { public BlockSecurity() {
super( BlockSecurity.class, Material.iron ); super( BlockSecurity.class, Material.iron );
setfeature( EnumSet.of( AEFeature.Security ) ); setFeature( EnumSet.of( AEFeature.Security ) );
setTileEntiy( TileSecurity.class ); setTileEntity( TileSecurity.class );
} }
@Override @Override

View file

@ -27,8 +27,8 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
public BlockSkyCompass() { public BlockSkyCompass() {
super( BlockSkyCompass.class, Material.iron ); super( BlockSkyCompass.class, Material.iron );
setfeature( EnumSet.of( AEFeature.MeteoriteCompass ) ); setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) );
setTileEntiy( TileSkyCompass.class ); setTileEntity( TileSkyCompass.class );
isOpaque = isFullSize = false; isOpaque = isFullSize = false;
lightOpacity = 0; lightOpacity = 0;
} }
@ -86,7 +86,7 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
TileSkyCompass tile = getTileEntity( w, x, y, z ); TileSkyCompass tile = getTileEntity( w, x, y, z );
if ( tile != null ) if ( tile != null )

View file

@ -36,7 +36,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
public BlockTinyTNT() { public BlockTinyTNT() {
super( BlockTinyTNT.class, Material.tnt ); super( BlockTinyTNT.class, Material.tnt );
setfeature( EnumSet.of( AEFeature.TinyTNT ) ); setFeature( EnumSet.of( AEFeature.TinyTNT ) );
setLightOpacity( 3 ); setLightOpacity( 3 );
setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f ); setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
isFullSize = isOpaque = false; isFullSize = isOpaque = false;
@ -150,7 +150,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) } ); return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) } );
} }

View file

@ -23,8 +23,8 @@ public class BlockVibrationChamber extends AEBaseBlock
public BlockVibrationChamber() { public BlockVibrationChamber() {
super( BlockVibrationChamber.class, Material.iron ); super( BlockVibrationChamber.class, Material.iron );
setfeature( EnumSet.of( AEFeature.PowerGen ) ); setFeature( EnumSet.of( AEFeature.PowerGen ) );
setTileEntiy( TileVibrationChamber.class ); setTileEntity( TileVibrationChamber.class );
setHardness( 4.2F ); setHardness( 4.2F );
} }

View file

@ -76,7 +76,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
public BlockCableBus() { public BlockCableBus() {
super( BlockCableBus.class, AEGlassMaterial.instance ); super( BlockCableBus.class, AEGlassMaterial.instance );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setLightOpacity( 0 ); setLightOpacity( 0 );
isFullSize = isOpaque = false; isFullSize = isOpaque = false;
} }
@ -399,7 +399,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
public void setupTile() public void setupTile()
{ {
setTileEntiy( noTesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBus.class.getName() ) ); setTileEntity( noTesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBus.class.getName() ) );
if ( Platform.isClient() ) if ( Platform.isClient() )
{ {
tesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBusTESR.class.getName() ); tesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBusTESR.class.getName() );

View file

@ -16,8 +16,8 @@ public class BlockController extends AEBaseBlock
public BlockController() { public BlockController() {
super( BlockController.class, Material.iron ); super( BlockController.class, Material.iron );
setfeature( EnumSet.of( AEFeature.Channels ) ); setFeature( EnumSet.of( AEFeature.Channels ) );
setTileEntiy( TileController.class ); setTileEntity( TileController.class );
setHardness( 6 ); setHardness( 6 );
} }

View file

@ -12,8 +12,8 @@ public class BlockCreativeEnergyCell extends AEBaseBlock
public BlockCreativeEnergyCell() { public BlockCreativeEnergyCell() {
super( BlockCreativeEnergyCell.class, AEGlassMaterial.instance ); super( BlockCreativeEnergyCell.class, AEGlassMaterial.instance );
setfeature( EnumSet.of( AEFeature.Creative ) ); setFeature( EnumSet.of( AEFeature.Creative ) );
setTileEntiy( TileCreativeEnergyCell.class ); setTileEntity( TileCreativeEnergyCell.class );
} }
} }

View file

@ -18,8 +18,8 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
public BlockDenseEnergyCell() { public BlockDenseEnergyCell() {
super( BlockDenseEnergyCell.class ); super( BlockDenseEnergyCell.class );
setfeature( EnumSet.of( AEFeature.DenseEnergyCells ) ); setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
setTileEntiy( TileDenseEnergyCell.class ); setTileEntity( TileDenseEnergyCell.class );
} }
@Override @Override

View file

@ -12,8 +12,8 @@ public class BlockEnergyAcceptor extends AEBaseBlock
public BlockEnergyAcceptor() { public BlockEnergyAcceptor() {
super( BlockEnergyAcceptor.class, Material.iron ); super( BlockEnergyAcceptor.class, Material.iron );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntiy( TileEnergyAcceptor.class ); setTileEntity( TileEnergyAcceptor.class );
} }
} }

View file

@ -32,8 +32,8 @@ public class BlockEnergyCell extends AEBaseBlock
public BlockEnergyCell() { public BlockEnergyCell() {
this( BlockEnergyCell.class ); this( BlockEnergyCell.class );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntiy( TileEnergyCell.class ); setTileEntity( TileEnergyCell.class );
} }
@Override @Override

View file

@ -25,8 +25,8 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
public BlockWireless() { public BlockWireless() {
super( BlockWireless.class, AEGlassMaterial.instance ); super( BlockWireless.class, AEGlassMaterial.instance );
setfeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) ); setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
setTileEntiy( TileWireless.class ); setTileEntity( TileWireless.class );
setLightOpacity( 0 ); setLightOpacity( 0 );
isFullSize = false; isFullSize = false;
isOpaque = false; isOpaque = false;
@ -45,7 +45,7 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
TileWireless tile = getTileEntity( w, x, y, z ); TileWireless tile = getTileEntity( w, x, y, z );
if ( tile != null ) if ( tile != null )

View file

@ -30,8 +30,8 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
public BlockQuantumLinkChamber() { public BlockQuantumLinkChamber() {
super( BlockQuantumLinkChamber.class, AEGlassMaterial.instance ); super( BlockQuantumLinkChamber.class, AEGlassMaterial.instance );
setfeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) ); setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
setTileEntiy( TileQuantumBridge.class ); setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f; float shave = 2.0f / 16.0f;
setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave ); setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
setLightOpacity( 0 ); setLightOpacity( 0 );
@ -94,7 +94,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
double OnePx = 2.0 / 16.0; double OnePx = 2.0 / 16.0;
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) } ); return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) } );

View file

@ -21,8 +21,8 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
public BlockQuantumRing() { public BlockQuantumRing() {
super( BlockQuantumRing.class, Material.iron ); super( BlockQuantumRing.class, Material.iron );
setfeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) ); setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
setTileEntiy( TileQuantumBridge.class ); setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f; float shave = 2.0f / 16.0f;
setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave ); setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
setLightOpacity( 1 ); setLightOpacity( 1 );
@ -54,7 +54,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
double OnePx = 2.0 / 16.0; double OnePx = 2.0 / 16.0;
TileQuantumBridge bridge = getTileEntity( w, x, y, z ); TileQuantumBridge bridge = getTileEntity( w, x, y, z );

View file

@ -11,7 +11,7 @@ public class BlockFluix extends AEDecorativeBlock
public BlockFluix() { public BlockFluix() {
super( BlockFluix.class, Material.rock ); super( BlockFluix.class, Material.rock );
setfeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) ); setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
} }
} }

View file

@ -11,7 +11,7 @@ public class BlockQuartz extends AEDecorativeBlock
public BlockQuartz() { public BlockQuartz() {
super( BlockQuartz.class, Material.rock ); super( BlockQuartz.class, Material.rock );
setfeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) ); setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
} }
} }

View file

@ -11,7 +11,7 @@ public class BlockQuartzChiseled extends AEDecorativeBlock
public BlockQuartzChiseled() { public BlockQuartzChiseled() {
super( BlockQuartzChiseled.class, Material.rock ); super( BlockQuartzChiseled.class, Material.rock );
setfeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) ); setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
} }
} }

View file

@ -40,7 +40,7 @@ public class BlockQuartzGlass extends AEBaseBlock
public BlockQuartzGlass(Class c) { public BlockQuartzGlass(Class c) {
super( c, Material.glass ); super( c, Material.glass );
setfeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) ); setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
setLightOpacity( 0 ); setLightOpacity( 0 );
isOpaque = false; isOpaque = false;
} }

View file

@ -18,7 +18,7 @@ public class BlockQuartzLamp extends BlockQuartzGlass
public BlockQuartzLamp() { public BlockQuartzLamp() {
super( BlockQuartzLamp.class ); super( BlockQuartzLamp.class );
setfeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) ); setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
setLightLevel( 1.0f ); setLightLevel( 1.0f );
setBlockTextureName( "BlockQuartzGlass" ); setBlockTextureName( "BlockQuartzGlass" );
} }

View file

@ -15,7 +15,7 @@ public class BlockQuartzPillar extends AEBaseBlock implements IOrientableBlock
public BlockQuartzPillar() { public BlockQuartzPillar() {
super( BlockQuartzPillar.class, Material.rock ); super( BlockQuartzPillar.class, Material.rock );
setfeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) ); setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
} }
@Override @Override

View file

@ -63,7 +63,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
public BlockSkyStone() { public BlockSkyStone() {
super( BlockSkyStone.class, Material.rock ); super( BlockSkyStone.class, Material.rock );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setHardness( 50 ); setHardness( 50 );
hasSubtypes = true; hasSubtypes = true;
blockResistance = 150.0f; blockResistance = 150.0f;
@ -175,7 +175,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z ); WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
} }
// use AE2's enderer, no rotatable blocks. // use AE2's renderer, no rotatable blocks.
int getRealRenderType() int getRealRenderType()
{ {
return getRenderType(); return getRenderType();

View file

@ -25,7 +25,7 @@ public class OreQuartz extends AEBaseBlock
public OreQuartz(Class self) { public OreQuartz(Class self) {
super( self, Material.rock ); super( self, Material.rock );
setfeature( EnumSet.of( AEFeature.Core ) ); setFeature( EnumSet.of( AEFeature.Core ) );
setHardness( 3.0F ); setHardness( 3.0F );
setResistance( 5.0F ); setResistance( 5.0F );
boostBrightnessLow = 0; boostBrightnessLow = 0;

View file

@ -23,7 +23,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
public BlockMatrixFrame() { public BlockMatrixFrame() {
super( BlockMatrixFrame.class, Material.anvil); super( BlockMatrixFrame.class, Material.anvil);
setfeature( EnumSet.of( AEFeature.SpatialIO ) ); setFeature( EnumSet.of( AEFeature.SpatialIO ) );
setResistance( 6000000.0F ); setResistance( 6000000.0F );
setBlockUnbreakable(); setBlockUnbreakable();
setLightOpacity( 0 ); setLightOpacity( 0 );
@ -55,7 +55,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
// } ); // } );

View file

@ -18,8 +18,8 @@ public class BlockSpatialIOPort extends AEBaseBlock
public BlockSpatialIOPort() { public BlockSpatialIOPort() {
super( BlockSpatialIOPort.class, Material.iron ); super( BlockSpatialIOPort.class, Material.iron );
setfeature( EnumSet.of( AEFeature.SpatialIO ) ); setFeature( EnumSet.of( AEFeature.SpatialIO ) );
setTileEntiy( TileSpatialIOPort.class ); setTileEntity( TileSpatialIOPort.class );
} }
@Override @Override

View file

@ -17,8 +17,8 @@ public class BlockSpatialPylon extends AEBaseBlock
public BlockSpatialPylon() { public BlockSpatialPylon() {
super( BlockSpatialPylon.class, AEGlassMaterial.instance ); super( BlockSpatialPylon.class, AEGlassMaterial.instance );
setfeature( EnumSet.of( AEFeature.SpatialIO ) ); setFeature( EnumSet.of( AEFeature.SpatialIO ) );
setTileEntiy( TileSpatialPylon.class ); setTileEntity( TileSpatialPylon.class );
} }
@Override @Override

View file

@ -23,8 +23,8 @@ public class BlockChest extends AEBaseBlock
public BlockChest() { public BlockChest() {
super( BlockChest.class, Material.iron ); super( BlockChest.class, Material.iron );
setfeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) ); setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
setTileEntiy( TileChest.class ); setTileEntity( TileChest.class );
} }
@Override @Override

View file

@ -19,8 +19,8 @@ public class BlockDrive extends AEBaseBlock
public BlockDrive() { public BlockDrive() {
super( BlockDrive.class, Material.iron ); super( BlockDrive.class, Material.iron );
setfeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) ); setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
setTileEntiy( TileDrive.class ); setTileEntity( TileDrive.class );
} }
@Override @Override

View file

@ -18,8 +18,8 @@ public class BlockIOPort extends AEBaseBlock
public BlockIOPort() { public BlockIOPort() {
super( BlockIOPort.class, Material.iron ); super( BlockIOPort.class, Material.iron );
setfeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) ); setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
setTileEntiy( TileIOPort.class ); setTileEntity( TileIOPort.class );
} }
@Override @Override

View file

@ -33,8 +33,8 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
public BlockSkyChest() { public BlockSkyChest() {
super( BlockSkyChest.class, Material.rock ); super( BlockSkyChest.class, Material.rock );
setfeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) ); setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
setTileEntiy( TileSkyChest.class ); setTileEntity( TileSkyChest.class );
isOpaque = isFullSize = false; isOpaque = isFullSize = false;
lightOpacity = 0; lightOpacity = 0;
hasSubtypes = true; hasSubtypes = true;
@ -97,7 +97,7 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
TileSkyChest sk = getTileEntity( w, x, y, z ); TileSkyChest sk = getTileEntity( w, x, y, z );
double sc = 0.06; double sc = 0.06;

View file

@ -11,6 +11,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import appeng.container.slot.*;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
@ -36,17 +37,8 @@ import appeng.client.me.SlotDisconnected;
import appeng.client.me.SlotME; import appeng.client.me.SlotME;
import appeng.client.render.AppEngRenderItem; import appeng.client.render.AppEngRenderItem;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.AppEngCraftingSlot;
import appeng.container.slot.AppEngSlot;
import appeng.container.slot.AppEngSlot.hasCalculatedValidness; import appeng.container.slot.AppEngSlot.hasCalculatedValidness;
import appeng.container.slot.OptionalSlotFake; import appeng.container.slot.SlotInaccessible;
import appeng.container.slot.SlotCraftingTerm;
import appeng.container.slot.SlotDisabled;
import appeng.container.slot.SlotFake;
import appeng.container.slot.SlotInaccessable;
import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotPatternTerm;
import appeng.container.slot.SlotRestrictedInput;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.AppEng; import appeng.core.AppEng;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
@ -909,7 +901,7 @@ public abstract class AEBaseGui extends GuiContainer
if ( ((AppEngSlot) s).isValid == hasCalculatedValidness.NotAvailable ) if ( ((AppEngSlot) s).isValid == hasCalculatedValidness.NotAvailable )
{ {
boolean isValid = s.isItemValid( is ) || s instanceof SlotOutput || s instanceof AppEngCraftingSlot || s instanceof SlotDisabled boolean isValid = s.isItemValid( is ) || s instanceof SlotOutput || s instanceof AppEngCraftingSlot || s instanceof SlotDisabled
|| s instanceof SlotInaccessable || s instanceof SlotFake || s instanceof SlotRestrictedInput || s instanceof SlotDisconnected; || s instanceof SlotInaccessible || s instanceof SlotFake || s instanceof SlotRestrictedInput || s instanceof SlotDisconnected;
if ( isValid && s instanceof SlotRestrictedInput ) if ( isValid && s instanceof SlotRestrictedInput )
{ {
try try

View file

@ -55,7 +55,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
return currenttip; return currenttip;
} }
// Vanillia version... // Vanilla version...
// protected void drawItemStackTooltip(ItemStack stack, int x, int y) // protected void drawItemStackTooltip(ItemStack stack, int x, int y)
@Override @Override
protected void renderToolTip(ItemStack stack, int x, int y) protected void renderToolTip(ItemStack stack, int x, int y)

View file

@ -56,7 +56,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
@Override @Override
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY) public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
{ {
handleButtonVisiblity(); handleButtonVisibility();
bindTexture( getBackground() ); bindTexture( getBackground() );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
@ -148,7 +148,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
buttonList.add( copyMode ); buttonList.add( copyMode );
} }
protected void handleButtonVisiblity() protected void handleButtonVisibility()
{ {
copyMode.setState( ccwb.copyMode == CopyMode.CLEAR_ON_REMOVE ); copyMode.setState( ccwb.copyMode == CopyMode.CLEAR_ON_REMOVE );

View file

@ -390,7 +390,7 @@ public class GuiCraftConfirm extends AEBaseGui
for (int z = viewStart; z < Math.min( viewEnd, visual.size() ); z++) for (int z = viewStart; z < Math.min( viewEnd, visual.size() ); z++)
{ {
IAEItemStack refStack = visual.get( z );// repo.getRefrenceItem( z ); IAEItemStack refStack = visual.get( z );// repo.getReferenceItem( z );
if ( refStack != null ) if ( refStack != null )
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();

View file

@ -277,7 +277,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
for (int z = viewStart; z < Math.min( viewEnd, visual.size() ); z++) for (int z = viewStart; z < Math.min( viewEnd, visual.size() ); z++)
{ {
IAEItemStack refStack = visual.get( z );// repo.getRefrenceItem( z ); IAEItemStack refStack = visual.get( z );// repo.getReferenceItem( z );
if ( refStack != null ) if ( refStack != null )
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();

View file

@ -41,7 +41,7 @@ public class GuiInscriber extends AEBaseGui
@Override @Override
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
{ {
pb.max = cvc.maxProessingTime; pb.max = cvc.maxProcessingTime;
pb.current = cvc.processingTime; pb.current = cvc.processingTime;
pb.FullMsg = (pb.current * 100 / pb.max) + "%"; pb.FullMsg = (pb.current * 100 / pb.max) + "%";

View file

@ -148,7 +148,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
} }
} }
protected void handleButtonVisiblity() protected void handleButtonVisibility()
{ {
craftingMode.setVisibility( bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 ); craftingMode.setVisibility( bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
fuzzyMode.setVisibility( bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 ); fuzzyMode.setVisibility( bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );

View file

@ -160,7 +160,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
for (int z = viewStart; z < Math.min( viewEnd, repo.size() ); z++) for (int z = viewStart; z < Math.min( viewEnd, repo.size() ); z++)
{ {
IAEItemStack refStack = repo.getRefrenceItem( z ); IAEItemStack refStack = repo.getReferenceItem( z );
if ( refStack != null ) if ( refStack != null )
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
@ -242,7 +242,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
return currenttip; return currenttip;
} }
// Vanillia version... // Vanilla version...
protected void drawItemStackTooltip(ItemStack stack, int x, int y) protected void drawItemStackTooltip(ItemStack stack, int x, int y)
{ {
Slot s = getSlot( x, y ); Slot s = getSlot( x, y );

View file

@ -96,7 +96,7 @@ public class GuiUpgradeable extends AEBaseGui
@Override @Override
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY) public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
{ {
handleButtonVisiblity(); handleButtonVisibility();
bindTexture( getBackground() ); bindTexture( getBackground() );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
@ -116,7 +116,7 @@ public class GuiUpgradeable extends AEBaseGui
return "guis/bus.png"; return "guis/bus.png";
} }
protected void handleButtonVisiblity() protected void handleButtonVisibility()
{ {
if ( redstoneMode != null ) if ( redstoneMode != null )
redstoneMode.setVisibility( bc.getInstalledUpgrades( Upgrades.REDSTONE ) > 0 ); redstoneMode.setVisibility( bc.getInstalledUpgrades( Upgrades.REDSTONE ) > 0 );

View file

@ -179,7 +179,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
registerApp( 16 * 1 + 2, Settings.CRAFT_ONLY, YesNo.NO, ButtonToolTips.Craft, ButtonToolTips.CraftEither ); registerApp( 16 * 1 + 2, Settings.CRAFT_ONLY, YesNo.NO, ButtonToolTips.Craft, ButtonToolTips.CraftEither );
registerApp( 16 * 11 + 2, Settings.CRAFT_VIA_REDSTONE, YesNo.YES, ButtonToolTips.EmitterMode, ButtonToolTips.CraftViaRedstone ); registerApp( 16 * 11 + 2, Settings.CRAFT_VIA_REDSTONE, YesNo.YES, ButtonToolTips.EmitterMode, ButtonToolTips.CraftViaRedstone );
registerApp( 16 * 11 + 1, Settings.CRAFT_VIA_REDSTONE, YesNo.NO, ButtonToolTips.EmitterMode, ButtonToolTips.EmitWhenCrafing ); registerApp( 16 * 11 + 1, Settings.CRAFT_VIA_REDSTONE, YesNo.NO, ButtonToolTips.EmitterMode, ButtonToolTips.EmitWhenCrafting );
registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems, registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems,
ButtonToolTips.ReportInaccessibleItemsNo ); ButtonToolTips.ReportInaccessibleItemsNo );

View file

@ -26,7 +26,7 @@ public class InternalSlotME
public IAEItemStack getAEStack() public IAEItemStack getAEStack()
{ {
return repo.getRefrenceItem( offset ); return repo.getReferenceItem( offset );
} }
public boolean hasPower() public boolean hasPower()

View file

@ -44,7 +44,7 @@ public class ItemRepo
this.sortSrc = sortSrc; this.sortSrc = sortSrc;
} }
public IAEItemStack getRefrenceItem(int idx) public IAEItemStack getReferenceItem(int idx)
{ {
idx += src.getCurrentScroll() * rowSize; idx += src.getCurrentScroll() * rowSize;

View file

@ -1,9 +1,9 @@
package appeng.client.render; package appeng.client.render;
import appeng.client.texture.FlippableIcon;
import appeng.client.texture.TmpFlippableIcon;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.client.texture.FlipableIcon;
import appeng.client.texture.TmpFlipableIcon;
public class BlockRenderInfo public class BlockRenderInfo
{ {
@ -15,21 +15,21 @@ public class BlockRenderInfo
final public BaseBlockRender rendererInstance; final public BaseBlockRender rendererInstance;
private boolean useTmp = false; private boolean useTmp = false;
private TmpFlipableIcon tmpTopIcon = new TmpFlipableIcon(); private TmpFlippableIcon tmpTopIcon = new TmpFlippableIcon();
private TmpFlipableIcon tmpBottomIcon = new TmpFlipableIcon(); private TmpFlippableIcon tmpBottomIcon = new TmpFlippableIcon();
private TmpFlipableIcon tmpSouthIcon = new TmpFlipableIcon(); private TmpFlippableIcon tmpSouthIcon = new TmpFlippableIcon();
private TmpFlipableIcon tmpNorthIcon = new TmpFlipableIcon(); private TmpFlippableIcon tmpNorthIcon = new TmpFlippableIcon();
private TmpFlipableIcon tmpEastIcon = new TmpFlipableIcon(); private TmpFlippableIcon tmpEastIcon = new TmpFlippableIcon();
private TmpFlipableIcon tmpWestIcon = new TmpFlipableIcon(); private TmpFlippableIcon tmpWestIcon = new TmpFlippableIcon();
private FlipableIcon topIcon = null; private FlippableIcon topIcon = null;
private FlipableIcon bottomIcon = null; private FlippableIcon bottomIcon = null;
private FlipableIcon southIcon = null; private FlippableIcon southIcon = null;
private FlipableIcon northIcon = null; private FlippableIcon northIcon = null;
private FlipableIcon eastIcon = null; private FlippableIcon eastIcon = null;
private FlipableIcon westIcon = null; private FlippableIcon westIcon = null;
public void updateIcons(FlipableIcon Bottom, FlipableIcon Top, FlipableIcon North, FlipableIcon South, FlipableIcon East, FlipableIcon West) public void updateIcons(FlippableIcon Bottom, FlippableIcon Top, FlippableIcon North, FlippableIcon South, FlippableIcon East, FlippableIcon West)
{ {
topIcon = Top; topIcon = Top;
bottomIcon = Bottom; bottomIcon = Bottom;
@ -67,7 +67,7 @@ public class BlockRenderInfo
useTmp = true; useTmp = true;
} }
public FlipableIcon getTexture(ForgeDirection dir) public FlippableIcon getTexture(ForgeDirection dir)
{ {
if ( useTmp ) if ( useTmp )
{ {

View file

@ -55,7 +55,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, rbinstance ); blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, rbinstance );
if ( Platform.isDrawing( tess ) ) if ( Platform.isDrawing( tess ) )
throw new RuntimeException( "Error durring rendering." ); throw new RuntimeException( "Error during rendering." );
GL11.glPopAttrib(); GL11.glPopAttrib();
GL11.glPopMatrix(); GL11.glPopMatrix();
@ -64,7 +64,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
{ {
AELog.severe( "Hi, Looks like there was a crash while rendering something..." ); AELog.severe( "Hi, Looks like there was a crash while rendering something..." );
t.printStackTrace(); t.printStackTrace();
AELog.severe( "MC will now crash ( probobly )!" ); AELog.severe( "MC will now crash ( probably )!" );
throw new RuntimeException( t ); throw new RuntimeException( t );
} }

View file

@ -21,7 +21,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
private RenderBlocks renderer = new RenderBlocks(); private RenderBlocks renderer = new RenderBlocks();
final int renderID = RenderingRegistry.getNextAvailableRenderId(); final int renderID = RenderingRegistry.getNextAvailableRenderId();
public static final WorldRender instance = new WorldRender(); public static final WorldRender instance = new WorldRender();
boolean hasErrored = false; boolean hasError = false;
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap(); public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap();
@ -73,9 +73,9 @@ public class WorldRender implements ISimpleBlockRenderingHandler
} }
else else
{ {
if ( !hasErrored ) if ( !hasError )
{ {
hasErrored = true; hasError = true;
AELog.severe( "Invalid render - item/block mismatch" ); AELog.severe( "Invalid render - item/block mismatch" );
AELog.severe( " item: " + item.getUnlocalizedName() ); AELog.severe( " item: " + item.getUnlocalizedName() );
AELog.severe( " block: " + blk.getUnlocalizedName() ); AELog.severe( " block: " + blk.getUnlocalizedName() );

View file

@ -87,12 +87,12 @@ public class RenderBlockSkyChest extends BaseBlockRender
GL11.glTranslatef( -0.0F, -1.0F, -1.0F ); GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
long distnace = now - skyChest.lastEvent; long distance = now - skyChest.lastEvent;
if ( skyChest.playerOpen > 0 ) if ( skyChest.playerOpen > 0 )
skyChest.lidAngle += distnace * 0.0001; skyChest.lidAngle += distance * 0.0001;
else else
skyChest.lidAngle -= distnace * 0.0001; skyChest.lidAngle -= distance * 0.0001;
if ( skyChest.lidAngle > 0.5f ) if ( skyChest.lidAngle > 0.5f )
skyChest.lidAngle = 0.5f; skyChest.lidAngle = 0.5f;

View file

@ -2,6 +2,7 @@ package appeng.client.render.blocks;
import java.util.EnumSet; import java.util.EnumSet;
import appeng.client.texture.FlippableIcon;
import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -15,7 +16,6 @@ import appeng.api.util.AEColor;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.texture.ExtraBlockTextures; import appeng.client.texture.ExtraBlockTextures;
import appeng.client.texture.FlipableIcon;
import appeng.client.texture.OffsetIcon; import appeng.client.texture.OffsetIcon;
import appeng.tile.storage.TileChest; import appeng.tile.storage.TileChest;
import appeng.util.Platform; import appeng.util.Platform;
@ -68,7 +68,7 @@ public class RenderMEChest extends BaseBlockRender
Tessellator.instance.setBrightness( b ); Tessellator.instance.setBrightness( b );
Tessellator.instance.setColorOpaque_I( 0xffffff ); Tessellator.instance.setColorOpaque_I( 0xffffff );
FlipableIcon fico = new FlipableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) ); FlippableIcon fico = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) ) if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) )
fico.setFlip( true, false ); fico.setFlip( true, false );
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST ) else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST )

View file

@ -22,7 +22,7 @@ public class RendererCableBus extends BaseBlockRender
@Override @Override
public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj) public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj)
{ {
// nothin. // nothing.
} }
@Override @Override

View file

@ -15,14 +15,14 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
{ {
RenderItem ri = new RenderItem(); RenderItem ri = new RenderItem();
boolean resursive; boolean recursive;
@Override @Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) public boolean handleRenderType(ItemStack item, ItemRenderType type)
{ {
boolean isShiftHeld = Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) || Keyboard.isKeyDown( Keyboard.KEY_RSHIFT ); boolean isShiftHeld = Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) || Keyboard.isKeyDown( Keyboard.KEY_RSHIFT );
if ( resursive == false && type == IItemRenderer.ItemRenderType.INVENTORY && isShiftHeld ) if ( recursive == false && type == IItemRenderer.ItemRenderType.INVENTORY && isShiftHeld )
{ {
ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem(); ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
if ( iep.getOutput( item ) != null ) if ( iep.getOutput( item ) != null )
@ -41,7 +41,7 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
@Override @Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) public void renderItem(ItemRenderType type, ItemStack item, Object... data)
{ {
resursive = true; recursive = true;
ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem(); ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
@ -54,6 +54,6 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
RenderHelper.disableStandardItemLighting(); RenderHelper.disableStandardItemLighting();
GL11.glPopAttrib(); GL11.glPopAttrib();
resursive = false; recursive = false;
} }
} }

View file

@ -2,14 +2,14 @@ package appeng.client.texture;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
public class FlipableIcon implements IIcon public class FlippableIcon implements IIcon
{ {
protected IIcon original; protected IIcon original;
boolean flip_u; boolean flip_u;
boolean flip_v; boolean flip_v;
public FlipableIcon(IIcon o) { public FlippableIcon(IIcon o) {
if ( o == null ) if ( o == null )
throw new RuntimeException( "Cannot create a wrapper icon with a null icon." ); throw new RuntimeException( "Cannot create a wrapper icon with a null icon." );

View file

@ -3,12 +3,12 @@ package appeng.client.texture;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
public class TmpFlipableIcon extends FlipableIcon public class TmpFlippableIcon extends FlippableIcon
{ {
private static final IIcon nullIcon = new MissingIcon( Blocks.diamond_block ); private static final IIcon nullIcon = new MissingIcon( Blocks.diamond_block );
public TmpFlipableIcon() { public TmpFlippableIcon() {
super( nullIcon ); super( nullIcon );
} }
@ -16,9 +16,9 @@ public class TmpFlipableIcon extends FlipableIcon
{ {
setFlip( false, false ); setFlip( false, false );
while (i instanceof FlipableIcon) while (i instanceof FlippableIcon)
{ {
FlipableIcon fi = (FlipableIcon) i; FlippableIcon fi = (FlippableIcon) i;
if ( fi.flip_u ) if ( fi.flip_u )
this.flip_u = !this.flip_u; this.flip_u = !this.flip_u;

View file

@ -10,6 +10,7 @@ import java.util.HashSet;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import appeng.container.slot.*;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
@ -41,14 +42,7 @@ import appeng.client.me.InternalSlotME;
import appeng.client.me.SlotME; import appeng.client.me.SlotME;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.guisync.SyncDat; import appeng.container.guisync.SyncDat;
import appeng.container.slot.AppEngSlot; import appeng.container.slot.SlotInaccessible;
import appeng.container.slot.SlotCraftingMatrix;
import appeng.container.slot.SlotCraftingTerm;
import appeng.container.slot.SlotDisabled;
import appeng.container.slot.SlotFake;
import appeng.container.slot.SlotInaccessable;
import appeng.container.slot.SlotPlayerHotBar;
import appeng.container.slot.SlotPlayerInv;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInventoryAction; import appeng.core.sync.packets.PacketInventoryAction;
@ -115,7 +109,7 @@ public abstract class AEBaseContainer extends Container
public void setTargetStack(IAEItemStack stack) public void setTargetStack(IAEItemStack stack)
{ {
// client dosn't need to re-send, makes for lower overhead rapid packets. // client doesn't need to re-send, makes for lower overhead rapid packets.
if ( Platform.isClient() ) if ( Platform.isClient() )
{ {
ItemStack a = stack == null ? null : stack.getItemStack(); ItemStack a = stack == null ? null : stack.getItemStack();
@ -346,7 +340,7 @@ public abstract class AEBaseContainer extends Container
ItemStack tis = null; ItemStack tis = null;
AppEngSlot clickSlot = (AppEngSlot) this.inventorySlots.get( idx ); // require AE SLots! AppEngSlot clickSlot = (AppEngSlot) this.inventorySlots.get( idx ); // require AE SLots!
if ( clickSlot instanceof SlotDisabled || clickSlot instanceof SlotInaccessable ) if ( clickSlot instanceof SlotDisabled || clickSlot instanceof SlotInaccessible )
return null; return null;
if ( clickSlot != null && clickSlot.getHasStack() ) if ( clickSlot != null && clickSlot.getHasStack() )
{ {

View file

@ -21,7 +21,6 @@ import appeng.container.guisync.GuiSync;
import appeng.container.slot.OptionalSlotRestrictedInput; import appeng.container.slot.OptionalSlotRestrictedInput;
import appeng.container.slot.SlotFakeTypeOnly; import appeng.container.slot.SlotFakeTypeOnly;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.inventory.AppEngNullInventory; import appeng.tile.inventory.AppEngNullInventory;
import appeng.tile.misc.TileCellWorkbench; import appeng.tile.misc.TileCellWorkbench;
import appeng.util.Platform; import appeng.util.Platform;
@ -197,7 +196,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
int offset = 0; int offset = 0;
IInventory cell = myte.getInventoryByName( "cell" ); IInventory cell = myte.getInventoryByName( "cell" );
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) );
IInventory inv = myte.getInventoryByName( "config" ); IInventory inv = myte.getInventoryByName( "config" );
UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory( UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
@ -211,7 +210,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
for (int z = 0; z < 8; z++) for (int z = 0; z < 8; z++)
{ {
int iSLot = zz * 8 + z; int iSLot = zz * 8 + z;
addSlotToContainer( new OptionalSlotRestrictedInput( PlaceableItemType.UPGRADES, UpgradeInventoryWrapper, this, iSLot, 187 + zz * 18, addSlotToContainer( new OptionalSlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, UpgradeInventoryWrapper, this, iSLot, 187 + zz * 18,
8 + 18 * z, iSLot, invPlayer ) ); 8 + 18 * z, iSLot, invPlayer ) );
} }
/* /*

View file

@ -3,7 +3,6 @@ package appeng.container.implementations;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.storage.TileChest; import appeng.tile.storage.TileChest;
public class ContainerChest extends AEBaseContainer public class ContainerChest extends AEBaseContainer
@ -15,7 +14,7 @@ public class ContainerChest extends AEBaseContainer
super( ip, te, null ); super( ip, te, null );
myte = te; myte = te;
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.STORAGE_CELLS, myte, 1, 80, 37, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, myte, 1, 80, 37, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
} }

View file

@ -7,7 +7,6 @@ import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.misc.TileCondenser; import appeng.tile.misc.TileCondenser;
import appeng.util.Platform; import appeng.util.Platform;
@ -20,9 +19,9 @@ public class ContainerCondenser extends AEBaseContainer
super( ip, te, null ); super( ip, te, null );
myte = te; myte = te;
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.TRASH, te, 0, 51, 52, ip ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, te, 0, 51, 52, ip ) );
addSlotToContainer( new SlotOutput( te, 1, 105, 52, -1 ) ); addSlotToContainer( new SlotOutput( te, 1, 105, 52, -1 ) );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.STORAGE_COMPONENT, te.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, te.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 ); bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 );
} }

View file

@ -1,5 +1,6 @@
package appeng.container.implementations; package appeng.container.implementations;
import appeng.container.slot.SlotInaccessible;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -11,7 +12,6 @@ import appeng.api.networking.security.PlayerSource;
import appeng.api.storage.ITerminalHost; import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.SlotInaccessable;
import appeng.tile.inventory.AppEngInternalInventory; import appeng.tile.inventory.AppEngInternalInventory;
public class ContainerCraftAmount extends AEBaseContainer public class ContainerCraftAmount extends AEBaseContainer
@ -26,7 +26,7 @@ public class ContainerCraftAmount extends AEBaseContainer
super( ip, te ); super( ip, te );
priHost = te; priHost = te;
craftingItem = new SlotInaccessable( new AppEngInternalInventory( null, 1 ), 0, 34, 53 ); craftingItem = new SlotInaccessible( new AppEngInternalInventory( null, 1 ), 0, 34, 53 );
addSlotToContainer( craftingItem ); addSlotToContainer( craftingItem );
} }

View file

@ -213,12 +213,12 @@ public class ContainerCraftConfirm extends AEBaseContainer
p.setStackSize( out.getCountRequestable() ); p.setStackSize( out.getCountRequestable() );
IStorageGrid sg = getGrid().getCache( IStorageGrid.class ); IStorageGrid sg = getGrid().getCache( IStorageGrid.class );
IMEInventory<IAEItemStack> itemsg = sg.getItemInventory(); IMEInventory<IAEItemStack> items = sg.getItemInventory();
if ( c != null && result.isSimulation() ) if ( c != null && result.isSimulation() )
{ {
m = o.copy(); m = o.copy();
o = itemsg.extractItems( o, Actionable.SIMULATE, mySrc ); o = items.extractItems( o, Actionable.SIMULATE, mySrc );
if ( o == null ) if ( o == null )
{ {

View file

@ -39,9 +39,9 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, getPlayerInv().player.worldObj ) ); outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, getPlayerInv().player.worldObj ) );
} }
public ContainerCraftingTerm(InventoryPlayer ip, ITerminalHost montiorable) { public ContainerCraftingTerm(InventoryPlayer ip, ITerminalHost monitorable) {
super( ip, montiorable, false ); super( ip, monitorable, false );
ct = (PartCraftingTerminal) montiorable; ct = (PartCraftingTerminal) monitorable;
IInventory crafting = ct.getInventoryByName( "crafting" ); IInventory crafting = ct.getInventoryByName( "crafting" );
@ -49,7 +49,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
for (int x = 0; x < 3; x++) for (int x = 0; x < 3; x++)
addSlotToContainer( craftingSlots[x + y * 3] = new SlotCraftingMatrix( this, crafting, x + y * 3, 37 + x * 18, -72 + y * 18 ) ); addSlotToContainer( craftingSlots[x + y * 3] = new SlotCraftingMatrix( this, crafting, x + y * 3, 37 + x * 18, -72 + y * 18 ) );
addSlotToContainer( outputSlot = new SlotCraftingTerm( getPlayerInv().player, mySrc, powerSrc, montiorable, crafting, crafting, output, 131, -72 + 18, this ) ); addSlotToContainer( outputSlot = new SlotCraftingTerm( getPlayerInv().player, mySrc, powerSrc, monitorable, crafting, crafting, output, 131, -72 + 18, this ) );
bindPlayerInventory( ip, 0, 0 ); bindPlayerInventory( ip, 0, 0 );

View file

@ -3,7 +3,6 @@ package appeng.container.implementations;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.storage.TileDrive; import appeng.tile.storage.TileDrive;
public class ContainerDrive extends AEBaseContainer public class ContainerDrive extends AEBaseContainer
@ -18,7 +17,7 @@ public class ContainerDrive extends AEBaseContainer
for (int y = 0; y < 5; y++) for (int y = 0; y < 5; y++)
for (int x = 0; x < 2; x++) for (int x = 0; x < 2; x++)
{ {
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.STORAGE_CELLS, te, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, te, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
} }
bindPlayerInventory( ip, 0, 199 - /* height of playerinventory */82 ); bindPlayerInventory( ip, 0, 199 - /* height of playerinventory */82 );

View file

@ -9,7 +9,6 @@ import appeng.api.config.Upgrades;
import appeng.container.slot.OptionalSlotFakeTypeOnly; import appeng.container.slot.OptionalSlotFakeTypeOnly;
import appeng.container.slot.SlotFakeTypeOnly; import appeng.container.slot.SlotFakeTypeOnly;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.parts.automation.PartFormationPlane; import appeng.parts.automation.PartFormationPlane;
import appeng.util.Platform; import appeng.util.Platform;
@ -68,11 +67,11 @@ public class ContainerFormationPlane extends ContainerUpgradeable
} }
IInventory upgrades = myte.getInventoryByName( "upgrades" ); IInventory upgrades = myte.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() );
} }
@Override @Override

View file

@ -1,11 +1,10 @@
package appeng.container.implementations; package appeng.container.implementations;
import appeng.container.slot.SlotInaccessible;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.SlotInaccessable;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.grindstone.TileGrinder; import appeng.tile.grindstone.TileGrinder;
public class ContainerGrinder extends AEBaseContainer public class ContainerGrinder extends AEBaseContainer
@ -17,11 +16,11 @@ public class ContainerGrinder extends AEBaseContainer
super( ip, te, null ); super( ip, te, null );
myte = te; myte = te;
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.ORE, te, 0, 12, 17, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 0, 12, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.ORE, te, 1, 12 + 18, 17, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 1, 12 + 18, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.ORE, te, 2, 12 + 36, 17, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 2, 12 + 36, 17, invPlayer ) );
addSlotToContainer( new SlotInaccessable( te, 6, 80, 40 ) ); addSlotToContainer( new SlotInaccessible( te, 6, 80, 40 ) );
addSlotToContainer( new SlotOutput( te, 3, 112, 63, 2 * 16 + 15 ) ); 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, 4, 112 + 18, 63, 2 * 16 + 15 ) );

View file

@ -10,7 +10,6 @@ import appeng.api.config.Settings;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.storage.TileIOPort; import appeng.tile.storage.TileIOPort;
import appeng.util.Platform; import appeng.util.Platform;
@ -57,18 +56,18 @@ public class ContainerIOPort extends ContainerUpgradeable
for (int y = 0; y < 3; y++) for (int y = 0; y < 3; y++)
for (int x = 0; x < 2; x++) for (int x = 0; x < 2; x++)
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.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; offx = 122;
offy = 17; offy = 17;
for (int y = 0; y < 3; y++) for (int y = 0; y < 3; y++)
for (int x = 0; x < 2; x++) for (int x = 0; x < 2; x++)
addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offx + x * 18, offy + y * 18, PlaceableItemType.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 = myte.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
} }
@Override @Override

View file

@ -8,7 +8,6 @@ import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.recipes.handlers.Inscribe; import appeng.recipes.handlers.Inscribe;
import appeng.recipes.handlers.Inscribe.InscriberRecipe; import appeng.recipes.handlers.Inscribe.InscriberRecipe;
import appeng.tile.misc.TileInscriber; import appeng.tile.misc.TileInscriber;
@ -24,7 +23,7 @@ public class ContainerInscriber extends AEBaseContainer
Slot bottom; Slot bottom;
@GuiSync(0) @GuiSync(0)
public int maxProessingTime = -1; public int maxProcessingTime = -1;
@GuiSync(1) @GuiSync(1)
public int processingTime = -1; public int processingTime = -1;
@ -33,9 +32,9 @@ public class ContainerInscriber extends AEBaseContainer
super( ip, te, null ); super( ip, te, null );
myte = te; myte = te;
addSlotToContainer( top = new SlotRestrictedInput( PlaceableItemType.INSCRIBER_PLATE, myte, 0, 45, 16, invPlayer ) ); addSlotToContainer( top = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, myte, 0, 45, 16, invPlayer ) );
addSlotToContainer( bottom = new SlotRestrictedInput( PlaceableItemType.INSCRIBER_PLATE, myte, 1, 45, 62, invPlayer ) ); addSlotToContainer( bottom = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, myte, 1, 45, 62, invPlayer ) );
addSlotToContainer( middle = new SlotRestrictedInput( PlaceableItemType.INSCRIBER_INPUT, myte, 2, 63, 39, invPlayer ) ); addSlotToContainer( middle = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_INPUT, myte, 2, 63, 39, invPlayer ) );
addSlotToContainer( new SlotOutput( myte, 3, 113, 40, -1 ) ); addSlotToContainer( new SlotOutput( myte, 3, 113, 40, -1 ) );
@ -125,7 +124,7 @@ public class ContainerInscriber extends AEBaseContainer
if ( Platform.isServer() ) if ( Platform.isServer() )
{ {
this.maxProessingTime = myte.maxProessingTime; this.maxProcessingTime = myte.maxProcessingTime;
this.processingTime = myte.processingTime; this.processingTime = myte.processingTime;
} }
} }

View file

@ -9,7 +9,6 @@ import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotFake; import appeng.container.slot.SlotFake;
import appeng.container.slot.SlotNormal; import appeng.container.slot.SlotNormal;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.helpers.DualityInterface; import appeng.helpers.DualityInterface;
import appeng.helpers.IInterfaceHost; import appeng.helpers.IInterfaceHost;
@ -30,7 +29,7 @@ public class ContainerInterface extends ContainerUpgradeable
myDuality = te.getInterfaceDuality(); myDuality = te.getInterfaceDuality();
for (int x = 0; x < 9; x++) for (int x = 0; x < 9; x++)
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.ENCODED_PATTERN, myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, invPlayer ) );
for (int x = 0; x < 8; x++) for (int x = 0; x < 8; x++)
addSlotToContainer( new SlotFake( myDuality.getConfig(), x, 17 + 18 * x, 35 ) ); addSlotToContainer( new SlotFake( myDuality.getConfig(), x, 17 + 18 * x, 35 ) );

View file

@ -13,7 +13,6 @@ import appeng.api.config.YesNo;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotFakeTypeOnly; import appeng.container.slot.SlotFakeTypeOnly;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.parts.automation.PartLevelEmitter; import appeng.parts.automation.PartLevelEmitter;
import appeng.util.Platform; import appeng.util.Platform;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -66,13 +65,13 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
IInventory upgrades = myte.getInventoryByName( "upgrades" ); IInventory upgrades = myte.getInventoryByName( "upgrades" );
if ( availableUpgrades() > 0 ) if ( availableUpgrades() > 0 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 1 ) if ( availableUpgrades() > 1 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 2 ) if ( availableUpgrades() > 2 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 3 ) if ( availableUpgrades() > 3 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
IInventory inv = myte.getInventoryByName( "config" ); IInventory inv = myte.getInventoryByName( "config" );
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) ); addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );

View file

@ -12,7 +12,6 @@ import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotMACPattern; import appeng.container.slot.SlotMACPattern;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.items.misc.ItemEncodedPattern; import appeng.items.misc.ItemEncodedPattern;
import appeng.tile.crafting.TileMolecularAssembler; import appeng.tile.crafting.TileMolecularAssembler;
import appeng.util.Platform; import appeng.util.Platform;
@ -85,18 +84,18 @@ public class ContainerMAC extends ContainerUpgradeable
offx = 126; offx = 126;
offy = 16; offy = 16;
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offx, offy, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offx, offy, invPlayer ) );
addSlotToContainer( new SlotOutput( mac, 9, offx, offy + 32, -1 ) ); addSlotToContainer( new SlotOutput( mac, 9, offx, offy + 32, -1 ) );
offx = 122; offx = 122;
offy = 17; offy = 17;
IInventory upgrades = myte.getInventoryByName( "upgrades" ); IInventory upgrades = myte.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() );
} }
@Override @Override

View file

@ -38,7 +38,6 @@ import appeng.api.util.IConfigurableObject;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketMEInventoryUpdate; import appeng.core.sync.packets.PacketMEInventoryUpdate;
@ -73,8 +72,8 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
return networkNode; return networkNode;
} }
protected ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost montiorable, boolean bindInventory) { protected ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost monitorable, boolean bindInventory) {
super( ip, montiorable instanceof TileEntity ? (TileEntity) montiorable : null, montiorable instanceof IPart ? (IPart) montiorable : null ); super( ip, monitorable instanceof TileEntity ? (TileEntity) monitorable : null, monitorable instanceof IPart ? (IPart) monitorable : null );
clientCM = new ConfigManager( this ); clientCM = new ConfigManager( this );
@ -84,22 +83,22 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
if ( Platform.isServer() ) if ( Platform.isServer() )
{ {
serverCM = montiorable.getConfigManager(); serverCM = monitorable.getConfigManager();
monitor = montiorable.getItemInventory(); monitor = monitorable.getItemInventory();
if ( monitor != null ) if ( monitor != null )
{ {
monitor.addListener( this, null ); monitor.addListener( this, null );
cellInv = monitor; cellInv = monitor;
if ( montiorable instanceof IPortableCell ) if ( monitorable instanceof IPortableCell )
powerSrc = (IPortableCell) montiorable; powerSrc = (IPortableCell) monitorable;
else if ( montiorable instanceof IMEChest ) else if ( monitorable instanceof IMEChest )
powerSrc = (IMEChest) montiorable; powerSrc = (IMEChest) monitorable;
else if ( montiorable instanceof IGridHost ) else if ( monitorable instanceof IGridHost )
{ {
IGridNode node = ((IGridHost) montiorable).getGridNode( ForgeDirection.UNKNOWN ); IGridNode node = ((IGridHost) monitorable).getGridNode( ForgeDirection.UNKNOWN );
if ( node != null ) if ( node != null )
{ {
networkNode = node; networkNode = node;
@ -116,11 +115,11 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
monitor = null; monitor = null;
canAccessViewCells = false; canAccessViewCells = false;
if ( montiorable instanceof IViewCellStorage ) if ( monitorable instanceof IViewCellStorage )
{ {
for (int y = 0; y < 5; y++) for (int y = 0; y < 5; y++)
{ {
cellView[y] = new SlotRestrictedInput( PlaceableItemType.VIEWCELL, ((IViewCellStorage) montiorable).getViewCellStorage(), y, 206, y * 18 + 8, cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEWCELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
invPlayer ); invPlayer );
cellView[y].allowEdit = canAccessViewCells; cellView[y].allowEdit = canAccessViewCells;
addSlotToContainer( cellView[y] ); addSlotToContainer( cellView[y] );
@ -131,8 +130,8 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
bindPlayerInventory( ip, 0, 0 ); bindPlayerInventory( ip, 0, 0 );
} }
public ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost montiorable) { public ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost monitorable) {
this( ip, montiorable, true ); this( ip, monitorable, true );
} }
@Override @Override

View file

@ -14,10 +14,10 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
double powerMultiplier = 0.5; double powerMultiplier = 0.5;
IPortableCell civ; IPortableCell civ;
public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell montiorable) { public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell monitorable) {
super( ip, (ITerminalHost) montiorable, false ); super( ip, (ITerminalHost) monitorable, false );
lockPlayerInventorySlot( ip.currentItem ); lockPlayerInventorySlot( ip.currentItem );
civ = montiorable; civ = monitorable;
bindPlayerInventory( ip, 0, 0 ); bindPlayerInventory( ip, 0, 0 );
} }

View file

@ -7,7 +7,6 @@ import appeng.api.implementations.guiobjects.INetworkTool;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.util.Platform; import appeng.util.Platform;
public class ContainerNetworkTool extends AEBaseContainer public class ContainerNetworkTool extends AEBaseContainer
@ -26,7 +25,7 @@ public class ContainerNetworkTool extends AEBaseContainer
for (int y = 0; y < 3; y++) for (int y = 0; y < 3; y++)
for (int x = 0; x < 3; x++) for (int x = 0; x < 3; x++)
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, te, y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, invPlayer )) ); 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 playerinventory */82 );
} }

View file

@ -33,7 +33,6 @@ import appeng.container.slot.SlotFakeCraftingMatrix;
import appeng.container.slot.SlotPatternOutputs; import appeng.container.slot.SlotPatternOutputs;
import appeng.container.slot.SlotPatternTerm; import appeng.container.slot.SlotPatternTerm;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.core.sync.packets.PacketPatternSlot; import appeng.core.sync.packets.PacketPatternSlot;
import appeng.helpers.IContainerCraftingPacket; import appeng.helpers.IContainerCraftingPacket;
import appeng.items.storage.ItemViewCell; import appeng.items.storage.ItemViewCell;
@ -62,10 +61,10 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
public PartPatternTerminal ct; public PartPatternTerminal ct;
public ContainerPatternTerm(InventoryPlayer ip, ITerminalHost montiorable) public ContainerPatternTerm(InventoryPlayer ip, ITerminalHost monitorable)
{ {
super( ip, montiorable, false ); super( ip, monitorable, false );
ct = (PartPatternTerminal) montiorable; ct = (PartPatternTerminal) monitorable;
IInventory patternInv = ct.getInventoryByName( "pattern" ); IInventory patternInv = ct.getInventoryByName( "pattern" );
IInventory output = ct.getInventoryByName( "output" ); IInventory output = ct.getInventoryByName( "output" );
@ -75,7 +74,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
for (int x = 0; x < 3; x++) for (int x = 0; x < 3; x++)
addSlotToContainer( craftingSlots[x + y * 3] = new SlotFakeCraftingMatrix( crafting, x + y * 3, 18 + x * 18, -76 + y * 18 ) ); addSlotToContainer( craftingSlots[x + y * 3] = new SlotFakeCraftingMatrix( crafting, x + y * 3, 18 + x * 18, -76 + y * 18 ) );
addSlotToContainer( craftSlot = new SlotPatternTerm( ip.player, mySrc, powerSrc, montiorable, crafting, patternInv, cOut, 110, -76 + 18, this, 2, this ) ); addSlotToContainer( craftSlot = new SlotPatternTerm( ip.player, mySrc, powerSrc, monitorable, crafting, patternInv, cOut, 110, -76 + 18, this, 2, this ) );
craftSlot.IIcon = -1; craftSlot.IIcon = -1;
for (int y = 0; y < 3; y++) for (int y = 0; y < 3; y++)
@ -85,8 +84,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
outputSlots[y].IIcon = -1; outputSlots[y].IIcon = -1;
} }
addSlotToContainer( patternSlotIN = new SlotRestrictedInput( PlaceableItemType.BLANK_PATTERN, patternInv, 0, 147, -72 - 9, invPlayer ) ); addSlotToContainer( patternSlotIN = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BLANK_PATTERN, patternInv, 0, 147, -72 - 9, invPlayer ) );
addSlotToContainer( patternSlotOUT = new SlotRestrictedInput( PlaceableItemType.ENCODED_PATTERN, patternInv, 1, 147, -72 + 34, invPlayer ) ); addSlotToContainer( patternSlotOUT = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, patternInv, 1, 147, -72 + 34, invPlayer ) );
patternSlotOUT.setStackLimit( 1 ); patternSlotOUT.setStackLimit( 1 );

View file

@ -3,7 +3,6 @@ package appeng.container.implementations;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.qnb.TileQuantumBridge; import appeng.tile.qnb.TileQuantumBridge;
public class ContainerQNB extends AEBaseContainer public class ContainerQNB extends AEBaseContainer
@ -15,9 +14,9 @@ public class ContainerQNB extends AEBaseContainer
super( ip, te, null ); super( ip, te, null );
myte = te; myte = te;
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.QE_SINGULARTIY, te, 0, 80, 37, invPlayer )).setStackLimit( 1 ) ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, te, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
} }
} }

View file

@ -11,7 +11,6 @@ import appeng.api.AEApi;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.QuartzKnifeOutput; import appeng.container.slot.QuartzKnifeOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.items.contents.QuartzKnifeObj; import appeng.items.contents.QuartzKnifeObj;
import appeng.tile.inventory.AppEngInternalInventory; import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory; import appeng.tile.inventory.IAEAppEngInventory;
@ -37,7 +36,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
super( ip, null, null ); super( ip, null, null );
toolInv = te; toolInv = te;
addSlotToContainer( metals = new SlotRestrictedInput( PlaceableItemType.METAL_INGOTS, inSlot, 0, 94, 44, ip ) ); addSlotToContainer( metals = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.METAL_INGOTS, inSlot, 0, 94, 44, ip ) );
addSlotToContainer( output = new QuartzKnifeOutput( this, 0, 134, 44, -1 ) ); addSlotToContainer( output = new QuartzKnifeOutput( this, 0, 134, 44, -1 ) );
lockPlayerInventorySlot( ip.currentItem ); lockPlayerInventorySlot( ip.currentItem );

View file

@ -15,7 +15,6 @@ import appeng.api.storage.ITerminalHost;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.inventory.AppEngInternalInventory; import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory; import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation; import appeng.tile.inventory.InvOperation;
@ -33,14 +32,14 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
TileSecurity securityBox; TileSecurity securityBox;
public ContainerSecurity(InventoryPlayer ip, ITerminalHost montiorable) { public ContainerSecurity(InventoryPlayer ip, ITerminalHost monitorable) {
super( ip, montiorable, false ); super( ip, monitorable, false );
securityBox = (TileSecurity) montiorable; securityBox = (TileSecurity) monitorable;
addSlotToContainer( configSlot = new SlotRestrictedInput( PlaceableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) ); addSlotToContainer( configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) );
addSlotToContainer( wirelessIn = new SlotRestrictedInput( PlaceableItemType.ENCODEABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) ); addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODEABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) ); addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) );
bindPlayerInventory( ip, 0, 0 ); bindPlayerInventory( ip, 0, 0 );

View file

@ -10,7 +10,6 @@ import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.spatial.TileSpatialIOPort; import appeng.tile.spatial.TileSpatialIOPort;
import appeng.util.Platform; import appeng.util.Platform;
@ -39,8 +38,8 @@ public class ContainerSpatialIOPort extends AEBaseContainer
if ( Platform.isServer() ) if ( Platform.isServer() )
network = te.getGridNode( ForgeDirection.UNKNOWN ).getGrid(); network = te.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.SPATIAL_STORAGE_CELLS, te, 0, 52, 48, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, te, 0, 52, 48, invPlayer ) );
addSlotToContainer( new SlotOutput( te, 1, 113, 48, PlaceableItemType.SPATIAL_STORAGE_CELLS.IIcon ) ); addSlotToContainer( new SlotOutput( te, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 ); bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 );
} }

View file

@ -19,7 +19,6 @@ import appeng.container.guisync.GuiSync;
import appeng.container.slot.OptionalSlotFakeTypeOnly; import appeng.container.slot.OptionalSlotFakeTypeOnly;
import appeng.container.slot.SlotFakeTypeOnly; import appeng.container.slot.SlotFakeTypeOnly;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.parts.misc.PartStorageBus; import appeng.parts.misc.PartStorageBus;
import appeng.util.Platform; import appeng.util.Platform;
import appeng.util.iterators.NullIterator; import appeng.util.iterators.NullIterator;
@ -85,11 +84,11 @@ public class ContainerStorageBus extends ContainerUpgradeable
} }
IInventory upgrades = myte.getInventoryByName( "upgrades" ); IInventory upgrades = myte.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() );
} }
@Override @Override

View file

@ -21,7 +21,6 @@ import appeng.container.slot.OptionalSlotFake;
import appeng.container.slot.OptionalSlotFakeTypeOnly; import appeng.container.slot.OptionalSlotFakeTypeOnly;
import appeng.container.slot.SlotFakeTypeOnly; import appeng.container.slot.SlotFakeTypeOnly;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.items.contents.NetworkToolViewer; import appeng.items.contents.NetworkToolViewer;
import appeng.items.tools.ToolNetworkTool; import appeng.items.tools.ToolNetworkTool;
import appeng.parts.automation.PartExportBus; import appeng.parts.automation.PartExportBus;
@ -78,7 +77,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{ {
for (int v = 0; v < 3; v++) for (int v = 0; v < 3; v++)
for (int u = 0; u < 3; u++) for (int u = 0; u < 3; u++)
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, tbinv, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18, addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbinv, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
invPlayer )).setPlayerSide() ); invPlayer )).setPlayerSide() );
} }
@ -91,13 +90,13 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{ {
IInventory upgrades = myte.getInventoryByName( "upgrades" ); IInventory upgrades = myte.getInventoryByName( "upgrades" );
if ( availableUpgrades() > 0 ) if ( availableUpgrades() > 0 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 1 ) if ( availableUpgrades() > 1 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 2 ) if ( availableUpgrades() > 2 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 3 ) if ( availableUpgrades() > 3 )
addSlotToContainer( (new SlotRestrictedInput( PlaceableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() ); addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
} }
protected void setupConfig() protected void setupConfig()

View file

@ -4,7 +4,6 @@ import net.minecraft.entity.player.InventoryPlayer;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.tile.misc.TileVibrationChamber; import appeng.tile.misc.TileVibrationChamber;
import appeng.util.Platform; import appeng.util.Platform;
@ -17,7 +16,7 @@ public class ContainerVibrationChamber extends AEBaseContainer
super( ip, te, null ); super( ip, te, null );
myte = te; myte = te;
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.FUEL, te, 0, 80, 37, invPlayer ) ); addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, te, 0, 80, 37, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
} }

View file

@ -4,7 +4,6 @@ import net.minecraft.entity.player.InventoryPlayer;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
import appeng.core.AEConfig; import appeng.core.AEConfig;
import appeng.tile.networking.TileWireless; import appeng.tile.networking.TileWireless;
@ -25,7 +24,7 @@ public class ContainerWireless extends AEBaseContainer
super( ip, te, null ); super( ip, te, null );
myte = te; myte = te;
addSlotToContainer( boosterSlot = new SlotRestrictedInput( PlaceableItemType.RANGE_BOOSTER, myte, 0, 80, 47, invPlayer ) ); addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, myte, 0, 80, 47, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 ); bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
} }

View file

@ -11,9 +11,9 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
WirelessTerminalGuiObject wtgo; WirelessTerminalGuiObject wtgo;
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject montiorable) { public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject monitorable) {
super( ip, montiorable ); super( ip, monitorable );
wtgo = montiorable; wtgo = monitorable;
} }
@Override @Override

View file

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

View file

@ -71,7 +71,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
public ItemStack craftItem(EntityPlayer p, ItemStack request, IMEMonitor<IAEItemStack> inv, IItemList all) public ItemStack craftItem(EntityPlayer p, ItemStack request, IMEMonitor<IAEItemStack> inv, IItemList all)
{ {
// update crafting matrx... // update crafting matrix...
ItemStack is = getStack(); ItemStack is = getStack();
if ( is != null && Platform.isSameItem( request, is ) ) if ( is != null && Platform.isSameItem( request, is ) )
@ -133,7 +133,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
postCraft( p, inv, set, is ); postCraft( p, inv, set, is );
} }
// shouldn't be nessiary... // shouldn't be necessary...
p.openContainer.onCraftMatrixChanged( getCraftingMatrix() ); p.openContainer.onCraftMatrixChanged( getCraftingMatrix() );
return is; return is;

View file

@ -1,12 +0,0 @@
package appeng.container.slot;
import net.minecraft.inventory.IInventory;
public class SlotInaccessableHD extends SlotInaccessable
{
public SlotInaccessableHD(IInventory i, int slotIdx, int x, int y) {
super( i, slotIdx, x, y );
}
}

View file

@ -4,10 +4,10 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class SlotInaccessable extends AppEngSlot public class SlotInaccessible extends AppEngSlot
{ {
public SlotInaccessable(IInventory i, int slotIdx, int x, int y) { public SlotInaccessible(IInventory i, int slotIdx, int x, int y) {
super( i, slotIdx, x, y ); super( i, slotIdx, x, y );
} }

View file

@ -0,0 +1,12 @@
package appeng.container.slot;
import net.minecraft.inventory.IInventory;
public class SlotInaccessibleHD extends SlotInaccessible
{
public SlotInaccessibleHD(IInventory i, int slotIdx, int x, int y) {
super( i, slotIdx, x, y );
}
}

View file

@ -26,15 +26,15 @@ import appeng.util.Platform;
public class SlotRestrictedInput extends AppEngSlot public class SlotRestrictedInput extends AppEngSlot
{ {
public enum PlaceableItemType public enum PlacableItemType
{ {
STORAGE_CELLS(15), ORE(1 * 16 + 15), STORAGE_COMPONENT(3 * 16 + 15), 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_OUPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 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),
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), 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_SINGULARTIY(10 * 16 + 15), SPATIAL_STORAGE_CELLS(11 * 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), VIEWCELL(4 * 16 + 14),
@ -42,7 +42,7 @@ public class SlotRestrictedInput extends AppEngSlot
public final int IIcon; public final int IIcon;
private PlaceableItemType(int o) { private PlacableItemType(int o) {
IIcon = o; IIcon = o;
} }
}; };
@ -57,7 +57,7 @@ public class SlotRestrictedInput extends AppEngSlot
public boolean isValid(ItemStack is, World theWorld) public boolean isValid(ItemStack is, World theWorld)
{ {
if ( which == PlaceableItemType.VALID_ENCODED_PATTERN_W_OUPUT ) if ( which == PlacableItemType.VALID_ENCODED_PATTERN_W_OUTPUT )
{ {
ICraftingPatternDetails ap = is.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem) is.getItem()).getPatternForItem( is, theWorld ) ICraftingPatternDetails ap = is.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem) is.getItem()).getPatternForItem( is, theWorld )
: null; : null;
@ -68,7 +68,7 @@ public class SlotRestrictedInput extends AppEngSlot
return true; return true;
} }
public PlaceableItemType which; public PlacableItemType which;
public boolean allowEdit = true; public boolean allowEdit = true;
public int stackLimit = -1; public int stackLimit = -1;
private InventoryPlayer p; private InventoryPlayer p;
@ -85,7 +85,7 @@ public class SlotRestrictedInput extends AppEngSlot
return this; return this;
} }
public SlotRestrictedInput(PlaceableItemType valid, IInventory i, int slotnum, int x, int y, InventoryPlayer p) { public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotnum, int x, int y, InventoryPlayer p) {
super( i, slotnum, x, y ); super( i, slotnum, x, y );
which = valid; which = valid;
IIcon = valid.IIcon; IIcon = valid.IIcon;
@ -95,7 +95,7 @@ public class SlotRestrictedInput extends AppEngSlot
@Override @Override
public ItemStack getDisplayStack() public ItemStack getDisplayStack()
{ {
if ( Platform.isClient() && (which == PlaceableItemType.ENCODED_PATTERN) ) if ( Platform.isClient() && (which == PlacableItemType.ENCODED_PATTERN) )
{ {
ItemStack is = super.getStack(); ItemStack is = super.getStack();
if ( is != null && is.getItem() instanceof ItemEncodedPattern ) if ( is != null && is.getItem() instanceof ItemEncodedPattern )
@ -139,7 +139,7 @@ public class SlotRestrictedInput extends AppEngSlot
return de.isCraftable(); return de.isCraftable();
} }
return false; return false;
case VALID_ENCODED_PATTERN_W_OUPUT: case VALID_ENCODED_PATTERN_W_OUTPUT:
case ENCODED_PATTERN_W_OUTPUT: case ENCODED_PATTERN_W_OUTPUT:
case ENCODED_PATTERN: { case ENCODED_PATTERN: {
if ( i.getItem() instanceof ICraftingPatternItem ) if ( i.getItem() instanceof ICraftingPatternItem )
@ -187,7 +187,7 @@ public class SlotRestrictedInput extends AppEngSlot
return TileEntityFurnace.getItemBurnTime( i ) > 0; return TileEntityFurnace.getItemBurnTime( i ) > 0;
case POWERED_TOOL: case POWERED_TOOL:
return Platform.isChargeable( i ); return Platform.isChargeable( i );
case QE_SINGULARTIY: case QE_SINGULARITY:
return api.materials().materialQESingularity.sameAsStack( i ); return api.materials().materialQESingularity.sameAsStack( i );
case RANGE_BOOSTER: case RANGE_BOOSTER:
return api.materials().materialWirelessBooster.sameAsStack( i ); return api.materials().materialWirelessBooster.sameAsStack( i );

View file

@ -126,11 +126,11 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
public boolean disableColoredCableRecipesInNEI = true; public boolean disableColoredCableRecipesInNEI = true;
public boolean updateable = false; public boolean updatable = false;
final private File myPath; final private File myPath;
public double metoriteClusterChance = 0.1; public double meteoriteClusterChance = 0.1;
public double metoriteSpawnChance = 0.3; public double meteoriteSpawnChance = 0.3;
public int craftingCalculationTimePerTick = 5; public int craftingCalculationTimePerTick = 5;
@ -235,8 +235,8 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
spawnChargedChance = (float) (1.0 - get( "worldGen", "spawnChargedChance", 1.0 - spawnChargedChance ).getDouble( 1.0 - spawnChargedChance )); spawnChargedChance = (float) (1.0 - get( "worldGen", "spawnChargedChance", 1.0 - spawnChargedChance ).getDouble( 1.0 - spawnChargedChance ));
minMeteoriteDistance = get( "worldGen", "minMeteoriteDistance", minMeteoriteDistance ).getInt( minMeteoriteDistance ); minMeteoriteDistance = get( "worldGen", "minMeteoriteDistance", minMeteoriteDistance ).getInt( minMeteoriteDistance );
metoriteClusterChance = get( "worldGen", "metoriteClusterChance", metoriteClusterChance ).getDouble( metoriteClusterChance ); meteoriteClusterChance = get( "worldGen", "meteoriteClusterChance", meteoriteClusterChance ).getDouble( meteoriteClusterChance );
metoriteSpawnChance = get( "worldGen", "metoriteSpawnChance", metoriteSpawnChance ).getDouble( metoriteSpawnChance ); meteoriteSpawnChance = get( "worldGen", "meteoriteSpawnChance", meteoriteSpawnChance ).getDouble( meteoriteSpawnChance );
quartzOresPerCluster = get( "worldGen", "quartzOresPerCluster", quartzOresPerCluster ).getInt( quartzOresPerCluster ); quartzOresPerCluster = get( "worldGen", "quartzOresPerCluster", quartzOresPerCluster ).getInt( quartzOresPerCluster );
quartzOresClusterAmount = get( "worldGen", "quartzOresClusterAmount", quartzOresClusterAmount ).getInt( quartzOresClusterAmount ); quartzOresClusterAmount = get( "worldGen", "quartzOresClusterAmount", quartzOresClusterAmount ).getInt( quartzOresClusterAmount );
@ -270,7 +270,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
{ {
if ( feature.isVisible() ) if ( feature.isVisible() )
{ {
if ( get( "Features." + feature.getCategory(), feature.name(), feature.defaultVaue() ).getBoolean( feature.defaultVaue() ) ) if ( get( "Features." + feature.getCategory(), feature.name(), feature.defaultValue() ).getBoolean( feature.defaultValue() ) )
featureFlags.add( feature ); featureFlags.add( feature );
} }
else else
@ -326,7 +326,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
} }
} }
updateable = true; updatable = true;
} }
public boolean useAEVersion(MaterialType mt) public boolean useAEVersion(MaterialType mt)
@ -377,7 +377,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
} }
} }
if ( updateable ) if ( updatable )
save(); save();
} }

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