Applied-Energistics-2-tiler.../items/parts/PartType.java

132 lines
4.2 KiB
Java
Raw Normal View History

package appeng.items.parts;
import java.util.EnumSet;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
import appeng.core.features.AEFeature;
2014-01-31 18:32:30 +01:00
import appeng.core.localization.GuiText;
2014-02-14 05:27:15 +01:00
import appeng.parts.automation.PartAnnihilationPlane;
import appeng.parts.automation.PartExportBus;
2014-02-18 06:51:31 +01:00
import appeng.parts.automation.PartFormationPlane;
import appeng.parts.automation.PartImportBus;
import appeng.parts.automation.PartLevelEmitter;
import appeng.parts.misc.PartCableAnchor;
import appeng.parts.misc.PartInterface;
import appeng.parts.misc.PartInvertedToggleBus;
import appeng.parts.misc.PartStorageBus;
import appeng.parts.misc.PartToggleBus;
import appeng.parts.networking.PartCableCovered;
import appeng.parts.networking.PartCableGlass;
import appeng.parts.networking.PartCableSmart;
2014-01-20 17:41:37 +01:00
import appeng.parts.networking.PartDenseCable;
import appeng.parts.networking.PartQuartzFiber;
2014-02-18 04:41:19 +01:00
import appeng.parts.p2p.PartP2PBCPower;
import appeng.parts.p2p.PartP2PIC2Power;
2014-01-20 17:41:37 +01:00
import appeng.parts.p2p.PartP2PItems;
import appeng.parts.p2p.PartP2PLiquids;
import appeng.parts.p2p.PartP2PRedstone;
import appeng.parts.p2p.PartP2PTunnelME;
import appeng.parts.reporting.PartConversionMonitor;
import appeng.parts.reporting.PartCraftingTerminal;
import appeng.parts.reporting.PartDarkMonitor;
import appeng.parts.reporting.PartMonitor;
import appeng.parts.reporting.PartPatternTerminal;
import appeng.parts.reporting.PartSemiDarkMonitor;
import appeng.parts.reporting.PartStorageMonitor;
import appeng.parts.reporting.PartTerminal;
public enum PartType
{
ToggleBus(AEFeature.Core, PartToggleBus.class),
InvertedToggleBus(AEFeature.Core, PartInvertedToggleBus.class),
CableSmart(AEFeature.Core, PartCableSmart.class), CableCovered(AEFeature.Core, PartCableCovered.class), CableGlass(AEFeature.Core, PartCableGlass.class),
2014-01-20 17:41:37 +01:00
CableDense(AEFeature.DenseCables, PartDenseCable.class),
CableAnchor(AEFeature.Core, PartCableAnchor.class),
QuartzFiber(AEFeature.Core, PartQuartzFiber.class),
2014-02-18 03:56:17 +01:00
Monitor(AEFeature.Core, PartMonitor.class),
SemiDarkMonitor(AEFeature.Core, PartSemiDarkMonitor.class),
DarkMonitor(AEFeature.Core, PartDarkMonitor.class),
StorageBus(AEFeature.StorageBus, PartStorageBus.class),
ImportBus(AEFeature.ImportBus, PartImportBus.class),
ExportBus(AEFeature.ExportBus, PartExportBus.class),
LevelEmitter(AEFeature.LevelEmiter, PartLevelEmitter.class),
2014-02-14 05:27:15 +01:00
AnnihilationPlane(AEFeature.AnnihilationPlane, PartAnnihilationPlane.class),
2014-02-18 06:51:31 +01:00
FormationPlane(AEFeature.FormationPlane, PartFormationPlane.class),
2014-01-31 18:32:30 +01:00
P2PTunnelME(AEFeature.P2PTunnelME, PartP2PTunnelME.class, GuiText.METunnel),
2014-01-20 17:41:37 +01:00
2014-01-31 18:32:30 +01:00
P2PTunnelRedstone(AEFeature.P2PTunnelRedstone, PartP2PRedstone.class, GuiText.RedstoneTunnel),
2014-01-20 17:41:37 +01:00
2014-01-31 18:32:30 +01:00
P2PTunnelItems(AEFeature.P2PTunnelItems, PartP2PItems.class, GuiText.ItemTunnel),
2014-01-20 17:41:37 +01:00
2014-01-31 18:32:30 +01:00
P2PTunnelLiquids(AEFeature.P2PTunnelLiquids, PartP2PLiquids.class, GuiText.FluidTunnel),
2014-01-20 17:41:37 +01:00
2014-02-18 04:41:19 +01:00
P2PTunnelMJ(AEFeature.P2PTunnelMJ, PartP2PBCPower.class, GuiText.MJTunnel),
2014-01-20 17:41:37 +01:00
P2PTunnelEU(AEFeature.P2PTunnelEU, PartP2PIC2Power.class, GuiText.EUTunnel),
// CraftingMonitor(AEFeature.Crafting, PartCraftingMonitor.class),
PatternTerminal(AEFeature.CraftingTerminal, PartPatternTerminal.class),
CraftingTerminal(AEFeature.CraftingTerminal, PartCraftingTerminal.class),
Terminal(AEFeature.Core, PartTerminal.class),
StorageMonitor(AEFeature.StorageMonitor, PartStorageMonitor.class),
ConversionMonitor(AEFeature.PartConversionMonitor, PartConversionMonitor.class),
Interface(AEFeature.Core, PartInterface.class);
2014-01-31 18:32:30 +01:00
private final EnumSet<AEFeature> features;
private final Class<? extends IPart> myPart;
private final GuiText extraName;
PartType(AEFeature part, Class<? extends IPart> c) {
2014-01-31 18:32:30 +01:00
this( part, c, null );
}
PartType(AEFeature part, Class<? extends IPart> c, GuiText en) {
features = EnumSet.of( part );
myPart = c;
2014-01-31 18:32:30 +01:00
extraName = en;
}
public Enum[] getVarients()
{
2014-01-20 17:41:37 +01:00
return (this == CableSmart || this == CableCovered || this == CableGlass || this == CableDense) ? AEColor.values() : null;
}
public EnumSet<AEFeature> getFeature()
{
return features;
}
public Class<? extends IPart> getPart()
{
return myPart;
}
2014-01-31 18:32:30 +01:00
public GuiText getExtraName()
{
return extraName;
}
}