Closes #1899, Fixed #1898: Adds an easy way to export interesting information into CSV format

Mostly used for the recipe system, but can also be used for debugging purposes. Debug options needs to be ticked to use the full information gain. Recipes only require the normal localization and the specific name plus metadata.

Shifted the recipes into a recipes folder where the CSV will also reside. This will also elevate the copying of the readme to the user directory since it can reside in the recipes folder.

Fixed a bug where the copier would copy the would also copy empty folders
This commit is contained in:
thatsIch
2015-08-20 19:15:52 +02:00
parent b560382e80
commit 37ae2131fe
38 changed files with 1454 additions and 195 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
for( final AEFeature feature : AEFeature.values() )
{
if( feature.isVisible )
if( feature.isVisible() )
{
if( this.get( "Features." + feature.category, feature.name(), feature.defaultValue ).getBoolean( feature.defaultValue ) )
{
+8
View File
@@ -100,4 +100,12 @@ public final class AELog
log( Level.INFO, format, data );
}
}
public static void debug( String format, Object... data )
{
if( AEConfig.instance.isFeatureEnabled( AEFeature.DebugLogging ) )
{
log( Level.DEBUG, format, data );
}
}
}
+50 -15
View File
@@ -21,11 +21,12 @@ package appeng.core;
import java.io.File;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nonnull;
import com.google.common.base.Stopwatch;
import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
@@ -48,8 +49,13 @@ import appeng.core.sync.network.NetworkHandler;
import appeng.core.worlddata.WorldData;
import appeng.hooks.TickHandler;
import appeng.integration.IntegrationRegistry;
import appeng.recipes.CustomRecipeConfig;
import appeng.recipes.CustomRecipeForgeConfiguration;
import appeng.server.AECommand;
import appeng.services.VersionChecker;
import appeng.services.export.ExportConfig;
import appeng.services.export.ExportProcess;
import appeng.services.export.ForgeExportConfig;
import appeng.services.version.VersionCheckerConfig;
import appeng.util.Platform;
@@ -74,15 +80,28 @@ public final class AppEng
@Nonnull
private static final AppEng INSTANCE = new AppEng();
private final IMCHandler imcHandler;
private final Registration registration;
private File configDirectory;
private CustomRecipeConfig customRecipeConfig;
/**
* Folder for recipes
*
* used for CSV item names and the recipes
*/
private File recipeDirectory;
/**
* determined in pre-init but used in init
*/
private ExportConfig exportConfig;
AppEng()
{
this.imcHandler = new IMCHandler();
FMLCommonHandler.instance().registerCrashCallable( new ModCrashEnhancement( CrashInfo.MOD_VERSION ) );
this.registration = new Registration();
}
@Nonnull
@@ -92,9 +111,10 @@ public final class AppEng
return INSTANCE;
}
public final File getConfigDirectory()
@Nonnull
public final Registration getRegistration()
{
return this.configDirectory;
return this.registration;
}
@EventHandler
@@ -107,14 +127,19 @@ public final class AppEng
final Stopwatch watch = Stopwatch.createStarted();
this.configDirectory = new File( event.getModConfigurationDirectory().getPath(), "AppliedEnergistics2" );
this.recipeDirectory = new File( this.configDirectory, "recipes" );
final File configFile = new File( this.configDirectory, "AppliedEnergistics2.cfg" );
final File facadeFile = new File( this.configDirectory, "Facades.cfg" );
final File versionFile = new File( this.configDirectory, "VersionChecker.cfg" );
final File recipeFile = new File( this.configDirectory, "CustomRecipes.cfg" );
final Configuration recipeConfiguration = new Configuration( recipeFile );
AEConfig.instance = new AEConfig( configFile );
FacadeConfig.instance = new FacadeConfig( facadeFile );
final VersionCheckerConfig versionCheckerConfig = new VersionCheckerConfig( versionFile );
this.customRecipeConfig = new CustomRecipeForgeConfiguration( recipeConfiguration );
this.exportConfig = new ForgeExportConfig( recipeConfiguration );
AELog.info( "Pre Initialization ( started )" );
@@ -129,9 +154,9 @@ public final class AppEng
CommonHelper.proxy.init();
}
Registration.INSTANCE.preInitialize( event );
this.registration.preInitialize( event );
if( versionCheckerConfig.isEnabled() )
if( versionCheckerConfig.isVersionCheckingEnabled() )
{
final VersionChecker versionChecker = new VersionChecker( versionCheckerConfig );
final Thread versionCheckerThread = new Thread( versionChecker );
@@ -154,22 +179,30 @@ public final class AppEng
@EventHandler
private void init( final FMLInitializationEvent event )
{
final Stopwatch star = Stopwatch.createStarted();
final Stopwatch start = Stopwatch.createStarted();
AELog.info( "Initialization ( started )" );
Registration.INSTANCE.initialize( event );
if( exportConfig.isExportingItemNamesEnabled() )
{
final ExportProcess process = new ExportProcess( this.recipeDirectory, exportConfig );
final Thread exportProcessThread = new Thread( process );
this.startService( "AE2 CSV Export", exportProcessThread );
}
this.registration.initialize( event, this.recipeDirectory, this.customRecipeConfig );
IntegrationRegistry.INSTANCE.init();
AELog.info( "Initialization ( ended after " + star.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
AELog.info( "Initialization ( ended after " + start.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
}
@EventHandler
private void postInit( final FMLPostInitializationEvent event )
{
final Stopwatch star = Stopwatch.createStarted();
final Stopwatch start = Stopwatch.createStarted();
AELog.info( "Post Initialization ( started )" );
Registration.INSTANCE.postInit( event );
this.registration.postInit( event );
IntegrationRegistry.INSTANCE.postInit();
FMLCommonHandler.instance().registerCrashCallable( new IntegrationCrashEnhancement() );
@@ -179,13 +212,15 @@ public final class AppEng
NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler );
NetworkHandler.instance = new NetworkHandler( "AE2" );
AELog.info( "Post Initialization ( ended after " + star.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
AELog.info( "Post Initialization ( ended after " + start.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
}
@EventHandler
private void handleIMCEvent( final FMLInterModComms.IMCEvent event )
{
this.imcHandler.handleIMCEvent( event );
final IMCHandler imcHandler = new IMCHandler();
imcHandler.handleIMCEvent( event );
}
@EventHandler
+52 -35
View File
@@ -22,7 +22,6 @@ package appeng.core;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import javax.annotation.Nonnull;
import com.google.common.base.Preconditions;
@@ -30,6 +29,7 @@ import com.google.common.base.Preconditions;
import org.apache.commons.io.FileUtils;
import appeng.api.recipes.IRecipeHandler;
import appeng.recipes.CustomRecipeConfig;
import appeng.recipes.loader.ConfigLoader;
import appeng.recipes.loader.JarLoader;
import appeng.recipes.loader.RecipeResourceCopier;
@@ -44,57 +44,74 @@ import appeng.recipes.loader.RecipeResourceCopier;
*/
public class RecipeLoader implements Runnable
{
/**
* recipe path in the jar
*/
private static final String ASSETS_RECIPE_PATH = "/assets/appliedenergistics2/recipes/";
@Nonnull
private final IRecipeHandler handler;
@Nonnull
private final CustomRecipeConfig config;
@Nonnull
private final File recipeDirectory;
/**
* @param config configuration for the knowledge how to handle the loading process
* @param handler handler to load the recipes
*
* @throws NullPointerException if handler is <tt>null</tt>
*/
public RecipeLoader( @Nonnull final IRecipeHandler handler )
public RecipeLoader( @Nonnull final File recipeDirectory, @Nonnull final CustomRecipeConfig config, @Nonnull final IRecipeHandler handler )
{
Preconditions.checkNotNull( handler );
this.handler = handler;
this.recipeDirectory = Preconditions.checkNotNull( recipeDirectory );
Preconditions.checkArgument( !recipeDirectory.isFile() );
this.config = Preconditions.checkNotNull( config );
this.handler = Preconditions.checkNotNull( handler );
}
@Override
public void run()
public final void run()
{
// setup copying
final RecipeResourceCopier copier = new RecipeResourceCopier( "assets/appliedenergistics2/recipes/" );
final File configDirectory = AppEng.instance().getConfigDirectory();
final File generatedRecipesDir = new File( configDirectory, "generated-recipes" );
final File userRecipesDir = new File( configDirectory, "user-recipes" );
final File readmeGenDest = new File( generatedRecipesDir, "README.html" );
final File readmeUserDest = new File( userRecipesDir, "README.html" );
// generates generated and user recipes dir
// will clean the generated every time to keep it up to date
// copies over the recipes in the jar over to the generated folder
// copies over the readmes
try
if( this.config.isEnabled() )
{
FileUtils.forceMkdir( generatedRecipesDir );
FileUtils.forceMkdir( userRecipesDir );
FileUtils.cleanDirectory( generatedRecipesDir );
// setup copying
final RecipeResourceCopier copier = new RecipeResourceCopier( "assets/appliedenergistics2/recipes/" );
copier.copyTo( generatedRecipesDir );
FileUtils.copyFile( readmeGenDest, readmeUserDest );
final File generatedRecipesDir = new File( this.recipeDirectory, "generated" );
final File userRecipesDir = new File( this.recipeDirectory, "user" );
// parse recipes prioritising the user scripts by using the generated as template
this.handler.parseRecipes( new ConfigLoader( generatedRecipesDir, userRecipesDir ), "index.recipe" );
// generates generated and user recipes dir
// will clean the generated every time to keep it up to date
// copies over the recipes in the jar over to the generated folder
// copies over the readmes
try
{
FileUtils.forceMkdir( generatedRecipesDir );
FileUtils.forceMkdir( userRecipesDir );
FileUtils.cleanDirectory( generatedRecipesDir );
copier.copyTo( ".recipe", generatedRecipesDir );
copier.copyTo( ".html", recipeDirectory );
// parse recipes prioritising the user scripts by using the generated as template
this.handler.parseRecipes( new ConfigLoader( generatedRecipesDir, userRecipesDir ), "index.recipe" );
}
// on failure use jar parsing
catch( final IOException e )
{
AELog.error( e );
this.handler.parseRecipes( new JarLoader( ASSETS_RECIPE_PATH ), "index.recipe" );
}
catch( final URISyntaxException e )
{
AELog.error( e );
this.handler.parseRecipes( new JarLoader( ASSETS_RECIPE_PATH ), "index.recipe" );
}
}
// on failure use jar parsing
catch( final IOException e )
else
{
AELog.error( e );
this.handler.parseRecipes( new JarLoader( "/assets/appliedenergistics2/recipes/" ), "index.recipe" );
}
catch( final URISyntaxException e )
{
AELog.error( e );
this.handler.parseRecipes( new JarLoader( "/assets/appliedenergistics2/recipes/" ), "index.recipe" );
this.handler.parseRecipes( new JarLoader( ASSETS_RECIPE_PATH ), "index.recipe" );
}
}
}
+22 -8
View File
@@ -19,6 +19,11 @@
package appeng.core;
import java.io.File;
import javax.annotation.Nonnull;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -88,6 +93,7 @@ import appeng.me.cache.TickManagerCache;
import appeng.me.storage.AEExternalHandler;
import appeng.parts.PartPlacement;
import appeng.recipes.AEItemResolver;
import appeng.recipes.CustomRecipeConfig;
import appeng.recipes.RecipeHandler;
import appeng.recipes.game.DisassembleRecipe;
import appeng.recipes.game.FacadeRecipe;
@@ -117,18 +123,21 @@ import appeng.worldgen.QuartzWorldGen;
public final class Registration
{
public static final Registration INSTANCE = new Registration();
private final RecipeHandler recipeHandler;
private final DefinitionConverter converter;
public BiomeGenBase storageBiome;
private BiomeGenBase storageBiome;
private Registration()
Registration()
{
this.converter = new DefinitionConverter();
this.recipeHandler = new RecipeHandler();
}
public BiomeGenBase getStorageBiome()
{
return this.storageBiome;
}
public void preInitialize( final FMLPreInitializationEvent event )
{
this.registerSpatial( false );
@@ -503,8 +512,13 @@ public final class Registration
target.itemLumenPaintBall = source.coloredLumenPaintBall();
}
public void initialize( final FMLInitializationEvent event )
public void initialize( @Nonnull final FMLInitializationEvent event, @Nonnull final File recipeDirectory, @Nonnull final CustomRecipeConfig customRecipeConfig )
{
Preconditions.checkNotNull( event );
Preconditions.checkNotNull( recipeDirectory );
Preconditions.checkArgument( !recipeDirectory.isFile() );
Preconditions.checkNotNull( customRecipeConfig );
final IAppEngApi api = AEApi.instance();
final IPartHelper partHelper = api.partHelper();
final IRegistryContainer registries = api.registries();
@@ -512,7 +526,7 @@ public final class Registration
// Perform ore camouflage!
ItemMultiMaterial.instance.makeUnique();
final Runnable recipeLoader = new RecipeLoader( this.recipeHandler );
final Runnable recipeLoader = new RecipeLoader( recipeDirectory, customRecipeConfig, this.recipeHandler );
recipeLoader.run();
partHelper.registerNewLayer( "appeng.parts.layers.LayerISidedInventory", "net.minecraft.inventory.ISidedInventory" );
@@ -554,13 +568,13 @@ public final class Registration
registration.registerAchievementHandlers();
registration.registerAchievements();
if( AEConfig.instance.isFeatureEnabled( AEFeature.enableDisassemblyCrafting ) )
if( AEConfig.instance.isFeatureEnabled( AEFeature.EnableDisassemblyCrafting ) )
{
GameRegistry.addRecipe( new DisassembleRecipe() );
RecipeSorter.register( "appliedenergistics2:disassemble", DisassembleRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless" );
}
if( AEConfig.instance.isFeatureEnabled( AEFeature.enableFacadeCrafting ) )
if( AEConfig.instance.isFeatureEnabled( AEFeature.EnableFacadeCrafting ) )
{
GameRegistry.addRecipe( new FacadeRecipe() );
RecipeSorter.register( "appliedenergistics2:facade", FacadeRecipe.class, Category.SHAPED, "after:minecraft:shaped" );
+130 -34
View File
@@ -21,60 +21,124 @@ package appeng.core.features;
public enum AEFeature
{
Core( null ), // stuff that has no reason for ever being turned off, or that
// stuff that has no reason for ever being turned off, or that
// is just flat out required by tons of
// important stuff.
Core( null )
{
@Override
public boolean isVisible()
{
return false;
}
},
CertusQuartzWorldGen( "World" ), MeteoriteWorldGen( "World" ),
CertusQuartzWorldGen( Constants.CATEGORY_WORLD ),
MeteoriteWorldGen( Constants.CATEGORY_WORLD ),
DecorativeLights( Constants.CATEGORY_WORLD ),
DecorativeQuartzBlocks( Constants.CATEGORY_WORLD ),
SkyStoneChests( Constants.CATEGORY_WORLD ),
SpawnPressesInMeteorites( Constants.CATEGORY_WORLD ),
GrindStone( Constants.CATEGORY_WORLD ),
Flour( Constants.CATEGORY_WORLD ),
Inscriber( Constants.CATEGORY_WORLD ),
ChestLoot( Constants.CATEGORY_WORLD ),
VillagerTrading( Constants.CATEGORY_WORLD ),
TinyTNT( Constants.CATEGORY_WORLD ),
DecorativeLights( "World" ), DecorativeQuartzBlocks( "World" ), SkyStoneChests( "World" ), SpawnPressesInMeteorites( "World" ),
PoweredTools( Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
CertusQuartzTools( Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
NetherQuartzTools( Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
GrindStone( "World" ), Flour( "World" ), Inscriber( "World" ),
QuartzHoe( Constants.CATEGORY_TOOLS ),
QuartzSpade( Constants.CATEGORY_TOOLS ),
QuartzSword( Constants.CATEGORY_TOOLS ),
QuartzPickaxe( Constants.CATEGORY_TOOLS ),
QuartzAxe( Constants.CATEGORY_TOOLS ),
QuartzKnife( Constants.CATEGORY_TOOLS ),
QuartzWrench( Constants.CATEGORY_TOOLS ),
ChargedStaff( Constants.CATEGORY_TOOLS ),
EntropyManipulator( Constants.CATEGORY_TOOLS ),
MatterCannon( Constants.CATEGORY_TOOLS ),
WirelessAccessTerminal( Constants.CATEGORY_TOOLS ),
ColorApplicator( Constants.CATEGORY_TOOLS ),
MeteoriteCompass( Constants.CATEGORY_TOOLS ),
ChestLoot( "World" ), VillagerTrading( "World" ),
PowerGen( Constants.CATEGORY_NETWORK_FEATURES ),
Security( Constants.CATEGORY_NETWORK_FEATURES ),
SpatialIO( Constants.CATEGORY_NETWORK_FEATURES ),
QuantumNetworkBridge( Constants.CATEGORY_NETWORK_FEATURES ),
Channels( Constants.CATEGORY_NETWORK_FEATURES ),
TinyTNT( "World" ),
LevelEmitter( Constants.CATEGORY_NETWORK_BUSES ),
CraftingTerminal( Constants.CATEGORY_NETWORK_BUSES ),
StorageMonitor( Constants.CATEGORY_NETWORK_BUSES ),
P2PTunnel( Constants.CATEGORY_NETWORK_BUSES ),
FormationPlane( Constants.CATEGORY_NETWORK_BUSES ),
AnnihilationPlane( Constants.CATEGORY_NETWORK_BUSES ),
IdentityAnnihilationPlane( Constants.CATEGORY_NETWORK_BUSES ),
ImportBus( Constants.CATEGORY_NETWORK_BUSES ),
ExportBus( Constants.CATEGORY_NETWORK_BUSES ),
StorageBus( Constants.CATEGORY_NETWORK_BUSES ),
PartConversionMonitor( Constants.CATEGORY_NETWORK_BUSES ),
PoweredTools( "ToolsClassifications" ),
PortableCell( Constants.CATEGORY_PORTABLE_CELL ),
CertusQuartzTools( "ToolsClassifications" ),
StorageCells( Constants.CATEGORY_STORAGE ),
MEChest( Constants.CATEGORY_STORAGE ),
MEDrive( Constants.CATEGORY_STORAGE ),
IOPort( Constants.CATEGORY_STORAGE ),
NetherQuartzTools( "ToolsClassifications" ),
NetworkTool( Constants.CATEGORY_NETWORK_TOOL ),
QuartzHoe( "Tools" ), QuartzSpade( "Tools" ), QuartzSword( "Tools" ), QuartzPickaxe( "Tools" ), QuartzAxe( "Tools" ), QuartzKnife( "Tools" ), QuartzWrench( "Tools" ),
DenseEnergyCells( Constants.CATEGORY_HIGHER_CAPACITY ),
DenseCables( Constants.CATEGORY_HIGHER_CAPACITY ),
ChargedStaff( "Tools" ), EntropyManipulator( "Tools" ), MatterCannon( "Tools" ), WirelessAccessTerminal( "Tools" ), ColorApplicator( "Tools" ),
P2PTunnelRF( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelME( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelItems( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelRedstone( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelEU( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelLiquids( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelLight( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelOpenComputers( Constants.CATEGORY_P2P_TUNNELS ),
P2PTunnelPressure( Constants.CATEGORY_P2P_TUNNELS ),
CraftingCPU( "CraftingFeatures" ), PowerGen( "NetworkFeatures" ), Security( "NetworkFeatures" ),
MassCannonBlockDamage( Constants.CATEGORY_BLOCK_FEATURES ),
TinyTNTBlockDamage( Constants.CATEGORY_BLOCK_FEATURES ),
SpatialIO( "NetworkFeatures" ), QuantumNetworkBridge( "NetworkFeatures" ), Channels( "NetworkFeatures" ),
Facades( Constants.CATEGORY_FACADES ),
LevelEmitter( "NetworkBuses" ), CraftingTerminal( "NetworkBuses" ), StorageMonitor( "NetworkBuses" ), P2PTunnel( "NetworkBuses" ), FormationPlane( "NetworkBuses" ), AnnihilationPlane( "NetworkBuses" ), IdentityAnnihilationPlane( "NetworkBuses" ), ImportBus( "NetworkBuses" ), ExportBus( "NetworkBuses" ), StorageBus( "NetworkBuses" ), PartConversionMonitor( "NetworkBuses" ),
UnsupportedDeveloperTools( Constants.CATEGORY_MISC, false ),
Creative( Constants.CATEGORY_MISC ),
GrinderLogging( Constants.CATEGORY_MISC, false ),
Logging( Constants.CATEGORY_MISC ),
IntegrationLogging( Constants.CATEGORY_MISC, false ),
WebsiteRecipes( Constants.CATEGORY_MISC, false ),
LogSecurityAudits( Constants.CATEGORY_MISC, false ),
Achievements( Constants.CATEGORY_MISC ),
UpdateLogging( Constants.CATEGORY_MISC, false ),
PacketLogging( Constants.CATEGORY_MISC, false ),
CraftingLog( Constants.CATEGORY_MISC, false ),
LightDetector( Constants.CATEGORY_MISC ),
DebugLogging( Constants.CATEGORY_MISC, false ),
StorageCells( "Storage" ), PortableCell( "PortableCell" ), MEChest( "Storage" ), MEDrive( "Storage" ), IOPort( "Storage" ),
EnableFacadeCrafting( Constants.CATEGORY_CRAFTING ),
InWorldSingularity( Constants.CATEGORY_CRAFTING ),
InWorldFluix( Constants.CATEGORY_CRAFTING ),
InWorldPurification( Constants.CATEGORY_CRAFTING ),
InterfaceTerminal( Constants.CATEGORY_CRAFTING ),
EnableDisassemblyCrafting( Constants.CATEGORY_CRAFTING ),
NetworkTool( "NetworkTool" ),
AlphaPass( Constants.CATEGORY_RENDERING ), PaintBalls( Constants.CATEGORY_TOOLS ),
DenseEnergyCells( "HigherCapacity" ), DenseCables( "HigherCapacity" ),
MolecularAssembler( Constants.CATEGORY_CRAFTING_FEATURES ),
Patterns( Constants.CATEGORY_CRAFTING_FEATURES ),
CraftingCPU( Constants.CATEGORY_CRAFTING_FEATURES ),
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ), P2PTunnelPressure( "P2PTunnels" ),
MassCannonBlockDamage( "BlockFeatures" ), TinyTNTBlockDamage( "BlockFeatures" ), Facades( "Facades" ),
UnsupportedDeveloperTools( "Misc", false ), Creative( "Misc" ),
GrinderLogging( "Misc", false ), Logging( "Misc" ), IntegrationLogging( "Misc", false ), WebsiteRecipes( "Misc", false ),
enableFacadeCrafting( "Crafting" ), inWorldSingularity( "Crafting" ), inWorldFluix( "Crafting" ), inWorldPurification( "Crafting" ), UpdateLogging( "Misc", false ),
AlphaPass( "Rendering" ), PaintBalls( "Tools" ), PacketLogging( "Misc", false ), CraftingLog( "Misc", false ), InterfaceTerminal( "Crafting" ), LightDetector( "Misc" ),
enableDisassemblyCrafting( "Crafting" ), MolecularAssembler( "CraftingFeatures" ), MeteoriteCompass( "Tools" ), Patterns( "CraftingFeatures" ),
ChunkLoggerTrace( "Commands", false ), LogSecurityAudits( "Misc", false ), Achievements( "Misc" );
ChunkLoggerTrace( Constants.CATEGORY_COMMANDS, false );
public final String category;
public final boolean isVisible;
public final boolean defaultValue;
AEFeature( final String cat )
@@ -85,7 +149,39 @@ public enum AEFeature
AEFeature( final String cat, final boolean defaultValue )
{
this.category = cat;
this.isVisible = !this.name().equals( "Core" );
this.defaultValue = defaultValue;
}
/**
* override to set visibility
*
* @return default true
*/
public boolean isVisible()
{
return true;
}
private enum Constants
{
;
private static final String CATEGORY_MISC = "Misc";
private static final String CATEGORY_CRAFTING = "Crafting";
private static final String CATEGORY_WORLD = "World";
private static final String CATEGORY_TOOLS = "Tools";
private static final String CATEGORY_TOOLS_CLASSIFICATIONS = "ToolsClassifications";
private static final String CATEGORY_NETWORK_BUSES = "NetworkBuses";
private static final String CATEGORY_P2P_TUNNELS = "P2PTunnels";
private static final String CATEGORY_BLOCK_FEATURES = "BlockFeatures";
private static final String CATEGORY_CRAFTING_FEATURES = "CraftingFeatures";
private static final String CATEGORY_STORAGE = "Storage";
private static final String CATEGORY_HIGHER_CAPACITY = "HigherCapacity";
private static final String CATEGORY_NETWORK_FEATURES = "NetworkFeatures";
private static final String CATEGORY_COMMANDS = "Commands";
private static final String CATEGORY_RENDERING = "Rendering";
private static final String CATEGORY_FACADES = "Facades";
private static final String CATEGORY_NETWORK_TOOL = "NetworkTool";
private static final String CATEGORY_PORTABLE_CELL = "PortableCell";
}
}