Merge pull request #1417 from thatsIch/e-reflection-stuff
Removes the unneeded information about the current class in all blocks
This commit is contained in:
commit
9d4fd64c58
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Sat May 02 19:28:20 CEST 2015
|
#Sun May 03 18:51:13 CEST 2015
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip
|
||||||
|
|
|
@ -49,7 +49,6 @@ import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
@ -102,9 +101,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
@Nullable
|
@Nullable
|
||||||
private Class<? extends TileEntity> tileEntityType = null;
|
private Class<? extends TileEntity> tileEntityType = null;
|
||||||
|
|
||||||
protected AEBaseBlock( Class<? extends AEBaseBlock> c, Material mat )
|
protected AEBaseBlock( Material mat )
|
||||||
{
|
{
|
||||||
this( c, mat, Optional.<String>absent() );
|
this( mat, Optional.<String>absent() );
|
||||||
this.setLightOpacity( 255 );
|
this.setLightOpacity( 255 );
|
||||||
this.setLightLevel( 0 );
|
this.setLightLevel( 0 );
|
||||||
this.setHardness( 2.2F );
|
this.setHardness( 2.2F );
|
||||||
|
@ -112,7 +111,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
this.setHarvestLevel( "pickaxe", 0 );
|
this.setHarvestLevel( "pickaxe", 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AEBaseBlock( Class<?> c, Material mat, Optional<String> subName )
|
protected AEBaseBlock( Material mat, Optional<String> subName )
|
||||||
{
|
{
|
||||||
super( mat );
|
super( mat );
|
||||||
|
|
||||||
|
@ -133,7 +132,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
this.setStepSound( Block.soundTypeMetal );
|
this.setStepSound( Block.soundTypeMetal );
|
||||||
}
|
}
|
||||||
|
|
||||||
this.featureFullName = new FeatureNameExtractor( c, subName ).get();
|
this.featureFullName = new FeatureNameExtractor( this.getClass(), subName ).get();
|
||||||
this.featureSubName = subName;
|
this.featureSubName = subName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +196,6 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
this.tileEntityType = c;
|
this.tileEntityType = c;
|
||||||
|
|
||||||
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
|
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
|
||||||
GameRegistry.registerTileEntity( this.tileEntityType, this.featureFullName );
|
|
||||||
this.isInventory = IInventory.class.isAssignableFrom( c );
|
this.isInventory = IInventory.class.isAssignableFrom( c );
|
||||||
this.setTileProvider( this.hasBlockTileEntity() );
|
this.setTileProvider( this.hasBlockTileEntity() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,9 @@ import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
public class AEDecorativeBlock extends AEBaseBlock
|
public class AEDecorativeBlock extends AEBaseBlock
|
||||||
{
|
{
|
||||||
public AEDecorativeBlock( Class<? extends AEBaseBlock> c, Material mat )
|
public AEDecorativeBlock( Material mat )
|
||||||
{
|
{
|
||||||
super( c, mat );
|
super( mat );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -40,11 +40,8 @@ import appeng.tile.crafting.TileCraftingMonitorTile;
|
||||||
|
|
||||||
public class BlockCraftingMonitor extends BlockCraftingUnit
|
public class BlockCraftingMonitor extends BlockCraftingUnit
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockCraftingMonitor()
|
public BlockCraftingMonitor()
|
||||||
{
|
{
|
||||||
super( BlockCraftingMonitor.class );
|
|
||||||
|
|
||||||
this.setTileEntity( TileCraftingMonitorTile.class );
|
this.setTileEntity( TileCraftingMonitorTile.class );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,6 @@ public class BlockCraftingStorage extends BlockCraftingUnit
|
||||||
{
|
{
|
||||||
public BlockCraftingStorage()
|
public BlockCraftingStorage()
|
||||||
{
|
{
|
||||||
super( BlockCraftingStorage.class );
|
|
||||||
|
|
||||||
this.setTileEntity( TileCraftingStorageTile.class );
|
this.setTileEntity( TileCraftingStorageTile.class );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,16 +51,10 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||||
|
|
||||||
public BlockCraftingUnit()
|
public BlockCraftingUnit()
|
||||||
{
|
{
|
||||||
this( BlockCraftingUnit.class );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileCraftingTile.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockCraftingUnit( Class<? extends BlockCraftingUnit> childClass )
|
|
||||||
{
|
|
||||||
super( childClass, Material.iron );
|
|
||||||
|
|
||||||
this.hasSubtypes = true;
|
this.hasSubtypes = true;
|
||||||
|
this.setTileEntity( TileCraftingTile.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) );
|
this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,8 @@ public class BlockMolecularAssembler extends AEBaseBlock
|
||||||
|
|
||||||
public BlockMolecularAssembler()
|
public BlockMolecularAssembler()
|
||||||
{
|
{
|
||||||
super( BlockMolecularAssembler.class, Material.iron );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileMolecularAssembler.class );
|
this.setTileEntity( TileMolecularAssembler.class );
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
this.lightOpacity = 1;
|
this.lightOpacity = 1;
|
||||||
|
|
|
@ -46,7 +46,8 @@ public class BlockCrank extends AEBaseBlock
|
||||||
|
|
||||||
public BlockCrank()
|
public BlockCrank()
|
||||||
{
|
{
|
||||||
super( BlockCrank.class, Material.wood );
|
super( Material.wood );
|
||||||
|
|
||||||
this.setTileEntity( TileCrank.class );
|
this.setTileEntity( TileCrank.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.setHarvestLevel( "axe", 0 );
|
this.setHarvestLevel( "axe", 0 );
|
||||||
|
|
|
@ -38,7 +38,8 @@ public class BlockGrinder extends AEBaseBlock
|
||||||
|
|
||||||
public BlockGrinder()
|
public BlockGrinder()
|
||||||
{
|
{
|
||||||
super( BlockGrinder.class, Material.rock );
|
super( Material.rock );
|
||||||
|
|
||||||
this.setTileEntity( TileGrinder.class );
|
this.setTileEntity( TileGrinder.class );
|
||||||
this.setHardness( 3.2F );
|
this.setHardness( 3.2F );
|
||||||
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
||||||
|
|
|
@ -38,7 +38,8 @@ public class BlockCellWorkbench extends AEBaseBlock
|
||||||
|
|
||||||
public BlockCellWorkbench()
|
public BlockCellWorkbench()
|
||||||
{
|
{
|
||||||
super( BlockCellWorkbench.class, Material.iron );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileCellWorkbench.class );
|
this.setTileEntity( TileCellWorkbench.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
|
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,8 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
|
||||||
|
|
||||||
public BlockCharger()
|
public BlockCharger()
|
||||||
{
|
{
|
||||||
super( BlockCharger.class, Material.iron );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileCharger.class );
|
this.setTileEntity( TileCharger.class );
|
||||||
this.setLightOpacity( 2 );
|
this.setLightOpacity( 2 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
|
|
@ -38,7 +38,8 @@ public class BlockCondenser extends AEBaseBlock
|
||||||
|
|
||||||
public BlockCondenser()
|
public BlockCondenser()
|
||||||
{
|
{
|
||||||
super( BlockCondenser.class, Material.iron );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileCondenser.class );
|
this.setTileEntity( TileCondenser.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,8 @@ public class BlockInscriber extends AEBaseBlock
|
||||||
|
|
||||||
public BlockInscriber()
|
public BlockInscriber()
|
||||||
{
|
{
|
||||||
super( BlockInscriber.class, Material.iron );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileInscriber.class );
|
this.setTileEntity( TileInscriber.class );
|
||||||
this.setLightOpacity( 2 );
|
this.setLightOpacity( 2 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
|
|
@ -41,7 +41,8 @@ public class BlockInterface extends AEBaseBlock
|
||||||
|
|
||||||
public BlockInterface()
|
public BlockInterface()
|
||||||
{
|
{
|
||||||
super( BlockInterface.class, Material.iron );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileInterface.class );
|
this.setTileEntity( TileInterface.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,6 @@ public class BlockLightDetector extends BlockQuartzTorch
|
||||||
|
|
||||||
public BlockLightDetector()
|
public BlockLightDetector()
|
||||||
{
|
{
|
||||||
super( BlockLightDetector.class );
|
|
||||||
this.setTileEntity( TileLightDetector.class );
|
this.setTileEntity( TileLightDetector.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
|
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,8 @@ public class BlockPaint extends AEBaseBlock
|
||||||
|
|
||||||
public BlockPaint()
|
public BlockPaint()
|
||||||
{
|
{
|
||||||
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
|
super( new MaterialLiquid( MapColor.airColor ) );
|
||||||
|
|
||||||
this.setTileEntity( TilePaint.class );
|
this.setTileEntity( TilePaint.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = false;
|
this.isFullSize = false;
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
||||||
|
|
||||||
public BlockQuartzGrowthAccelerator()
|
public BlockQuartzGrowthAccelerator()
|
||||||
{
|
{
|
||||||
super( BlockQuartzGrowthAccelerator.class, Material.rock );
|
super( Material.rock );
|
||||||
this.setStepSound( Block.soundTypeMetal );
|
this.setStepSound( Block.soundTypeMetal );
|
||||||
this.setTileEntity( TileQuartzGrowthAccelerator.class );
|
this.setTileEntity( TileQuartzGrowthAccelerator.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
|
|
|
@ -51,19 +51,15 @@ import appeng.helpers.MetaRotation;
|
||||||
|
|
||||||
public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, ICustomCollision
|
public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, ICustomCollision
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockQuartzTorch()
|
public BlockQuartzTorch()
|
||||||
{
|
{
|
||||||
this( BlockQuartzTorch.class );
|
super( Material.circuits );
|
||||||
this.setLightLevel( 0.9375F );
|
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
protected BlockQuartzTorch( Class which )
|
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
|
||||||
{
|
this.setLightLevel( 0.9375F );
|
||||||
super( which, Material.circuits );
|
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = false;
|
||||||
|
this.isOpaque = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -40,7 +40,8 @@ public class BlockSecurity extends AEBaseBlock
|
||||||
|
|
||||||
public BlockSecurity()
|
public BlockSecurity()
|
||||||
{
|
{
|
||||||
super( BlockSecurity.class, Material.iron );
|
super( Material.iron );
|
||||||
|
|
||||||
this.setTileEntity( TileSecurity.class );
|
this.setTileEntity( TileSecurity.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Security ) );
|
this.setFeature( EnumSet.of( AEFeature.Security ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
||||||
|
|
||||||
public BlockSkyCompass()
|
public BlockSkyCompass()
|
||||||
{
|
{
|
||||||
super( BlockSkyCompass.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileSkyCompass.class );
|
this.setTileEntity( TileSkyCompass.class );
|
||||||
this.isOpaque = this.isFullSize = false;
|
this.isOpaque = this.isFullSize = false;
|
||||||
this.lightOpacity = 0;
|
this.lightOpacity = 0;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||||
|
|
||||||
public BlockTinyTNT()
|
public BlockTinyTNT()
|
||||||
{
|
{
|
||||||
super( BlockTinyTNT.class, Material.tnt );
|
super( Material.tnt );
|
||||||
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;
|
||||||
|
|
|
@ -44,7 +44,7 @@ public final class BlockVibrationChamber extends AEBaseBlock
|
||||||
|
|
||||||
public BlockVibrationChamber()
|
public BlockVibrationChamber()
|
||||||
{
|
{
|
||||||
super( BlockVibrationChamber.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileVibrationChamber.class );
|
this.setTileEntity( TileVibrationChamber.class );
|
||||||
this.setHardness( 4.2F );
|
this.setHardness( 4.2F );
|
||||||
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||||
|
|
||||||
public BlockCableBus()
|
public BlockCableBus()
|
||||||
{
|
{
|
||||||
super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
|
@ -483,7 +483,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||||
|
|
||||||
public void setupTile()
|
public void setupTile()
|
||||||
{
|
{
|
||||||
this.setTileEntity( noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class.getName() ) );
|
noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class.getName() );
|
||||||
|
this.setTileEntity( noTesrTile );
|
||||||
|
GameRegistry.registerTileEntity( noTesrTile, "BlockCableBus" );
|
||||||
if( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
{
|
{
|
||||||
tesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBusTESR.class.getName() );
|
tesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBusTESR.class.getName() );
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class BlockController extends AEBaseBlock
|
||||||
|
|
||||||
public BlockController()
|
public BlockController()
|
||||||
{
|
{
|
||||||
super( BlockController.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileController.class );
|
this.setTileEntity( TileController.class );
|
||||||
this.setHardness( 6 );
|
this.setHardness( 6 );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Channels ) );
|
this.setFeature( EnumSet.of( AEFeature.Channels ) );
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class BlockCreativeEnergyCell extends AEBaseBlock
|
||||||
|
|
||||||
public BlockCreativeEnergyCell()
|
public BlockCreativeEnergyCell()
|
||||||
{
|
{
|
||||||
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
this.setTileEntity( TileCreativeEnergyCell.class );
|
this.setTileEntity( TileCreativeEnergyCell.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Creative ) );
|
this.setFeature( EnumSet.of( AEFeature.Creative ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
|
||||||
|
|
||||||
public BlockDenseEnergyCell()
|
public BlockDenseEnergyCell()
|
||||||
{
|
{
|
||||||
super( BlockDenseEnergyCell.class );
|
|
||||||
this.setTileEntity( TileDenseEnergyCell.class );
|
this.setTileEntity( TileDenseEnergyCell.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
|
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class BlockEnergyAcceptor extends AEBaseBlock
|
||||||
|
|
||||||
public BlockEnergyAcceptor()
|
public BlockEnergyAcceptor()
|
||||||
{
|
{
|
||||||
super( BlockEnergyAcceptor.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileEnergyAcceptor.class );
|
this.setTileEntity( TileEnergyAcceptor.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,16 +48,12 @@ public class BlockEnergyCell extends AEBaseBlock
|
||||||
|
|
||||||
public BlockEnergyCell()
|
public BlockEnergyCell()
|
||||||
{
|
{
|
||||||
this( BlockEnergyCell.class );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
|
|
||||||
this.setTileEntity( TileEnergyCell.class );
|
this.setTileEntity( TileEnergyCell.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockEnergyCell( Class c )
|
|
||||||
{
|
|
||||||
super( c, AEGlassMaterial.INSTANCE );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Class<? extends BaseBlockRender> getRenderer()
|
protected Class<? extends BaseBlockRender> getRenderer()
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
||||||
|
|
||||||
public BlockWireless()
|
public BlockWireless()
|
||||||
{
|
{
|
||||||
super( BlockWireless.class, AEGlassMaterial.INSTANCE );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
this.setTileEntity( TileWireless.class );
|
this.setTileEntity( TileWireless.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = false;
|
this.isFullSize = false;
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
||||||
|
|
||||||
public BlockQuantumLinkChamber()
|
public BlockQuantumLinkChamber()
|
||||||
{
|
{
|
||||||
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
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 );
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
||||||
|
|
||||||
public BlockQuantumRing()
|
public BlockQuantumRing()
|
||||||
{
|
{
|
||||||
super( BlockQuantumRing.class, Material.iron );
|
super( Material.iron );
|
||||||
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 );
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class BlockFluix extends AEDecorativeBlock
|
||||||
{
|
{
|
||||||
public BlockFluix()
|
public BlockFluix()
|
||||||
{
|
{
|
||||||
super( BlockFluix.class, Material.rock );
|
super( Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class BlockQuartz extends AEDecorativeBlock
|
||||||
|
|
||||||
public BlockQuartz()
|
public BlockQuartz()
|
||||||
{
|
{
|
||||||
super( BlockQuartz.class, Material.rock );
|
super( Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class BlockQuartzChiseled extends AEDecorativeBlock
|
||||||
|
|
||||||
public BlockQuartzChiseled()
|
public BlockQuartzChiseled()
|
||||||
{
|
{
|
||||||
super( BlockQuartzChiseled.class, Material.rock );
|
super( Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,15 +36,9 @@ import appeng.helpers.AEGlassMaterial;
|
||||||
|
|
||||||
public class BlockQuartzGlass extends AEBaseBlock
|
public class BlockQuartzGlass extends AEBaseBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockQuartzGlass()
|
public BlockQuartzGlass()
|
||||||
{
|
{
|
||||||
this( BlockQuartzGlass.class );
|
super( Material.glass );
|
||||||
}
|
|
||||||
|
|
||||||
public BlockQuartzGlass( Class c )
|
|
||||||
{
|
|
||||||
super( c, Material.glass );
|
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
||||||
|
|
|
@ -39,7 +39,6 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
||||||
|
|
||||||
public BlockQuartzLamp()
|
public BlockQuartzLamp()
|
||||||
{
|
{
|
||||||
super( BlockQuartzLamp.class );
|
|
||||||
this.setLightLevel( 1.0f );
|
this.setLightLevel( 1.0f );
|
||||||
this.setBlockTextureName( "BlockQuartzGlass" );
|
this.setBlockTextureName( "BlockQuartzGlass" );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class BlockQuartzPillar extends AEBaseBlock implements IOrientableBlock
|
||||||
|
|
||||||
public BlockQuartzPillar()
|
public BlockQuartzPillar()
|
||||||
{
|
{
|
||||||
super( BlockQuartzPillar.class, Material.rock );
|
super( Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||||
|
|
||||||
public BlockSkyStone()
|
public BlockSkyStone()
|
||||||
{
|
{
|
||||||
super( BlockSkyStone.class, Material.rock );
|
super( Material.rock );
|
||||||
this.setHardness( 50 );
|
this.setHardness( 50 );
|
||||||
this.hasSubtypes = true;
|
this.hasSubtypes = true;
|
||||||
this.blockResistance = BLOCK_RESISTANCE;
|
this.blockResistance = BLOCK_RESISTANCE;
|
||||||
|
|
|
@ -47,12 +47,7 @@ public class OreQuartz extends AEBaseBlock
|
||||||
|
|
||||||
public OreQuartz()
|
public OreQuartz()
|
||||||
{
|
{
|
||||||
this( OreQuartz.class );
|
super( Material.rock );
|
||||||
}
|
|
||||||
|
|
||||||
public OreQuartz( Class<? extends OreQuartz> self )
|
|
||||||
{
|
|
||||||
super( self, Material.rock );
|
|
||||||
this.setHardness( 3.0F );
|
this.setHardness( 3.0F );
|
||||||
this.setResistance( 5.0F );
|
this.setResistance( 5.0F );
|
||||||
this.boostBrightnessLow = 0;
|
this.boostBrightnessLow = 0;
|
||||||
|
|
|
@ -42,7 +42,6 @@ public class OreQuartzCharged extends OreQuartz
|
||||||
|
|
||||||
public OreQuartzCharged()
|
public OreQuartzCharged()
|
||||||
{
|
{
|
||||||
super( OreQuartzCharged.class );
|
|
||||||
this.setBoostBrightnessLow( 2 );
|
this.setBoostBrightnessLow( 2 );
|
||||||
this.setBoostBrightnessHigh( 5 );
|
this.setBoostBrightnessHigh( 5 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||||
|
|
||||||
public BlockMatrixFrame()
|
public BlockMatrixFrame()
|
||||||
{
|
{
|
||||||
super( BlockMatrixFrame.class, Material.anvil );
|
super( Material.anvil );
|
||||||
this.setResistance( 6000000.0F );
|
this.setResistance( 6000000.0F );
|
||||||
this.setBlockUnbreakable();
|
this.setBlockUnbreakable();
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockSpatialIOPort extends AEBaseBlock
|
||||||
|
|
||||||
public BlockSpatialIOPort()
|
public BlockSpatialIOPort()
|
||||||
{
|
{
|
||||||
super( BlockSpatialIOPort.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileSpatialIOPort.class );
|
this.setTileEntity( TileSpatialIOPort.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class BlockSpatialPylon extends AEBaseBlock
|
||||||
|
|
||||||
public BlockSpatialPylon()
|
public BlockSpatialPylon()
|
||||||
{
|
{
|
||||||
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
this.setTileEntity( TileSpatialPylon.class );
|
this.setTileEntity( TileSpatialPylon.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class BlockChest extends AEBaseBlock
|
||||||
|
|
||||||
public BlockChest()
|
public BlockChest()
|
||||||
{
|
{
|
||||||
super( BlockChest.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileChest.class );
|
this.setTileEntity( TileChest.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
|
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class BlockDrive extends AEBaseBlock
|
||||||
|
|
||||||
public BlockDrive()
|
public BlockDrive()
|
||||||
{
|
{
|
||||||
super( BlockDrive.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileDrive.class );
|
this.setTileEntity( TileDrive.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
|
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockIOPort extends AEBaseBlock
|
||||||
|
|
||||||
public BlockIOPort()
|
public BlockIOPort()
|
||||||
{
|
{
|
||||||
super( BlockIOPort.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileIOPort.class );
|
this.setTileEntity( TileIOPort.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
|
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
||||||
|
|
||||||
public BlockSkyChest()
|
public BlockSkyChest()
|
||||||
{
|
{
|
||||||
super( BlockSkyChest.class, Material.rock );
|
super( Material.rock );
|
||||||
this.setTileEntity( TileSkyChest.class );
|
this.setTileEntity( TileSkyChest.class );
|
||||||
this.isOpaque = this.isFullSize = false;
|
this.isOpaque = this.isFullSize = false;
|
||||||
this.lightOpacity = 0;
|
this.lightOpacity = 0;
|
||||||
|
|
|
@ -21,10 +21,10 @@ package appeng.core.features;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import com.google.common.base.Optional;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
|
import com.google.common.base.Optional;
|
||||||
|
|
||||||
import appeng.api.definitions.ITileDefinition;
|
import appeng.api.definitions.ITileDefinition;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
|
@ -83,6 +83,11 @@ public final class AEBlockFeatureHandler implements IFeatureHandler
|
||||||
// Bypass the forge magic with null to register our own itemblock later.
|
// Bypass the forge magic with null to register our own itemblock later.
|
||||||
GameRegistry.registerBlock( this.featured, null, registryName );
|
GameRegistry.registerBlock( this.featured, null, registryName );
|
||||||
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
||||||
|
|
||||||
|
if( !this.featured.toString().equals( "BlockCableBus" ) )
|
||||||
|
{
|
||||||
|
GameRegistry.registerTileEntity( this.featured.getTileEntityClass(), this.featured.toString() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockChunkloader extends AEBaseBlock implements LoadingCallback
|
||||||
|
|
||||||
public BlockChunkloader()
|
public BlockChunkloader()
|
||||||
{
|
{
|
||||||
super( BlockChunkloader.class, Material.iron );
|
super( Material.iron );
|
||||||
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 ) );
|
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class BlockCubeGenerator extends AEBaseBlock
|
||||||
|
|
||||||
public BlockCubeGenerator()
|
public BlockCubeGenerator()
|
||||||
{
|
{
|
||||||
super( BlockCubeGenerator.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileCubeGenerator.class );
|
this.setTileEntity( TileCubeGenerator.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,6 @@ public class BlockCubeGenerator extends AEBaseBlock
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
|
|
||||||
TileCubeGenerator tcg = this.getTileEntity( w, x, y, z );
|
TileCubeGenerator tcg = this.getTileEntity( w, x, y, z );
|
||||||
if( tcg != null )
|
if( tcg != null )
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class BlockItemGen extends AEBaseBlock
|
||||||
|
|
||||||
public BlockItemGen()
|
public BlockItemGen()
|
||||||
{
|
{
|
||||||
super( BlockItemGen.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TileItemGen.class );
|
this.setTileEntity( TileItemGen.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class BlockPhantomNode extends AEBaseBlock
|
||||||
|
|
||||||
public BlockPhantomNode()
|
public BlockPhantomNode()
|
||||||
{
|
{
|
||||||
super( BlockPhantomNode.class, Material.iron );
|
super( Material.iron );
|
||||||
this.setTileEntity( TilePhantomNode.class );
|
this.setTileEntity( TilePhantomNode.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package appeng.fmp;
|
package appeng.fmp;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
||||||
import codechicken.multipart.TMultiPart;
|
import codechicken.multipart.TMultiPart;
|
||||||
|
@ -31,7 +33,8 @@ import appeng.core.Api;
|
||||||
|
|
||||||
public enum PartRegistry
|
public enum PartRegistry
|
||||||
{
|
{
|
||||||
QuartzTorchPart( "ae2_torch", BlockQuartzTorch.class, QuartzTorchPart.class ), CableBusPart( "ae2_cablebus", BlockCableBus.class, CableBusPart.class );
|
QuartzTorchPart( "ae2_torch", BlockQuartzTorch.class, QuartzTorchPart.class ),
|
||||||
|
CableBusPart( "ae2_cablebus", BlockCableBus.class, CableBusPart.class );
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Class<? extends AEBaseBlock> blk;
|
private final Class<? extends AEBaseBlock> blk;
|
||||||
|
@ -44,20 +47,7 @@ public enum PartRegistry
|
||||||
this.part = part;
|
this.part = part;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPartName( TMultiPart part )
|
@Nullable
|
||||||
{
|
|
||||||
Class c = part.getClass();
|
|
||||||
for( PartRegistry pr : values() )
|
|
||||||
{
|
|
||||||
if( pr.equals( c ) )
|
|
||||||
{
|
|
||||||
return pr.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new IllegalStateException( "Invalid PartName" );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static TMultiPart getPartByBlock( Block block, int meta )
|
public static TMultiPart getPartByBlock( Block block, int meta )
|
||||||
{
|
{
|
||||||
for( PartRegistry pr : values() )
|
for( PartRegistry pr : values() )
|
||||||
|
@ -89,18 +79,6 @@ public enum PartRegistry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPart( Block block )
|
|
||||||
{
|
|
||||||
for( PartRegistry pr : values() )
|
|
||||||
{
|
|
||||||
if( pr.blk.isInstance( block ) )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return this.name;
|
return this.name;
|
||||||
|
|
|
@ -50,14 +50,12 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||||
|
|
||||||
private AESharedNBT( Item itemID, int damageValue )
|
private AESharedNBT( Item itemID, int damageValue )
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
this.item = itemID;
|
this.item = itemID;
|
||||||
this.meta = damageValue;
|
this.meta = damageValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AESharedNBT( int fakeValue )
|
public AESharedNBT( int fakeValue )
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
this.item = null;
|
this.item = null;
|
||||||
this.meta = 0;
|
this.meta = 0;
|
||||||
this.hash = fakeValue;
|
this.hash = fakeValue;
|
||||||
|
|
Loading…
Reference in a new issue