2013-12-27 23:59:59 +01:00
|
|
|
package appeng.items.materials;
|
|
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
|
|
|
|
import net.minecraft.entity.Entity;
|
2014-02-25 04:55:09 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
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.core.AppEng;
|
|
|
|
import appeng.core.features.AEFeature;
|
|
|
|
import appeng.entity.EntityChargedQuartz;
|
2014-02-23 02:28:52 +01:00
|
|
|
import appeng.entity.EntityIds;
|
2013-12-27 23:59:59 +01:00
|
|
|
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-06-04 07:07:36 +02:00
|
|
|
InvalidType(-1, AEFeature.Core),
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CertusQuartzCrystal(0, AEFeature.Core, "crystalCertusQuartz"), CertusQuartzCrystalCharged(1, AEFeature.Core, EntityChargedQuartz.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CertusQuartzDust(2, AEFeature.Core, "dustCertusQuartz"), NetherQuartzDust(3, AEFeature.Core, "dustNetherQuartz"), Flour(4, AEFeature.Flour, "dustWheat"), GoldDust(
|
|
|
|
51, AEFeature.Core, "dustGold"), IronDust(49, AEFeature.Core, "dustIron"), IronNugget(50, AEFeature.Core, "nuggetIron"),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
Silicon(5, AEFeature.Core, "itemSilicon"), MatterBall(6),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
FluixCrystal(7, AEFeature.Core, "crystalFluix"), FluixDust(8, AEFeature.Core, "dustFluix"), FluixPearl(9, AEFeature.Core, "pearlFluix"),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
PureifiedCertusQuartzCrystal(10), PureifiedNetherQuartzCrystal(11), PureifiedFluixCrystal(12),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CalcProcessorPress(13), EngProcessorPress(14), LogicProcessorPress(15),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CalcProcessorPrint(16), EngProcessorPrint(17), LogicProcessorPrint(18),
|
2014-02-26 05:34:05 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
SiliconPress(19), SiliconPrint(20),
|
2014-02-26 05:34:05 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
NamePress(21),
|
2014-02-26 05:34:05 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
LogicProcessor(22), CalcProcessor(23), EngProcessor(24),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
// Basic Cards
|
2014-05-06 07:16:29 +02:00
|
|
|
BasicCard(25), CardRedstone(26), CardCapacity(27),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
// Adv Cards
|
2014-05-06 07:16:29 +02:00
|
|
|
AdvCard(28), CardFuzzy(29), CardSpeed(30), CardInverter(31),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
Cell2SpatialPart(32, AEFeature.SpatialIO), Cell16SpatialPart(33, AEFeature.SpatialIO), Cell128SpatialPart(34, AEFeature.SpatialIO),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
Cell1kPart(35, AEFeature.StorageCells), Cell4kPart(36, AEFeature.StorageCells), Cell16kPart(37, AEFeature.StorageCells), Cell64kPart(38,
|
|
|
|
AEFeature.StorageCells), EmptyStorageCell(39, AEFeature.StorageCells),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 19:08:48 +02:00
|
|
|
WoodenGear(40, AEFeature.GrindStone, "gearWood"),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
Wireless(41, AEFeature.WirelessAccessTerminal), WirelessBooster(42, AEFeature.WirelessAccessTerminal),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
FormationCore(43), AnnihilationCore(44),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
SkyDust(45, AEFeature.Core),
|
2014-03-04 08:52:07 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
EnderDust(46, AEFeature.QuantumNetworkBridge, "dustEnder", EntitySingularity.class), Singularity(47, AEFeature.QuantumNetworkBridge,
|
|
|
|
EntitySingularity.class), QESingularity(48, 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-05-06 07:16:29 +02:00
|
|
|
final public int damageValue;
|
|
|
|
private boolean isRegistered = false;
|
2014-01-01 10:01:38 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
MaterialType(int metaValue) {
|
|
|
|
damageValue = metaValue;
|
2013-12-27 23:59:59 +01:00
|
|
|
features = EnumSet.of( AEFeature.Core );
|
|
|
|
}
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
MaterialType(int metaValue, AEFeature part) {
|
|
|
|
damageValue = metaValue;
|
2013-12-27 23:59:59 +01:00
|
|
|
features = EnumSet.of( part );
|
|
|
|
}
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
MaterialType(int metaValue, AEFeature part, Class<? extends Entity> c) {
|
2013-12-27 23:59:59 +01:00
|
|
|
features = EnumSet.of( part );
|
2014-05-06 07:16:29 +02:00
|
|
|
damageValue = metaValue;
|
2013-12-27 23:59:59 +01:00
|
|
|
droppedEntity = c;
|
|
|
|
|
|
|
|
EntityRegistry.registerModEntity( droppedEntity, droppedEntity.getSimpleName(), EntityIds.get( droppedEntity ), AppEng.instance, 16, 4, true );
|
|
|
|
}
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
MaterialType(int metaValue, AEFeature part, String oreDictionary, Class<? extends Entity> c) {
|
2014-01-20 17:41:37 +01:00
|
|
|
features = EnumSet.of( part );
|
2014-05-06 07:16:29 +02:00
|
|
|
damageValue = metaValue;
|
2014-01-20 17:41:37 +01:00
|
|
|
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 );
|
|
|
|
}
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
MaterialType(int metaValue, AEFeature part, String oreDictionary) {
|
2013-12-27 23:59:59 +01:00
|
|
|
features = EnumSet.of( part );
|
2014-05-06 07:16:29 +02:00
|
|
|
damageValue = metaValue;
|
2013-12-27 23:59:59 +01:00
|
|
|
oreName = oreDictionary;
|
|
|
|
if ( OreDictionary.getOres( oreDictionary ).size() > 0 )
|
|
|
|
features.add( AEFeature.DuplicateItems );
|
|
|
|
}
|
|
|
|
|
2014-02-25 04:55:09 +01:00
|
|
|
public ItemStack stack(int size)
|
|
|
|
{
|
2014-05-06 07:16:29 +02:00
|
|
|
return new ItemStack( ItemMultiMaterial.instance, size, damageValue );
|
2014-02-25 04:55:09 +01:00
|
|
|
}
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
public EnumSet<AEFeature> getFeature()
|
|
|
|
{
|
|
|
|
return features;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getOreName()
|
|
|
|
{
|
|
|
|
return oreName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean hasCustomEntity()
|
|
|
|
{
|
|
|
|
return droppedEntity != null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Class<? extends Entity> getCustomEntityClass()
|
|
|
|
{
|
|
|
|
return droppedEntity;
|
|
|
|
}
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
public boolean isRegistered()
|
|
|
|
{
|
|
|
|
return isRegistered;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void markReady()
|
|
|
|
{
|
|
|
|
isRegistered = true;
|
|
|
|
}
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|