Compare commits

...

8 Commits

Author SHA1 Message Date
thatsIch 9790d9fd93 Merge pull request #1187 from thatsIch/b-1059-fmp-disables-interfaces
Fixes #1059 FMP like TileEntities are not valid Interface targets anymore
2015-04-04 14:55:21 +02:00
yueh f3f89344b4 Merge pull request #1192 from yueh/fix-1191
Moved AEBaseBlock.setFeature() to the end of any constructor.
2015-04-04 14:40:35 +02:00
thatsIch bac94b67b8 Merge pull request #1199 from thatsIch/b-skychest-invtweaks-interaction
Fixes interaction bug between Sky Stone Chest and Inventory Tweaks
2015-04-04 14:33:06 +02:00
thatsIch ba1afcca38 Merge pull request #1198 from thatsIch/e-1197-ae-vibration
Fixes #1197 Vibration Chamber does produce AE, not ae
2015-04-04 14:32:54 +02:00
thatsIch bb1c341c95 Fixes #1059 FMP Blocks don't disturb the ME Interface identifier 2015-04-04 14:32:17 +02:00
thatsIch 2ef04f1303 Fixes interaction bug between Sky Stone Chest and Inventory Tweaks upon sort via space + click 2015-04-04 12:56:42 +02:00
thatsIch 632d048ee2 Fixes #1197 Vibration Chamber does produce AE, not ae 2015-04-04 12:26:15 +02:00
yueh adea6b3dec Moved AEBaseBlock.setFeature() to the end of any constructor.
Otherwise it can cause a registration of incomplete blocks, like missing
subtypes.
2015-04-04 01:31:51 +02:00
44 changed files with 93 additions and 90 deletions
@@ -46,10 +46,10 @@ public class BlockMolecularAssembler extends AEBaseBlock
public BlockMolecularAssembler() public BlockMolecularAssembler()
{ {
super( BlockMolecularAssembler.class, Material.iron ); super( BlockMolecularAssembler.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.MolecularAssembler ) );
this.setTileEntity( TileMolecularAssembler.class ); this.setTileEntity( TileMolecularAssembler.class );
this.isOpaque = false; this.isOpaque = false;
this.lightOpacity = 1; this.lightOpacity = 1;
this.setFeature( EnumSet.of( AEFeature.MolecularAssembler ) );
} }
@Override @Override
@@ -47,11 +47,11 @@ public class BlockCrank extends AEBaseBlock
public BlockCrank() public BlockCrank()
{ {
super( BlockCrank.class, Material.wood ); super( BlockCrank.class, Material.wood );
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
this.setTileEntity( TileCrank.class ); this.setTileEntity( TileCrank.class );
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.setHarvestLevel( "axe", 0 ); this.setHarvestLevel( "axe", 0 );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
} }
@Override @Override
@@ -39,9 +39,9 @@ public class BlockGrinder extends AEBaseBlock
public BlockGrinder() public BlockGrinder()
{ {
super( BlockGrinder.class, Material.rock ); super( BlockGrinder.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
this.setTileEntity( TileGrinder.class ); this.setTileEntity( TileGrinder.class );
this.setHardness( 3.2F ); this.setHardness( 3.2F );
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
} }
@Override @Override
@@ -39,8 +39,8 @@ public class BlockCellWorkbench extends AEBaseBlock
public BlockCellWorkbench() public BlockCellWorkbench()
{ {
super( BlockCellWorkbench.class, Material.iron ); super( BlockCellWorkbench.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
this.setTileEntity( TileCellWorkbench.class ); this.setTileEntity( TileCellWorkbench.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
} }
@Override @Override
@@ -55,10 +55,10 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
public BlockCharger() public BlockCharger()
{ {
super( BlockCharger.class, Material.iron ); super( BlockCharger.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileCharger.class ); this.setTileEntity( TileCharger.class );
this.setLightOpacity( 2 ); this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
@Override @Override
@@ -39,8 +39,8 @@ public class BlockCondenser extends AEBaseBlock
public BlockCondenser() public BlockCondenser()
{ {
super( BlockCondenser.class, Material.iron ); super( BlockCondenser.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileCondenser.class ); this.setTileEntity( TileCondenser.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
@Override @Override
@@ -41,10 +41,10 @@ public class BlockInscriber extends AEBaseBlock
public BlockInscriber() public BlockInscriber()
{ {
super( BlockInscriber.class, Material.iron ); super( BlockInscriber.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Inscriber ) );
this.setTileEntity( TileInscriber.class ); this.setTileEntity( TileInscriber.class );
this.setLightOpacity( 2 ); this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.Inscriber ) );
} }
@Override @Override
@@ -42,8 +42,8 @@ public class BlockInterface extends AEBaseBlock
public BlockInterface() public BlockInterface()
{ {
super( BlockInterface.class, Material.iron ); super( BlockInterface.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileInterface.class ); this.setTileEntity( TileInterface.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
@Override @Override
@@ -38,8 +38,8 @@ public class BlockLightDetector extends BlockQuartzTorch
public BlockLightDetector() public BlockLightDetector()
{ {
super( BlockLightDetector.class ); super( BlockLightDetector.class );
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
this.setTileEntity( TileLightDetector.class ); this.setTileEntity( TileLightDetector.class );
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
} }
@Override @Override
@@ -50,11 +50,11 @@ public class BlockPaint extends AEBaseBlock
public BlockPaint() public BlockPaint()
{ {
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) ); super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
this.setTileEntity( TilePaint.class ); this.setTileEntity( TilePaint.class );
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.isFullSize = false; this.isFullSize = false;
this.isOpaque = false; this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
} }
@Override @Override
@@ -53,8 +53,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
{ {
super( BlockQuartzGrowthAccelerator.class, Material.rock ); super( BlockQuartzGrowthAccelerator.class, Material.rock );
this.setStepSound( Block.soundTypeMetal ); this.setStepSound( Block.soundTypeMetal );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileQuartzGrowthAccelerator.class ); this.setTileEntity( TileQuartzGrowthAccelerator.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
@Override @Override
@@ -55,8 +55,8 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
public BlockQuartzTorch() public BlockQuartzTorch()
{ {
this( BlockQuartzTorch.class ); this( BlockQuartzTorch.class );
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
this.setLightLevel( 0.9375F ); this.setLightLevel( 0.9375F );
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
} }
protected BlockQuartzTorch( Class which ) protected BlockQuartzTorch( Class which )
@@ -41,8 +41,8 @@ public class BlockSecurity extends AEBaseBlock
public BlockSecurity() public BlockSecurity()
{ {
super( BlockSecurity.class, Material.iron ); super( BlockSecurity.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Security ) );
this.setTileEntity( TileSecurity.class ); this.setTileEntity( TileSecurity.class );
this.setFeature( EnumSet.of( AEFeature.Security ) );
} }
@Override @Override
@@ -50,10 +50,10 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
public BlockSkyCompass() public BlockSkyCompass()
{ {
super( BlockSkyCompass.class, Material.iron ); super( BlockSkyCompass.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) );
this.setTileEntity( TileSkyCompass.class ); this.setTileEntity( TileSkyCompass.class );
this.isOpaque = this.isFullSize = false; this.isOpaque = this.isFullSize = false;
this.lightOpacity = 0; this.lightOpacity = 0;
this.setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) );
} }
@Override @Override
@@ -59,12 +59,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
public BlockTinyTNT() public BlockTinyTNT()
{ {
super( BlockTinyTNT.class, Material.tnt ); super( BlockTinyTNT.class, Material.tnt );
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
this.setLightOpacity( 1 ); this.setLightOpacity( 1 );
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f ); this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
this.setStepSound( soundTypeGrass ); this.setStepSound( soundTypeGrass );
this.setHardness( 0F ); this.setHardness( 0F );
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.TINY_TNT, AppEng.instance, 16, 4, true ); EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.TINY_TNT, AppEng.instance, 16, 4, true );
} }
@@ -45,9 +45,9 @@ public class BlockVibrationChamber extends AEBaseBlock
public BlockVibrationChamber() public BlockVibrationChamber()
{ {
super( BlockVibrationChamber.class, Material.iron ); super( BlockVibrationChamber.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
this.setTileEntity( TileVibrationChamber.class ); this.setTileEntity( TileVibrationChamber.class );
this.setHardness( 4.2F ); this.setHardness( 4.2F );
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
} }
@Override @Override
@@ -92,9 +92,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
public BlockCableBus() public BlockCableBus()
{ {
super( BlockCableBus.class, AEGlassMaterial.INSTANCE ); super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
@Override @Override
@@ -38,9 +38,9 @@ public class BlockController extends AEBaseBlock
public BlockController() public BlockController()
{ {
super( BlockController.class, Material.iron ); super( BlockController.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Channels ) );
this.setTileEntity( TileController.class ); this.setTileEntity( TileController.class );
this.setHardness( 6 ); this.setHardness( 6 );
this.setFeature( EnumSet.of( AEFeature.Channels ) );
} }
@Override @Override
@@ -33,7 +33,7 @@ public class BlockCreativeEnergyCell extends AEBaseBlock
public BlockCreativeEnergyCell() public BlockCreativeEnergyCell()
{ {
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE ); super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
this.setFeature( EnumSet.of( AEFeature.Creative ) );
this.setTileEntity( TileCreativeEnergyCell.class ); this.setTileEntity( TileCreativeEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.Creative ) );
} }
} }
@@ -34,8 +34,8 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
public BlockDenseEnergyCell() public BlockDenseEnergyCell()
{ {
super( BlockDenseEnergyCell.class ); super( BlockDenseEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
this.setTileEntity( TileDenseEnergyCell.class ); this.setTileEntity( TileDenseEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
} }
@Override @Override
@@ -34,7 +34,7 @@ public class BlockEnergyAcceptor extends AEBaseBlock
public BlockEnergyAcceptor() public BlockEnergyAcceptor()
{ {
super( BlockEnergyAcceptor.class, Material.iron ); super( BlockEnergyAcceptor.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileEnergyAcceptor.class ); this.setTileEntity( TileEnergyAcceptor.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
} }
@@ -49,8 +49,8 @@ public class BlockEnergyCell extends AEBaseBlock
public BlockEnergyCell() public BlockEnergyCell()
{ {
this( BlockEnergyCell.class ); this( BlockEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileEnergyCell.class ); this.setTileEntity( TileEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
public BlockEnergyCell( Class c ) public BlockEnergyCell( Class c )
@@ -46,11 +46,11 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
public BlockWireless() public BlockWireless()
{ {
super( BlockWireless.class, AEGlassMaterial.INSTANCE ); super( BlockWireless.class, AEGlassMaterial.INSTANCE );
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
this.setTileEntity( TileWireless.class ); this.setTileEntity( TileWireless.class );
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.isFullSize = false; this.isFullSize = false;
this.isOpaque = false; this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
} }
@Override @Override
@@ -53,12 +53,12 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
public BlockQuantumLinkChamber() public BlockQuantumLinkChamber()
{ {
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE ); super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
this.setTileEntity( TileQuantumBridge.class ); this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f; float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave ); this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
} }
@Override @Override
@@ -43,12 +43,12 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
public BlockQuantumRing() public BlockQuantumRing()
{ {
super( BlockQuantumRing.class, Material.iron ); super( BlockQuantumRing.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
this.setTileEntity( TileQuantumBridge.class ); this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f; float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave ); this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 1 ); this.setLightOpacity( 1 );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
} }
@Override @Override
@@ -45,9 +45,9 @@ public class BlockQuartzGlass extends AEBaseBlock
public BlockQuartzGlass( Class c ) public BlockQuartzGlass( Class c )
{ {
super( c, Material.glass ); super( c, Material.glass );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.isOpaque = false; this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
} }
@Override @Override
@@ -40,9 +40,9 @@ public class BlockQuartzLamp extends BlockQuartzGlass
public BlockQuartzLamp() public BlockQuartzLamp()
{ {
super( BlockQuartzLamp.class ); super( BlockQuartzLamp.class );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
this.setLightLevel( 1.0f ); this.setLightLevel( 1.0f );
this.setBlockTextureName( "BlockQuartzGlass" ); this.setBlockTextureName( "BlockQuartzGlass" );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
} }
@Override @Override
@@ -72,11 +72,12 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
public BlockSkyStone() public BlockSkyStone()
{ {
super( BlockSkyStone.class, Material.rock ); super( BlockSkyStone.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setHardness( 50 ); this.setHardness( 50 );
this.hasSubtypes = true; this.hasSubtypes = true;
this.blockResistance = 150.0f; this.blockResistance = 150.0f;
this.setHarvestLevel( "pickaxe", 3, 0 ); this.setHarvestLevel( "pickaxe", 3, 0 );
this.setFeature( EnumSet.of( AEFeature.Core ) );
MinecraftForge.EVENT_BUS.register( this ); MinecraftForge.EVENT_BUS.register( this );
} }
@@ -53,12 +53,12 @@ public class OreQuartz extends AEBaseBlock
public OreQuartz( Class<? extends OreQuartz> self ) public OreQuartz( Class<? extends OreQuartz> self )
{ {
super( self, Material.rock ); super( self, Material.rock );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setHardness( 3.0F ); this.setHardness( 3.0F );
this.setResistance( 5.0F ); this.setResistance( 5.0F );
this.boostBrightnessLow = 0; this.boostBrightnessLow = 0;
this.boostBrightnessHigh = 1; this.boostBrightnessHigh = 1;
this.enhanceBrightness = false; this.enhanceBrightness = false;
this.setFeature( EnumSet.of( AEFeature.Core ) );
} }
@Override @Override
@@ -50,11 +50,11 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
public BlockMatrixFrame() public BlockMatrixFrame()
{ {
super( BlockMatrixFrame.class, Material.anvil ); super( BlockMatrixFrame.class, Material.anvil );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
this.setResistance( 6000000.0F ); this.setResistance( 6000000.0F );
this.setBlockUnbreakable(); this.setBlockUnbreakable();
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.isOpaque = false; this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
} }
@Override @Override
@@ -40,8 +40,8 @@ public class BlockSpatialIOPort extends AEBaseBlock
public BlockSpatialIOPort() public BlockSpatialIOPort()
{ {
super( BlockSpatialIOPort.class, Material.iron ); super( BlockSpatialIOPort.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
this.setTileEntity( TileSpatialIOPort.class ); this.setTileEntity( TileSpatialIOPort.class );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
} }
@Override @Override
@@ -39,8 +39,8 @@ public class BlockSpatialPylon extends AEBaseBlock
public BlockSpatialPylon() public BlockSpatialPylon()
{ {
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE ); super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
this.setTileEntity( TileSpatialPylon.class ); this.setTileEntity( TileSpatialPylon.class );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
} }
@Override @Override
@@ -45,8 +45,8 @@ public class BlockChest extends AEBaseBlock
public BlockChest() public BlockChest()
{ {
super( BlockChest.class, Material.iron ); super( BlockChest.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
this.setTileEntity( TileChest.class ); this.setTileEntity( TileChest.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
} }
@Override @Override
@@ -41,8 +41,8 @@ public class BlockDrive extends AEBaseBlock
public BlockDrive() public BlockDrive()
{ {
super( BlockDrive.class, Material.iron ); super( BlockDrive.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
this.setTileEntity( TileDrive.class ); this.setTileEntity( TileDrive.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
} }
@Override @Override
@@ -40,8 +40,8 @@ public class BlockIOPort extends AEBaseBlock
public BlockIOPort() public BlockIOPort()
{ {
super( BlockIOPort.class, Material.iron ); super( BlockIOPort.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
this.setTileEntity( TileIOPort.class ); this.setTileEntity( TileIOPort.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
} }
@Override @Override
@@ -58,13 +58,13 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
public BlockSkyChest() public BlockSkyChest()
{ {
super( BlockSkyChest.class, Material.rock ); super( BlockSkyChest.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
this.setTileEntity( TileSkyChest.class ); this.setTileEntity( TileSkyChest.class );
this.isOpaque = this.isFullSize = false; this.isOpaque = this.isFullSize = false;
this.lightOpacity = 0; this.lightOpacity = 0;
this.hasSubtypes = true; this.hasSubtypes = true;
this.setHardness( 50 ); this.setHardness( 50 );
this.blockResistance = 150.0f; this.blockResistance = 150.0f;
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
} }
@Override @Override
@@ -62,7 +62,7 @@ public class GuiVibrationChamber extends AEBaseGui
int k = 25; int k = 25;
int l = -15; int l = -15;
this.pb.setFullMsg( this.cvc.aePerTick * this.cvc.getCurrentProgress() / 100 + " ae/t" ); this.pb.setFullMsg( this.cvc.aePerTick * this.cvc.getCurrentProgress() / 100 + " AE/t" );
if( this.cvc.getCurrentProgress() > 0 ) if( this.cvc.getCurrentProgress() > 0 )
{ {
@@ -348,14 +348,7 @@ public abstract class AEBaseContainer extends Container
protected void bindPlayerInventory( InventoryPlayer inventoryPlayer, int offset_x, int offset_y ) protected void bindPlayerInventory( InventoryPlayer inventoryPlayer, int offset_x, int offset_y )
{ {
for( int i = 0; i < 9; i++ ) // bind player inventory
{
if( this.locked.contains( i ) )
this.addSlotToContainer( new SlotDisabled( inventoryPlayer, i, 8 + i * 18 + offset_x, 58 + offset_y ) );
else
this.addSlotToContainer( new SlotPlayerHotBar( inventoryPlayer, i, 8 + i * 18 + offset_x, 58 + offset_y ) );
}
for( int i = 0; i < 3; i++ ) for( int i = 0; i < 3; i++ )
{ {
for( int j = 0; j < 9; j++ ) for( int j = 0; j < 9; j++ )
@@ -366,6 +359,15 @@ public abstract class AEBaseContainer extends Container
this.addSlotToContainer( new SlotPlayerInv( inventoryPlayer, j + i * 9 + 9, 8 + j * 18 + offset_x, offset_y + i * 18 ) ); this.addSlotToContainer( new SlotPlayerInv( inventoryPlayer, j + i * 9 + 9, 8 + j * 18 + offset_x, offset_y + i * 18 ) );
} }
} }
// bind player hotbar
for( int i = 0; i < 9; i++ )
{
if( this.locked.contains( i ) )
this.addSlotToContainer( new SlotDisabled( inventoryPlayer, i, 8 + i * 18 + offset_x, 58 + offset_y ) );
else
this.addSlotToContainer( new SlotPlayerHotBar( inventoryPlayer, i, 8 + i * 18 + offset_x, 58 + offset_y ) );
}
} }
@Override @Override
@@ -54,17 +54,17 @@ import appeng.util.inv.AdaptorPlayerHand;
import appeng.util.inv.WrapperInvSlot; import appeng.util.inv.WrapperInvSlot;
public class ContainerInterfaceTerminal extends AEBaseContainer public final class ContainerInterfaceTerminal extends AEBaseContainer
{ {
/** /**
* this stuff is all server side.. * this stuff is all server side..
*/ */
static private long autoBase = Long.MIN_VALUE; private static long autoBase = Long.MIN_VALUE;
final Map<IInterfaceHost, InvTracker> diList = new HashMap<IInterfaceHost, InvTracker>(); final Map<IInterfaceHost, InvTracker> diList = new HashMap<IInterfaceHost, InvTracker>();
final Map<Long, InvTracker> byId = new HashMap<Long, InvTracker>(); final Map<Long, InvTracker> byId = new HashMap<Long, InvTracker>();
IGrid g; IGrid grid;
NBTTagCompound data = new NBTTagCompound(); NBTTagCompound data = new NBTTagCompound();
public ContainerInterfaceTerminal( InventoryPlayer ip, PartMonitor anchor ) public ContainerInterfaceTerminal( InventoryPlayer ip, PartMonitor anchor )
@@ -72,7 +72,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
super( ip, anchor ); super( ip, anchor );
if( Platform.isServer() ) if( Platform.isServer() )
this.g = anchor.getActionableNode().getGrid(); this.grid = anchor.getActionableNode().getGrid();
this.bindPlayerInventory( ip, 0, 222 - /* height of player inventory */82 ); this.bindPlayerInventory( ip, 0, 222 - /* height of player inventory */82 );
} }
@@ -85,7 +85,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
super.detectAndSendChanges(); super.detectAndSendChanges();
if( this.g == null ) if( this.grid == null )
return; return;
int total = 0; int total = 0;
@@ -97,7 +97,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
IGridNode agn = host.getActionableNode(); IGridNode agn = host.getActionableNode();
if( agn != null && agn.isActive() ) if( agn != null && agn.isActive() )
{ {
for( IGridNode gn : this.g.getMachines( TileInterface.class ) ) for( IGridNode gn : this.grid.getMachines( TileInterface.class ) )
{ {
if( gn.isActive() ) if( gn.isActive() )
{ {
@@ -120,7 +120,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
} }
} }
for( IGridNode gn : this.g.getMachines( PartInterface.class ) ) for( IGridNode gn : this.grid.getMachines( PartInterface.class ) )
{ {
if( gn.isActive() ) if( gn.isActive() )
{ {
@@ -289,7 +289,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
IGridNode agn = host.getActionableNode(); IGridNode agn = host.getActionableNode();
if( agn != null && agn.isActive() ) if( agn != null && agn.isActive() )
{ {
for( IGridNode gn : this.g.getMachines( TileInterface.class ) ) for( IGridNode gn : this.grid.getMachines( TileInterface.class ) )
{ {
IInterfaceHost ih = (IInterfaceHost) gn.getMachine(); IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
DualityInterface dual = ih.getInterfaceDuality(); DualityInterface dual = ih.getInterfaceDuality();
@@ -297,7 +297,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
this.diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) ); this.diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) );
} }
for( IGridNode gn : this.g.getMachines( PartInterface.class ) ) for( IGridNode gn : this.grid.getMachines( PartInterface.class ) )
{ {
IInterfaceHost ih = (IInterfaceHost) gn.getMachine(); IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
DualityInterface dual = ih.getInterfaceDuality(); DualityInterface dual = ih.getInterfaceDuality();
@@ -40,9 +40,9 @@ public class BlockChunkloader extends AEBaseBlock implements LoadingCallback
public BlockChunkloader() public BlockChunkloader()
{ {
super( BlockChunkloader.class, Material.iron ); super( BlockChunkloader.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
this.setTileEntity( TileChunkLoader.class ); this.setTileEntity( TileChunkLoader.class );
ForgeChunkManager.setForcedChunkLoadingCallback( AppEng.instance, this ); ForgeChunkManager.setForcedChunkLoadingCallback( AppEng.instance, this );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
} }
@Override @Override
@@ -36,8 +36,8 @@ public class BlockCubeGenerator extends AEBaseBlock
public BlockCubeGenerator() public BlockCubeGenerator()
{ {
super( BlockCubeGenerator.class, Material.iron ); super( BlockCubeGenerator.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
this.setTileEntity( TileCubeGenerator.class ); this.setTileEntity( TileCubeGenerator.class );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
} }
@Override @Override
+1 -1
View File
@@ -34,8 +34,8 @@ public class BlockItemGen extends AEBaseBlock
public BlockItemGen() public BlockItemGen()
{ {
super( BlockItemGen.class, Material.iron ); super( BlockItemGen.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
this.setTileEntity( TileItemGen.class ); this.setTileEntity( TileItemGen.class );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
} }
@Override @Override
@@ -36,8 +36,8 @@ public class BlockPhantomNode extends AEBaseBlock
public BlockPhantomNode() public BlockPhantomNode()
{ {
super( BlockPhantomNode.class, Material.iron ); super( BlockPhantomNode.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
this.setTileEntity( TilePhantomNode.class ); this.setTileEntity( TilePhantomNode.class );
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
} }
@Override @Override
@@ -981,32 +981,28 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
public String getTermName() public String getTermName()
{ {
TileEntity tile = this.iHost.getTileEntity(); final TileEntity hostTile = this.iHost.getTileEntity();
World w = tile.getWorldObj(); final World hostWorld = hostTile.getWorldObj();
if( ( (ICustomNameObject) this.iHost ).hasCustomName() ) if( ( (ICustomNameObject) this.iHost ).hasCustomName() )
return ( (ICustomNameObject) this.iHost ).getCustomName(); return ( (ICustomNameObject) this.iHost ).getCustomName();
EnumSet<ForgeDirection> possibleDirections = this.iHost.getTargets(); final EnumSet<ForgeDirection> possibleDirections = this.iHost.getTargets();
for( ForgeDirection s : possibleDirections ) for( ForgeDirection direction : possibleDirections )
{ {
Vec3 from = Vec3.createVectorHelper( tile.xCoord + 0.5, tile.yCoord + 0.5, tile.zCoord + 0.5 ); final int xPos = hostTile.xCoord + direction.offsetX;
from = from.addVector( s.offsetX * 0.501, s.offsetY * 0.501, s.offsetZ * 0.501 ); final int yPos = hostTile.yCoord + direction.offsetY;
Vec3 to = from.addVector( s.offsetX, s.offsetY, s.offsetZ ); final int zPos = hostTile.zCoord + direction.offsetZ;
final TileEntity directedTile = hostWorld.getTileEntity( xPos, yPos, zPos );
Block blk = w.getBlock( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ ); if( directedTile == null )
MovingObjectPosition mop = w.rayTraceBlocks( from, to, true );
TileEntity te = w.getTileEntity( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
if( te == null )
continue; continue;
if( te instanceof IInterfaceHost ) if( directedTile instanceof IInterfaceHost )
{ {
try try
{ {
if( ( (IInterfaceHost) te ).getInterfaceDuality().sameGrid( this.gridProxy.getGrid() ) ) if( ( (IInterfaceHost) directedTile ).getInterfaceDuality().sameGrid( this.gridProxy.getGrid() ) )
continue; continue;
} }
catch( GridAccessException e ) catch( GridAccessException e )
@@ -1015,35 +1011,33 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
} }
} }
Item item = Item.getItemFromBlock( blk ); final InventoryAdaptor adaptor = InventoryAdaptor.getAdaptor( directedTile, direction.getOpposite() );
if( directedTile instanceof ICraftingMachine || adaptor != null )
if( item == null )
{ {
return blk.getUnlocalizedName(); if( directedTile instanceof IInventory && ( (IInventory) directedTile ).getSizeInventory() == 0 )
}
ItemStack what = new ItemStack( item, 1, blk.getDamageValue( w, tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ ) );
if( te instanceof ICraftingMachine || InventoryAdaptor.getAdaptor( te, s.getOpposite() ) != null )
{
if( te instanceof IInventory && ( (IInventory) te ).getSizeInventory() == 0 )
continue; continue;
if( te instanceof ISidedInventory ) if( directedTile instanceof ISidedInventory )
{ {
int[] sides = ( (ISidedInventory) te ).getAccessibleSlotsFromSide( s.getOpposite().ordinal() ); int[] sides = ( (ISidedInventory) directedTile ).getAccessibleSlotsFromSide( direction.getOpposite().ordinal() );
if( sides == null || sides.length == 0 ) if( sides == null || sides.length == 0 )
continue; continue;
} }
final Block directedBlock = hostWorld.getBlock( xPos, yPos, zPos );
ItemStack what = new ItemStack( directedBlock, 1, directedBlock.getDamageValue( hostWorld, xPos, yPos, zPos ) );
try try
{ {
if( mop != null && !badBlocks.contains( blk ) ) Vec3 from = Vec3.createVectorHelper( hostTile.xCoord + 0.5, hostTile.yCoord + 0.5, hostTile.zCoord + 0.5 );
from = from.addVector( direction.offsetX * 0.501, direction.offsetY * 0.501, direction.offsetZ * 0.501 );
Vec3 to = from.addVector( direction.offsetX, direction.offsetY, direction.offsetZ );
MovingObjectPosition mop = hostWorld.rayTraceBlocks( from, to, true );
if( mop != null && !badBlocks.contains( directedBlock ) )
{ {
if( mop.blockX == te.xCoord && mop.blockY == te.yCoord && mop.blockZ == te.zCoord ) if( mop.blockX == directedTile.xCoord && mop.blockY == directedTile.yCoord && mop.blockZ == directedTile.zCoord )
{ {
ItemStack g = blk.getPickBlock( mop, w, te.xCoord, te.yCoord, te.zCoord, null ); ItemStack g = directedBlock.getPickBlock( mop, hostWorld, directedTile.xCoord, directedTile.yCoord, directedTile.zCoord, null );
if( g != null ) if( g != null )
what = g; what = g;
} }
@@ -1051,11 +1045,17 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
} }
catch( Throwable t ) catch( Throwable t )
{ {
badBlocks.add( blk ); // nope! badBlocks.add( directedBlock ); // nope!
} }
if( what.getItem() != null ) if( what.getItem() != null )
return what.getUnlocalizedName(); return what.getUnlocalizedName();
Item item = Item.getItemFromBlock( directedBlock );
if( item == null )
{
return directedBlock.getUnlocalizedName();
}
} }
} }