Merge pull request #4442 from AppliedEnergistics/cleanups
Reduce Importance of PartType and Fix Upgrade Card Tooltip Grouping
This commit is contained in:
@@ -31,6 +31,7 @@ import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.particles.ParticleType;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
@@ -91,6 +92,7 @@ import appeng.core.features.registries.PartModels;
|
||||
import appeng.core.features.registries.cell.BasicCellHandler;
|
||||
import appeng.core.features.registries.cell.BasicItemCellGuiHandler;
|
||||
import appeng.core.features.registries.cell.CreativeCellHandler;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.stats.AdvancementTriggers;
|
||||
import appeng.core.stats.AeStats;
|
||||
import appeng.fluids.client.gui.*;
|
||||
@@ -379,12 +381,19 @@ final class Registration {
|
||||
final IBlocks blocks = definitions.blocks();
|
||||
final IItems items = definitions.items();
|
||||
|
||||
// Block and part interface have different translation keys, but support the
|
||||
// same upgrades
|
||||
ITextComponent interfaceGroup = parts.iface().asItem().getName();
|
||||
ITextComponent itemIoBusGroup = GuiText.IOBuses.textComponent();
|
||||
ITextComponent fluidIoBusGroup = GuiText.IOBusesFluids.textComponent();
|
||||
ITextComponent storageCellGroup = GuiText.IOBusesFluids.textComponent();
|
||||
|
||||
// default settings..
|
||||
((P2PTunnelRegistry) registries.p2pTunnel()).configure();
|
||||
|
||||
// Interface
|
||||
Upgrades.CRAFTING.registerItem(parts.iface(), 1);
|
||||
Upgrades.CRAFTING.registerItem(blocks.iface(), 1);
|
||||
Upgrades.CRAFTING.registerItem(parts.iface(), 1, interfaceGroup);
|
||||
Upgrades.CRAFTING.registerItem(blocks.iface(), 1, interfaceGroup);
|
||||
|
||||
// IO Port!
|
||||
Upgrades.SPEED.registerItem(blocks.iOPort(), 3);
|
||||
@@ -395,43 +404,43 @@ final class Registration {
|
||||
Upgrades.CRAFTING.registerItem(parts.levelEmitter(), 1);
|
||||
|
||||
// Import Bus
|
||||
Upgrades.FUZZY.registerItem(parts.importBus(), 1);
|
||||
Upgrades.REDSTONE.registerItem(parts.importBus(), 1);
|
||||
Upgrades.CAPACITY.registerItem(parts.importBus(), 2);
|
||||
Upgrades.SPEED.registerItem(parts.importBus(), 4);
|
||||
Upgrades.FUZZY.registerItem(parts.importBus(), 1, itemIoBusGroup);
|
||||
Upgrades.REDSTONE.registerItem(parts.importBus(), 1, itemIoBusGroup);
|
||||
Upgrades.CAPACITY.registerItem(parts.importBus(), 2, itemIoBusGroup);
|
||||
Upgrades.SPEED.registerItem(parts.importBus(), 4, itemIoBusGroup);
|
||||
|
||||
// Fluid Import Bus
|
||||
Upgrades.CAPACITY.registerItem(parts.fluidImportBus(), 2);
|
||||
Upgrades.REDSTONE.registerItem(parts.fluidImportBus(), 1);
|
||||
Upgrades.SPEED.registerItem(parts.fluidImportBus(), 4);
|
||||
Upgrades.CAPACITY.registerItem(parts.fluidImportBus(), 2, fluidIoBusGroup);
|
||||
Upgrades.REDSTONE.registerItem(parts.fluidImportBus(), 1, fluidIoBusGroup);
|
||||
Upgrades.SPEED.registerItem(parts.fluidImportBus(), 4, fluidIoBusGroup);
|
||||
|
||||
// Export Bus
|
||||
Upgrades.FUZZY.registerItem(parts.exportBus(), 1);
|
||||
Upgrades.REDSTONE.registerItem(parts.exportBus(), 1);
|
||||
Upgrades.CAPACITY.registerItem(parts.exportBus(), 2);
|
||||
Upgrades.SPEED.registerItem(parts.exportBus(), 4);
|
||||
Upgrades.CRAFTING.registerItem(parts.exportBus(), 1);
|
||||
Upgrades.FUZZY.registerItem(parts.exportBus(), 1, itemIoBusGroup);
|
||||
Upgrades.REDSTONE.registerItem(parts.exportBus(), 1, itemIoBusGroup);
|
||||
Upgrades.CAPACITY.registerItem(parts.exportBus(), 2, itemIoBusGroup);
|
||||
Upgrades.SPEED.registerItem(parts.exportBus(), 4, itemIoBusGroup);
|
||||
Upgrades.CRAFTING.registerItem(parts.exportBus(), 1, itemIoBusGroup);
|
||||
|
||||
// Fluid Export Bus
|
||||
Upgrades.CAPACITY.registerItem(parts.fluidExportBus(), 2);
|
||||
Upgrades.REDSTONE.registerItem(parts.fluidExportBus(), 1);
|
||||
Upgrades.SPEED.registerItem(parts.fluidExportBus(), 4);
|
||||
Upgrades.CAPACITY.registerItem(parts.fluidExportBus(), 2, fluidIoBusGroup);
|
||||
Upgrades.REDSTONE.registerItem(parts.fluidExportBus(), 1, fluidIoBusGroup);
|
||||
Upgrades.SPEED.registerItem(parts.fluidExportBus(), 4, fluidIoBusGroup);
|
||||
|
||||
// Storage Cells
|
||||
Upgrades.FUZZY.registerItem(items.cell1k(), 1);
|
||||
Upgrades.INVERTER.registerItem(items.cell1k(), 1);
|
||||
Upgrades.FUZZY.registerItem(items.cell1k(), 1, storageCellGroup);
|
||||
Upgrades.INVERTER.registerItem(items.cell1k(), 1, storageCellGroup);
|
||||
|
||||
Upgrades.FUZZY.registerItem(items.cell4k(), 1);
|
||||
Upgrades.INVERTER.registerItem(items.cell4k(), 1);
|
||||
Upgrades.FUZZY.registerItem(items.cell4k(), 1, storageCellGroup);
|
||||
Upgrades.INVERTER.registerItem(items.cell4k(), 1, storageCellGroup);
|
||||
|
||||
Upgrades.FUZZY.registerItem(items.cell16k(), 1);
|
||||
Upgrades.INVERTER.registerItem(items.cell16k(), 1);
|
||||
Upgrades.FUZZY.registerItem(items.cell16k(), 1, storageCellGroup);
|
||||
Upgrades.INVERTER.registerItem(items.cell16k(), 1, storageCellGroup);
|
||||
|
||||
Upgrades.FUZZY.registerItem(items.cell64k(), 1);
|
||||
Upgrades.INVERTER.registerItem(items.cell64k(), 1);
|
||||
Upgrades.FUZZY.registerItem(items.cell64k(), 1, storageCellGroup);
|
||||
Upgrades.INVERTER.registerItem(items.cell64k(), 1, storageCellGroup);
|
||||
|
||||
Upgrades.FUZZY.registerItem(items.portableCell(), 1);
|
||||
Upgrades.INVERTER.registerItem(items.portableCell(), 1);
|
||||
Upgrades.FUZZY.registerItem(items.portableCell(), 1, storageCellGroup);
|
||||
Upgrades.INVERTER.registerItem(items.portableCell(), 1, storageCellGroup);
|
||||
|
||||
Upgrades.FUZZY.registerItem(items.viewCell(), 1);
|
||||
Upgrades.INVERTER.registerItem(items.viewCell(), 1);
|
||||
|
||||
@@ -46,7 +46,6 @@ import appeng.fluids.parts.FluidTerminalPart;
|
||||
import appeng.items.parts.ColoredPartItem;
|
||||
import appeng.items.parts.PartItem;
|
||||
import appeng.items.parts.PartItemRendering;
|
||||
import appeng.items.parts.PartType;
|
||||
import appeng.parts.automation.AnnihilationPlanePart;
|
||||
import appeng.parts.automation.ExportBusPart;
|
||||
import appeng.parts.automation.FormationPlanePart;
|
||||
@@ -129,73 +128,50 @@ public final class ApiParts implements IParts {
|
||||
public ApiParts(FeatureFactory registry, PartModels partModels) {
|
||||
registerPartModels(partModels);
|
||||
|
||||
this.cableSmart = constructColoredDefinition(registry, "smart_cable", PartType.CABLE_SMART,
|
||||
SmartCablePart::new);
|
||||
this.cableCovered = constructColoredDefinition(registry, "covered_cable", PartType.CABLE_COVERED,
|
||||
CoveredCablePart::new);
|
||||
this.cableGlass = constructColoredDefinition(registry, "glass_cable", PartType.CABLE_GLASS,
|
||||
GlassCablePart::new);
|
||||
this.cableSmart = constructColoredDefinition(registry, "smart_cable", SmartCablePart::new);
|
||||
this.cableCovered = constructColoredDefinition(registry, "covered_cable", CoveredCablePart::new);
|
||||
this.cableGlass = constructColoredDefinition(registry, "glass_cable", GlassCablePart::new);
|
||||
this.cableDenseCovered = constructColoredDefinition(registry, "covered_dense_cable",
|
||||
PartType.CABLE_DENSE_COVERED, CoveredDenseCablePart::new);
|
||||
this.cableDenseSmart = constructColoredDefinition(registry, "smart_dense_cable", PartType.CABLE_DENSE_SMART,
|
||||
SmartDenseCablePart::new);
|
||||
this.quartzFiber = createPart(registry, "quartz_fiber", PartType.QUARTZ_FIBER, QuartzFiberPart::new);
|
||||
this.toggleBus = createPart(registry, "toggle_bus", PartType.TOGGLE_BUS, ToggleBusPart::new);
|
||||
this.invertedToggleBus = createPart(registry, "inverted_toggle_bus", PartType.INVERTED_TOGGLE_BUS,
|
||||
InvertedToggleBusPart::new);
|
||||
this.cableAnchor = createPart(registry, "cable_anchor", PartType.CABLE_ANCHOR, CableAnchorPart::new);
|
||||
this.monitor = createPart(registry, "monitor", PartType.MONITOR, PanelPart::new);
|
||||
this.semiDarkMonitor = createPart(registry, "semi_dark_monitor", PartType.SEMI_DARK_MONITOR,
|
||||
SemiDarkPanelPart::new);
|
||||
this.darkMonitor = createPart(registry, "dark_monitor", PartType.DARK_MONITOR, DarkPanelPart::new);
|
||||
this.storageBus = createPart(registry, "storage_bus", PartType.STORAGE_BUS, StorageBusPart::new);
|
||||
this.fluidStorageBus = createPart(registry, "fluid_storage_bus", PartType.FLUID_STORAGE_BUS,
|
||||
FluidStorageBusPart::new);
|
||||
this.importBus = createPart(registry, "import_bus", PartType.IMPORT_BUS, ImportBusPart::new);
|
||||
this.fluidImportBus = createPart(registry, "fluid_import_bus", PartType.FLUID_IMPORT_BUS,
|
||||
FluidImportBusPart::new);
|
||||
this.exportBus = createPart(registry, "export_bus", PartType.EXPORT_BUS, ExportBusPart::new);
|
||||
this.fluidExportBus = createPart(registry, "fluid_export_bus", PartType.FLUID_EXPORT_BUS,
|
||||
FluidExportBusPart::new);
|
||||
this.levelEmitter = createPart(registry, "level_emitter", PartType.LEVEL_EMITTER, LevelEmitterPart::new);
|
||||
this.fluidLevelEmitter = createPart(registry, "fluid_level_emitter", PartType.FLUID_LEVEL_EMITTER,
|
||||
FluidLevelEmitterPart::new);
|
||||
this.annihilationPlane = createPart(registry, "annihilation_plane", PartType.ANNIHILATION_PLANE,
|
||||
AnnihilationPlanePart::new);
|
||||
CoveredDenseCablePart::new);
|
||||
this.cableDenseSmart = constructColoredDefinition(registry, "smart_dense_cable", SmartDenseCablePart::new);
|
||||
this.quartzFiber = createPart(registry, "quartz_fiber", QuartzFiberPart::new);
|
||||
this.toggleBus = createPart(registry, "toggle_bus", ToggleBusPart::new);
|
||||
this.invertedToggleBus = createPart(registry, "inverted_toggle_bus", InvertedToggleBusPart::new);
|
||||
this.cableAnchor = createPart(registry, "cable_anchor", CableAnchorPart::new);
|
||||
this.monitor = createPart(registry, "monitor", PanelPart::new);
|
||||
this.semiDarkMonitor = createPart(registry, "semi_dark_monitor", SemiDarkPanelPart::new);
|
||||
this.darkMonitor = createPart(registry, "dark_monitor", DarkPanelPart::new);
|
||||
this.storageBus = createPart(registry, "storage_bus", StorageBusPart::new);
|
||||
this.fluidStorageBus = createPart(registry, "fluid_storage_bus", FluidStorageBusPart::new);
|
||||
this.importBus = createPart(registry, "import_bus", ImportBusPart::new);
|
||||
this.fluidImportBus = createPart(registry, "fluid_import_bus", FluidImportBusPart::new);
|
||||
this.exportBus = createPart(registry, "export_bus", ExportBusPart::new);
|
||||
this.fluidExportBus = createPart(registry, "fluid_export_bus", FluidExportBusPart::new);
|
||||
this.levelEmitter = createPart(registry, "level_emitter", LevelEmitterPart::new);
|
||||
this.fluidLevelEmitter = createPart(registry, "fluid_level_emitter", FluidLevelEmitterPart::new);
|
||||
this.annihilationPlane = createPart(registry, "annihilation_plane", AnnihilationPlanePart::new);
|
||||
this.identityAnnihilationPlane = createPart(registry, "identity_annihilation_plane",
|
||||
PartType.IDENTITY_ANNIHILATION_PLANE, IdentityAnnihilationPlanePart::new);
|
||||
this.fluidAnnihilationPlane = createPart(registry, "fluid_annihilation_plane",
|
||||
PartType.FLUID_ANNIHILATION_PLANE, FluidAnnihilationPlanePart::new);
|
||||
this.formationPlane = createPart(registry, "formation_plane", PartType.FORMATION_PLANE,
|
||||
FormationPlanePart::new);
|
||||
this.fluidFormationPlane = createPart(registry, "fluid_formation_plane", PartType.FLUID_FORMATION_PLANE,
|
||||
FluidFormationPlanePart::new);
|
||||
this.patternTerminal = createPart(registry, "pattern_terminal", PartType.PATTERN_TERMINAL,
|
||||
PatternTerminalPart::new);
|
||||
this.craftingTerminal = createPart(registry, "crafting_terminal", PartType.CRAFTING_TERMINAL,
|
||||
CraftingTerminalPart::new);
|
||||
this.terminal = createPart(registry, "terminal", PartType.TERMINAL, TerminalPart::new);
|
||||
this.storageMonitor = createPart(registry, "storage_monitor", PartType.STORAGE_MONITOR,
|
||||
StorageMonitorPart::new);
|
||||
this.conversionMonitor = createPart(registry, "conversion_monitor", PartType.CONVERSION_MONITOR,
|
||||
ConversionMonitorPart::new);
|
||||
this.iface = createPart(registry, "cable_interface", PartType.INTERFACE, InterfacePart::new);
|
||||
this.fluidIface = createPart(registry, "cable_fluid_interface", PartType.FLUID_INTERFACE,
|
||||
FluidInterfacePart::new);
|
||||
this.p2PTunnelME = createPart(registry, "me_p2p_tunnel", PartType.P2P_TUNNEL_ME, MEP2PTunnelPart::new);
|
||||
this.p2PTunnelRedstone = createPart(registry, "redstone_p2p_tunnel", PartType.P2P_TUNNEL_REDSTONE,
|
||||
RedstoneP2PTunnelPart::new);
|
||||
this.p2PTunnelItems = createPart(registry, "item_p2p_tunnel", PartType.P2P_TUNNEL_ITEM, ItemP2PTunnelPart::new);
|
||||
this.p2PTunnelFluids = createPart(registry, "fluid_p2p_tunnel", PartType.P2P_TUNNEL_FLUID,
|
||||
FluidP2PTunnelPart::new);
|
||||
IdentityAnnihilationPlanePart::new);
|
||||
this.fluidAnnihilationPlane = createPart(registry, "fluid_annihilation_plane", FluidAnnihilationPlanePart::new);
|
||||
this.formationPlane = createPart(registry, "formation_plane", FormationPlanePart::new);
|
||||
this.fluidFormationPlane = createPart(registry, "fluid_formation_plane", FluidFormationPlanePart::new);
|
||||
this.patternTerminal = createPart(registry, "pattern_terminal", PatternTerminalPart::new);
|
||||
this.craftingTerminal = createPart(registry, "crafting_terminal", CraftingTerminalPart::new);
|
||||
this.terminal = createPart(registry, "terminal", TerminalPart::new);
|
||||
this.storageMonitor = createPart(registry, "storage_monitor", StorageMonitorPart::new);
|
||||
this.conversionMonitor = createPart(registry, "conversion_monitor", ConversionMonitorPart::new);
|
||||
this.iface = createPart(registry, "cable_interface", InterfacePart::new);
|
||||
this.fluidIface = createPart(registry, "cable_fluid_interface", FluidInterfacePart::new);
|
||||
this.p2PTunnelME = createPart(registry, "me_p2p_tunnel", MEP2PTunnelPart::new);
|
||||
this.p2PTunnelRedstone = createPart(registry, "redstone_p2p_tunnel", RedstoneP2PTunnelPart::new);
|
||||
this.p2PTunnelItems = createPart(registry, "item_p2p_tunnel", ItemP2PTunnelPart::new);
|
||||
this.p2PTunnelFluids = createPart(registry, "fluid_p2p_tunnel", FluidP2PTunnelPart::new);
|
||||
this.p2PTunnelEU = null; // FIXME createPart( "ic2_p2p_tunnel", PartType.P2P_TUNNEL_IC2,
|
||||
// PartP2PIC2Power::new);
|
||||
this.p2PTunnelFE = createPart(registry, "fe_p2p_tunnel", PartType.P2P_TUNNEL_FE, FEP2PTunnelPart::new);
|
||||
this.p2PTunnelLight = createPart(registry, "light_p2p_tunnel", PartType.P2P_TUNNEL_LIGHT,
|
||||
LightP2PTunnelPart::new);
|
||||
this.interfaceTerminal = createPart(registry, "interface_terminal", PartType.INTERFACE_TERMINAL,
|
||||
InterfaceTerminalPart::new);
|
||||
this.fluidTerminal = createPart(registry, "fluid_terminal", PartType.FLUID_TERMINAL, FluidTerminalPart::new);
|
||||
this.p2PTunnelFE = createPart(registry, "fe_p2p_tunnel", FEP2PTunnelPart::new);
|
||||
this.p2PTunnelLight = createPart(registry, "light_p2p_tunnel", LightP2PTunnelPart::new);
|
||||
this.interfaceTerminal = createPart(registry, "interface_terminal", InterfaceTerminalPart::new);
|
||||
this.fluidTerminal = createPart(registry, "fluid_terminal", FluidTerminalPart::new);
|
||||
}
|
||||
|
||||
private void registerPartModels(PartModels partModels) {
|
||||
@@ -212,20 +188,20 @@ public final class ApiParts implements IParts {
|
||||
}
|
||||
}
|
||||
|
||||
private <T extends IPart> IItemDefinition createPart(FeatureFactory registry, String id, PartType type,
|
||||
private <T extends IPart> IItemDefinition createPart(FeatureFactory registry, String id,
|
||||
Function<ItemStack, T> factory) {
|
||||
return registry.item(id, props -> new PartItem<>(props, type, factory)).itemGroup(CreativeTab.INSTANCE)
|
||||
return registry.item(id, props -> new PartItem<>(props, factory)).itemGroup(CreativeTab.INSTANCE)
|
||||
.rendering(new PartItemRendering()).build();
|
||||
}
|
||||
|
||||
private <T extends IPart> AEColoredItemDefinition constructColoredDefinition(FeatureFactory registry,
|
||||
String idSuffix, PartType type, Function<ItemStack, T> factory) {
|
||||
String idSuffix, Function<ItemStack, T> factory) {
|
||||
final ColoredItemDefinition definition = new ColoredItemDefinition();
|
||||
|
||||
for (final AEColor color : AEColor.values()) {
|
||||
String id = color.registryPrefix + '_' + idSuffix;
|
||||
|
||||
IItemDefinition itemDef = registry.item(id, props -> new ColoredPartItem<>(props, type, factory, color))
|
||||
IItemDefinition itemDef = registry.item(id, props -> new ColoredPartItem<>(props, factory, color))
|
||||
.itemGroup(CreativeTab.INSTANCE).rendering(new PartItemRendering(color)).build();
|
||||
|
||||
definition.add(color, new ItemStackSrc(itemDef.item(), ActivityState.Enabled));
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
package appeng.core.api.definitions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.fluids.parts.*;
|
||||
import appeng.items.parts.PartModelsHelper;
|
||||
import appeng.parts.automation.*;
|
||||
import appeng.parts.misc.*;
|
||||
import appeng.parts.networking.*;
|
||||
import appeng.parts.p2p.*;
|
||||
import appeng.parts.reporting.*;
|
||||
|
||||
enum PartType {
|
||||
INVALID_TYPE(EnumSet.of(AEFeature.CORE), null),
|
||||
|
||||
CABLE_GLASS(EnumSet.of(AEFeature.GLASS_CABLES), GlassCablePart.class) {
|
||||
@Override
|
||||
public boolean isCable() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
CABLE_COVERED(EnumSet.of(AEFeature.COVERED_CABLES), CoveredCablePart.class) {
|
||||
@Override
|
||||
public boolean isCable() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
CABLE_SMART(EnumSet.of(AEFeature.CHANNELS, AEFeature.SMART_CABLES), SmartCablePart.class) {
|
||||
@Override
|
||||
public boolean isCable() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
CABLE_DENSE_SMART(EnumSet.of(AEFeature.CHANNELS, AEFeature.DENSE_CABLES), SmartDenseCablePart.class) {
|
||||
@Override
|
||||
public boolean isCable() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
CABLE_DENSE_COVERED(EnumSet.of(AEFeature.CHANNELS, AEFeature.DENSE_CABLES), CoveredDenseCablePart.class) {
|
||||
@Override
|
||||
public boolean isCable() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
TOGGLE_BUS(EnumSet.of(AEFeature.TOGGLE_BUS), ToggleBusPart.class),
|
||||
|
||||
INVERTED_TOGGLE_BUS(EnumSet.of(AEFeature.TOGGLE_BUS), InvertedToggleBusPart.class),
|
||||
|
||||
CABLE_ANCHOR(EnumSet.of(AEFeature.CABLE_ANCHOR), CableAnchorPart.class),
|
||||
|
||||
QUARTZ_FIBER(EnumSet.of(AEFeature.QUARTZ_FIBER), QuartzFiberPart.class),
|
||||
|
||||
MONITOR(EnumSet.of(AEFeature.PANELS), PanelPart.class),
|
||||
|
||||
SEMI_DARK_MONITOR(EnumSet.of(AEFeature.PANELS), SemiDarkPanelPart.class),
|
||||
|
||||
DARK_MONITOR(EnumSet.of(AEFeature.PANELS), DarkPanelPart.class),
|
||||
|
||||
STORAGE_BUS(EnumSet.of(AEFeature.STORAGE_BUS), StorageBusPart.class),
|
||||
FLUID_STORAGE_BUS(EnumSet.of(AEFeature.FLUID_STORAGE_BUS), FluidStorageBusPart.class),
|
||||
|
||||
IMPORT_BUS(EnumSet.of(AEFeature.IMPORT_BUS), ImportBusPart.class),
|
||||
|
||||
FLUID_IMPORT_BUS(EnumSet.of(AEFeature.FLUID_IMPORT_BUS), FluidImportBusPart.class),
|
||||
|
||||
EXPORT_BUS(EnumSet.of(AEFeature.EXPORT_BUS), ExportBusPart.class),
|
||||
|
||||
FLUID_EXPORT_BUS(EnumSet.of(AEFeature.FLUID_EXPORT_BUS), FluidExportBusPart.class),
|
||||
|
||||
LEVEL_EMITTER(EnumSet.of(AEFeature.LEVEL_EMITTER), LevelEmitterPart.class),
|
||||
FLUID_LEVEL_EMITTER(EnumSet.of(AEFeature.FLUID_LEVEL_EMITTER), FluidLevelEmitterPart.class),
|
||||
|
||||
ANNIHILATION_PLANE(EnumSet.of(AEFeature.ANNIHILATION_PLANE), AnnihilationPlanePart.class),
|
||||
|
||||
IDENTITY_ANNIHILATION_PLANE(EnumSet.of(AEFeature.ANNIHILATION_PLANE, AEFeature.IDENTITY_ANNIHILATION_PLANE),
|
||||
IdentityAnnihilationPlanePart.class),
|
||||
|
||||
FLUID_ANNIHILATION_PLANE(EnumSet.of(AEFeature.FLUID_ANNIHILATION_PLANE), FluidAnnihilationPlanePart.class),
|
||||
|
||||
FORMATION_PLANE(EnumSet.of(AEFeature.FORMATION_PLANE), FormationPlanePart.class),
|
||||
|
||||
FLUID_FORMATION_PLANE(EnumSet.of(AEFeature.FLUID_FORMATION_PLANE), FluidFormationPlanePart.class),
|
||||
|
||||
PATTERN_TERMINAL(EnumSet.of(AEFeature.PATTERNS), PatternTerminalPart.class),
|
||||
|
||||
CRAFTING_TERMINAL(EnumSet.of(AEFeature.CRAFTING_TERMINAL), CraftingTerminalPart.class),
|
||||
|
||||
TERMINAL(EnumSet.of(AEFeature.TERMINAL), TerminalPart.class),
|
||||
|
||||
STORAGE_MONITOR(EnumSet.of(AEFeature.STORAGE_MONITOR), StorageMonitorPart.class),
|
||||
|
||||
CONVERSION_MONITOR(EnumSet.of(AEFeature.PART_CONVERSION_MONITOR), ConversionMonitorPart.class),
|
||||
|
||||
INTERFACE(EnumSet.of(AEFeature.INTERFACE), InterfacePart.class),
|
||||
FLUID_INTERFACE(EnumSet.of(AEFeature.FLUID_INTERFACE), FluidInterfacePart.class),
|
||||
|
||||
P2P_TUNNEL_ME(EnumSet.of(AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_ME), MEP2PTunnelPart.class),
|
||||
|
||||
P2P_TUNNEL_REDSTONE(EnumSet.of(AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_REDSTONE), RedstoneP2PTunnelPart.class),
|
||||
|
||||
P2P_TUNNEL_ITEM(EnumSet.of(AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_ITEMS), ItemP2PTunnelPart.class),
|
||||
|
||||
P2P_TUNNEL_FLUID(EnumSet.of(AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_FLUIDS), FluidP2PTunnelPart.class),
|
||||
|
||||
//FIXME P2P_TUNNEL_IC2( 465, "p2p_tunnel_ic2", EnumSet.of( AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_EU ), EnumSet
|
||||
//FIXME .of( IntegrationType.IC2 ), PartP2PIC2Power.class ),
|
||||
|
||||
P2P_TUNNEL_LIGHT(EnumSet.of(AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_LIGHT), LightP2PTunnelPart.class),
|
||||
|
||||
P2P_TUNNEL_FE(EnumSet.of(AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_FE), FEP2PTunnelPart.class),
|
||||
|
||||
// P2PTunnelOpenComputers( 468, EnumSet.of( AEFeature.P2PTunnel,
|
||||
// AEFeature.P2PTunnelOpenComputers ), EnumSet.of(
|
||||
// IntegrationType.OpenComputers ), PartP2POpenComputers.class, GuiText.OCTunnel
|
||||
// ),
|
||||
|
||||
INTERFACE_TERMINAL(EnumSet.of(AEFeature.INTERFACE_TERMINAL), InterfaceTerminalPart.class),
|
||||
|
||||
FLUID_TERMINAL(EnumSet.of(AEFeature.FLUID_TERMINAL), FluidTerminalPart.class);
|
||||
|
||||
private final Set<AEFeature> features;
|
||||
private final Set<ResourceLocation> models;
|
||||
|
||||
PartType(final Set<AEFeature> features, final Class<? extends IPart> c) {
|
||||
this.features = Collections.unmodifiableSet(features);
|
||||
|
||||
if (c != null) {
|
||||
this.models = new HashSet<>(PartModelsHelper.createModels(c));
|
||||
} else {
|
||||
this.models = Collections.emptySet();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Set<AEFeature> getFeature() {
|
||||
return this.features;
|
||||
}
|
||||
|
||||
public Set<ResourceLocation> getModels() {
|
||||
return this.models;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user