2013-12-27 23:59:59 +01:00
|
|
|
package appeng.items.materials;
|
|
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
|
|
|
|
import net.minecraft.entity.Entity;
|
2014-02-09 02:34:52 +01:00
|
|
|
import net.minecraft.util.IIcon;
|
2013-12-27 23:59:59 +01:00
|
|
|
import net.minecraftforge.oredict.OreDictionary;
|
|
|
|
import appeng.client.render.entity.EntityIds;
|
|
|
|
import appeng.core.AppEng;
|
|
|
|
import appeng.core.features.AEFeature;
|
|
|
|
import appeng.entity.EntityChargedQuartz;
|
|
|
|
import appeng.entity.EntitySingularity;
|
|
|
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
2014-01-01 10:01:38 +01:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
public enum MaterialType
|
|
|
|
{
|
2014-01-30 03:47:55 +01:00
|
|
|
CertusQuartzCrystal(AEFeature.Core, "crystalCertusQuartz"), CertusQuartzCrystalCharged(AEFeature.Core, EntityChargedQuartz.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-01-30 03:47:55 +01:00
|
|
|
CertusQuartzDust(AEFeature.Core, "dustCertusQuartz"), NetherQuartzDust(AEFeature.Core, "dustNetherQuartz"), Flour(AEFeature.Flour, "dustWheat"), GoldDust(
|
|
|
|
AEFeature.Core, "dustGold"), IronDust(AEFeature.Core, "dustIron"), IronNugget(AEFeature.Core, "nuggetIron"),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
Silicon(AEFeature.Core, "itemSilicon"), MatterBall,
|
|
|
|
|
2014-01-30 03:47:55 +01:00
|
|
|
FluixCrystal(AEFeature.Core, "crystalFluix"), FluixDust(AEFeature.Core, "dustFluix"), FluixPearl(AEFeature.Core, "pearlFluix"),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
PureifiedCertusQuartzCrystal, PureifiedNetherQuartzCrystal, PureifiedFluixCrystal,
|
|
|
|
|
|
|
|
LogicProcessorAsm(AEFeature.QuartzKnife), LogicProcessor,
|
|
|
|
|
|
|
|
CalcProcessor, EngProcessor,
|
|
|
|
|
|
|
|
// Basic Cards
|
|
|
|
BasicCard, CardRedstone, CardCapacity,
|
|
|
|
|
|
|
|
// Adv Cards
|
2014-01-20 17:41:37 +01:00
|
|
|
AdvCard, CardFuzzy, CardSpeed, CardInverter,
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
Cell2SpatialPart(AEFeature.SpatialIO), Cell16SpatialPart(AEFeature.SpatialIO), Cell128SpatialPart(AEFeature.SpatialIO),
|
|
|
|
|
|
|
|
Cell1kPart(AEFeature.StorageCells), Cell4kPart(AEFeature.StorageCells), Cell16kPart(AEFeature.StorageCells), Cell64kPart(AEFeature.StorageCells), EmptyStorageCell(
|
|
|
|
AEFeature.StorageCells),
|
|
|
|
|
|
|
|
WoodenGear(AEFeature.GrindStone, "gearWood"),
|
|
|
|
|
|
|
|
Wireless(AEFeature.WirelessAccessTerminal), WirelessBooster(AEFeature.WirelessAccessTerminal),
|
|
|
|
|
|
|
|
BlankPattern, FormationCore, AnnihilationCore,
|
|
|
|
|
2014-01-20 17:41:37 +01:00
|
|
|
EnderDust(AEFeature.QuantumNetworkBridge, "dustEnder", EntitySingularity.class), Singularity(AEFeature.QuantumNetworkBridge, EntitySingularity.class), QESingularity(
|
|
|
|
AEFeature.QuantumNetworkBridge, EntitySingularity.class);
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
private String oreName;
|
|
|
|
private EnumSet<AEFeature> features;
|
|
|
|
private Class<? extends Entity> droppedEntity;
|
|
|
|
|
2014-02-09 02:34:52 +01:00
|
|
|
// IIcon for the material.
|
2014-01-01 10:01:38 +01:00
|
|
|
@SideOnly(Side.CLIENT)
|
2014-02-09 02:34:52 +01:00
|
|
|
public IIcon IIcon;
|
2014-01-01 10:01:38 +01:00
|
|
|
public int damageValue = -1;
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
MaterialType() {
|
|
|
|
features = EnumSet.of( AEFeature.Core );
|
|
|
|
}
|
|
|
|
|
|
|
|
MaterialType(AEFeature part) {
|
|
|
|
features = EnumSet.of( part );
|
|
|
|
}
|
|
|
|
|
|
|
|
MaterialType(AEFeature part, Class<? extends Entity> c) {
|
|
|
|
features = EnumSet.of( part );
|
|
|
|
droppedEntity = c;
|
|
|
|
|
|
|
|
EntityRegistry.registerModEntity( droppedEntity, droppedEntity.getSimpleName(), EntityIds.get( droppedEntity ), AppEng.instance, 16, 4, true );
|
|
|
|
}
|
|
|
|
|
2014-01-20 17:41:37 +01:00
|
|
|
MaterialType(AEFeature part, String oreDictionary, Class<? extends Entity> c) {
|
|
|
|
features = EnumSet.of( part );
|
|
|
|
oreName = oreDictionary;
|
|
|
|
if ( OreDictionary.getOres( oreDictionary ).size() > 0 )
|
|
|
|
features.add( AEFeature.DuplicateItems );
|
|
|
|
|
|
|
|
droppedEntity = c;
|
|
|
|
EntityRegistry.registerModEntity( droppedEntity, droppedEntity.getSimpleName(), EntityIds.get( droppedEntity ), AppEng.instance, 16, 4, true );
|
|
|
|
}
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
MaterialType(AEFeature part, String oreDictionary) {
|
|
|
|
features = EnumSet.of( part );
|
|
|
|
oreName = oreDictionary;
|
|
|
|
if ( OreDictionary.getOres( oreDictionary ).size() > 0 )
|
|
|
|
features.add( AEFeature.DuplicateItems );
|
|
|
|
}
|
|
|
|
|
|
|
|
public EnumSet<AEFeature> getFeature()
|
|
|
|
{
|
|
|
|
return features;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getOreName()
|
|
|
|
{
|
|
|
|
return oreName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean hasCustomEntity()
|
|
|
|
{
|
|
|
|
return droppedEntity != null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Class<? extends Entity> getCustomEntityClass()
|
|
|
|
{
|
|
|
|
return droppedEntity;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|