Refactored AEConfig (#2633)
Added a singleton getter instead the public field. Reduced all fields to private. Replaced field access with getters. Added setters where necessary (Dimension/Biome Registration) Added config options to disable more features. Splitted Enum name from the config key. Changed FacadeConfig and Networkhandler similar to AEConfig.init().
This commit is contained in:
@@ -24,6 +24,7 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
@@ -52,73 +53,95 @@ import appeng.util.Platform;
|
||||
public final class AEConfig extends Configuration implements IConfigurableObject, IConfigManagerHost
|
||||
{
|
||||
|
||||
public static final double TUNNEL_POWER_LOSS = 0.05;
|
||||
public static final String VERSION = "@version@";
|
||||
public static final String CHANNEL = "@aechannel@";
|
||||
public static final String PACKET_CHANNEL = "AE";
|
||||
public static AEConfig instance;
|
||||
public final IConfigManager settings = new ConfigManager( this );
|
||||
public final EnumSet<AEFeature> featureFlags = EnumSet.noneOf( AEFeature.class );
|
||||
public final int[] craftByStacks = { 1, 10, 100, 1000 };
|
||||
public final int[] priorityByStacks = { 1, 10, 100, 1000 };
|
||||
public final int[] levelByStacks = { 1, 10, 100, 1000 };
|
||||
private final double WirelessHighWirelessCount = 64;
|
||||
private final File configFile;
|
||||
public int storageBiomeID = -1;
|
||||
public int storageProviderID = -1;
|
||||
public int formationPlaneEntityLimit = 128;
|
||||
public float spawnChargedChance = 0.92f;
|
||||
public int quartzOresPerCluster = 4;
|
||||
public int quartzOresClusterAmount = 15;
|
||||
public final int chargedChange = 4;
|
||||
public int minMeteoriteDistance = 707;
|
||||
public int minMeteoriteDistanceSq = this.minMeteoriteDistance * this.minMeteoriteDistance;
|
||||
public double spatialPowerExponent = 1.35;
|
||||
public double spatialPowerMultiplier = 1250.0;
|
||||
public String[] grinderOres = {
|
||||
// Vanilla Items
|
||||
"Obsidian", "Ender", "EnderPearl", "Coal", "Iron", "Gold", "Charcoal", "NetherQuartz",
|
||||
// Common Mod Ores
|
||||
"Copper", "Tin", "Silver", "Lead", "Bronze",
|
||||
// AE
|
||||
"CertusQuartz", "Wheat", "Fluix",
|
||||
// Other Mod Ores
|
||||
"Brass", "Platinum", "Nickel", "Invar", "Aluminium", "Electrum", "Osmium", "Zinc" };
|
||||
public double oreDoublePercentage = 90.0;
|
||||
public boolean enableEffects = true;
|
||||
public boolean useLargeFonts = false;
|
||||
public boolean useColoredCraftingStatus;
|
||||
public boolean removeCrashingItemsOnLoad = false;
|
||||
public int wirelessTerminalBattery = 1600000;
|
||||
public int entropyManipulatorBattery = 200000;
|
||||
public int matterCannonBattery = 200000;
|
||||
public int portableCellBattery = 20000;
|
||||
public int colorApplicatorBattery = 20000;
|
||||
public int chargedStaffBattery = 8000;
|
||||
public boolean disableColoredCableRecipesInJEI = true;
|
||||
public boolean updatable = false;
|
||||
public double meteoriteClusterChance = 0.1;
|
||||
public double meteoriteSpawnChance = 0.3;
|
||||
public int[] meteoriteDimensionWhitelist = { 0 };
|
||||
public int craftingCalculationTimePerTick = 5;
|
||||
PowerUnits selectedPowerUnit = PowerUnits.AE;
|
||||
private double WirelessBaseCost = 8;
|
||||
private double WirelessCostMultiplier = 1;
|
||||
private double WirelessTerminalDrainMultiplier = 1;
|
||||
private double WirelessBaseRange = 16;
|
||||
private double WirelessBoosterRangeMultiplier = 1;
|
||||
private double WirelessBoosterExp = 1.5;
|
||||
|
||||
public AEConfig( final File configFile )
|
||||
// Config instance
|
||||
private static AEConfig instance;
|
||||
|
||||
// Default Grindstone ores
|
||||
private static final String[] ORES_VANILLA = { "Obsidian", "Ender", "EnderPearl", "Coal", "Iron", "Gold", "Charcoal", "NetherQuartz" };
|
||||
private static final String[] ORES_AE = { "CertusQuartz", "Wheat", "Fluix" };
|
||||
private static final String[] ORES_COMMON = { "Copper", "Tin", "Silver", "Lead", "Bronze" };
|
||||
private static final String[] ORES_MISC = { "Brass", "Platinum", "Nickel", "Invar", "Aluminium", "Electrum", "Osmium", "Zinc" };
|
||||
|
||||
// Default Energy Conversion Rates
|
||||
private static final double DEFAULT_IC2_EXCHANGE = 2.0;
|
||||
private static final double DEFAULT_RF_EXCHANGE = 0.5;
|
||||
|
||||
private final IConfigManager settings = new ConfigManager( this );
|
||||
|
||||
private final EnumSet<AEFeature> featureFlags = EnumSet.noneOf( AEFeature.class );
|
||||
private final File configFile;
|
||||
private boolean updatable = false;
|
||||
|
||||
// Misc
|
||||
private boolean removeCrashingItemsOnLoad = false;
|
||||
private int formationPlaneEntityLimit = 128;
|
||||
private boolean enableEffects = true;
|
||||
private boolean useLargeFonts = false;
|
||||
private boolean useColoredCraftingStatus;
|
||||
private boolean disableColoredCableRecipesInJEI = true;
|
||||
private int craftingCalculationTimePerTick = 5;
|
||||
private PowerUnits selectedPowerUnit = PowerUnits.AE;
|
||||
|
||||
// GUI Buttons
|
||||
private final int[] craftByStacks = { 1, 10, 100, 1000 };
|
||||
private final int[] priorityByStacks = { 1, 10, 100, 1000 };
|
||||
private final int[] levelByStacks = { 1, 10, 100, 1000 };
|
||||
|
||||
// Spatial IO/Dimension
|
||||
private int storageBiomeID = -1;
|
||||
private int storageProviderID = -1;
|
||||
private double spatialPowerExponent = 1.35;
|
||||
private double spatialPowerMultiplier = 1250.0;
|
||||
|
||||
// Grindstone
|
||||
private String[] grinderOres = Stream.of( ORES_VANILLA, ORES_AE, ORES_COMMON, ORES_MISC ).flatMap( Stream::of ).toArray( String[]::new );
|
||||
private double oreDoublePercentage = 90.0;
|
||||
|
||||
// Batteries
|
||||
private int wirelessTerminalBattery = 1600000;
|
||||
private int entropyManipulatorBattery = 200000;
|
||||
private int matterCannonBattery = 200000;
|
||||
private int portableCellBattery = 20000;
|
||||
private int colorApplicatorBattery = 20000;
|
||||
private int chargedStaffBattery = 8000;
|
||||
|
||||
// Certus quartz
|
||||
private float spawnChargedChance = 0.92f;
|
||||
private int quartzOresPerCluster = 4;
|
||||
private int quartzOresClusterAmount = 15;
|
||||
private int chargedChange = 4;
|
||||
|
||||
// Meteors
|
||||
private int minMeteoriteDistance = 707;
|
||||
private int minMeteoriteDistanceSq = this.minMeteoriteDistance * this.minMeteoriteDistance;
|
||||
private double meteoriteClusterChance = 0.1;
|
||||
private int meteoriteMaximumSpawnHeight = 180;
|
||||
private int[] meteoriteDimensionWhitelist = { 0 };
|
||||
|
||||
// Wireless
|
||||
private double wirelessBaseCost = 8;
|
||||
private double wirelessCostMultiplier = 1;
|
||||
private double wirelessTerminalDrainMultiplier = 1;
|
||||
private double wirelessBaseRange = 16;
|
||||
private double wirelessBoosterRangeMultiplier = 1;
|
||||
private double wirelessBoosterExp = 1.5;
|
||||
private double wirelessHighWirelessCount = 64;
|
||||
|
||||
// Tunnels
|
||||
public static final double TUNNEL_POWER_LOSS = 0.05;
|
||||
|
||||
private AEConfig( final File configFile )
|
||||
{
|
||||
super( configFile );
|
||||
this.configFile = configFile;
|
||||
|
||||
MinecraftForge.EVENT_BUS.register( this );
|
||||
|
||||
final double DEFAULT_IC2_EXCHANGE = 2.0;
|
||||
PowerUnits.EU.conversionRatio = this.get( "PowerRatios", "IC2", DEFAULT_IC2_EXCHANGE ).getDouble( DEFAULT_IC2_EXCHANGE );
|
||||
final double DEFAULT_RF_EXCHANGE = 0.5;
|
||||
PowerUnits.RF.conversionRatio = this.get( "PowerRatios", "Forge Energy", DEFAULT_RF_EXCHANGE ).getDouble( DEFAULT_RF_EXCHANGE );
|
||||
|
||||
final double usageEffective = this.get( "PowerRatios", "UsageMultiplier", 1.0 ).getDouble( 1.0 );
|
||||
@@ -127,7 +150,8 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
CondenserOutput.MATTER_BALLS.requiredPower = this.get( "Condenser", "MatterBalls", 256 ).getInt( 256 );
|
||||
CondenserOutput.SINGULARITY.requiredPower = this.get( "Condenser", "Singularity", 256000 ).getInt( 256000 );
|
||||
|
||||
this.removeCrashingItemsOnLoad = this.get( "general", "removeCrashingItemsOnLoad", false, "Will auto-remove items that crash when being loaded from storage. This will destroy those items instead of crashing the game!" ).getBoolean();
|
||||
this.removeCrashingItemsOnLoad = this.get( "general", "removeCrashingItemsOnLoad", false,
|
||||
"Will auto-remove items that crash when being loaded from storage. This will destroy those items instead of crashing the game!" ).getBoolean();
|
||||
|
||||
this.grinderOres = this.get( "GrindStone", "grinderOres", this.grinderOres ).getStringList();
|
||||
this.oreDoublePercentage = this.get( "GrindStone", "oreDoublePercentage", this.oreDoublePercentage ).getDouble( this.oreDoublePercentage );
|
||||
@@ -136,10 +160,12 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
this.settings.registerSetting( Settings.TERMINAL_STYLE, TerminalStyle.TALL );
|
||||
this.settings.registerSetting( Settings.SEARCH_MODE, SearchBoxMode.AUTOSEARCH );
|
||||
|
||||
this.spawnChargedChance = (float) ( 1.0 - this.get( "worldGen", "spawnChargedChance", 1.0 - this.spawnChargedChance ).getDouble( 1.0 - this.spawnChargedChance ) );
|
||||
this.spawnChargedChance = (float) ( 1.0 - this.get( "worldGen", "spawnChargedChance", 1.0 - this.spawnChargedChance ).getDouble(
|
||||
1.0 - this.spawnChargedChance ) );
|
||||
this.minMeteoriteDistance = this.get( "worldGen", "minMeteoriteDistance", this.minMeteoriteDistance ).getInt( this.minMeteoriteDistance );
|
||||
this.meteoriteClusterChance = this.get( "worldGen", "meteoriteClusterChance", this.meteoriteClusterChance ).getDouble( this.meteoriteClusterChance );
|
||||
this.meteoriteSpawnChance = this.get( "worldGen", "meteoriteSpawnChance", this.meteoriteSpawnChance ).getDouble( this.meteoriteSpawnChance );
|
||||
this.meteoriteMaximumSpawnHeight = this.get( "worldGen", "meteoriteMaximumSpawnHeight", this.meteoriteMaximumSpawnHeight ).getInt(
|
||||
this.meteoriteMaximumSpawnHeight );
|
||||
this.meteoriteDimensionWhitelist = this.get( "worldGen", "meteoriteDimensionWhitelist", this.meteoriteDimensionWhitelist ).getIntList();
|
||||
|
||||
this.quartzOresPerCluster = this.get( "worldGen", "quartzOresPerCluster", this.quartzOresPerCluster ).getInt( this.quartzOresPerCluster );
|
||||
@@ -147,16 +173,20 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
|
||||
this.minMeteoriteDistanceSq = this.minMeteoriteDistance * this.minMeteoriteDistance;
|
||||
|
||||
this.addCustomCategoryComment( "wireless", "Range= WirelessBaseRange + WirelessBoosterRangeMultiplier * Math.pow( boosters, WirelessBoosterExp )\nPowerDrain= WirelessBaseCost + WirelessCostMultiplier * Math.pow( boosters, 1 + boosters / WirelessHighWirelessCount )" );
|
||||
this.addCustomCategoryComment( "wireless",
|
||||
"Range= wirelessBaseRange + wirelessBoosterRangeMultiplier * Math.pow( boosters, wirelessBoosterExp )\nPowerDrain= wirelessBaseCost + wirelessCostMultiplier * Math.pow( boosters, 1 + boosters / wirelessHighWirelessCount )" );
|
||||
|
||||
this.WirelessBaseCost = this.get( "wireless", "WirelessBaseCost", this.WirelessBaseCost ).getDouble( this.WirelessBaseCost );
|
||||
this.WirelessCostMultiplier = this.get( "wireless", "WirelessCostMultiplier", this.WirelessCostMultiplier ).getDouble( this.WirelessCostMultiplier );
|
||||
this.WirelessBaseRange = this.get( "wireless", "WirelessBaseRange", this.WirelessBaseRange ).getDouble( this.WirelessBaseRange );
|
||||
this.WirelessBoosterRangeMultiplier = this.get( "wireless", "WirelessBoosterRangeMultiplier", this.WirelessBoosterRangeMultiplier ).getDouble( this.WirelessBoosterRangeMultiplier );
|
||||
this.WirelessBoosterExp = this.get( "wireless", "WirelessBoosterExp", this.WirelessBoosterExp ).getDouble( this.WirelessBoosterExp );
|
||||
this.WirelessTerminalDrainMultiplier = this.get( "wireless", "WirelessTerminalDrainMultiplier", this.WirelessTerminalDrainMultiplier ).getDouble( this.WirelessTerminalDrainMultiplier );
|
||||
this.wirelessBaseCost = this.get( "wireless", "wirelessBaseCost", this.wirelessBaseCost ).getDouble( this.wirelessBaseCost );
|
||||
this.wirelessCostMultiplier = this.get( "wireless", "wirelessCostMultiplier", this.wirelessCostMultiplier ).getDouble( this.wirelessCostMultiplier );
|
||||
this.wirelessBaseRange = this.get( "wireless", "wirelessBaseRange", this.wirelessBaseRange ).getDouble( this.wirelessBaseRange );
|
||||
this.wirelessBoosterRangeMultiplier = this.get( "wireless", "wirelessBoosterRangeMultiplier", this.wirelessBoosterRangeMultiplier ).getDouble(
|
||||
this.wirelessBoosterRangeMultiplier );
|
||||
this.wirelessBoosterExp = this.get( "wireless", "wirelessBoosterExp", this.wirelessBoosterExp ).getDouble( this.wirelessBoosterExp );
|
||||
this.wirelessTerminalDrainMultiplier = this.get( "wireless", "wirelessTerminalDrainMultiplier", this.wirelessTerminalDrainMultiplier ).getDouble(
|
||||
this.wirelessTerminalDrainMultiplier );
|
||||
|
||||
this.formationPlaneEntityLimit = this.get( "automation", "formationPlaneEntityLimit", this.formationPlaneEntityLimit ).getInt( this.formationPlaneEntityLimit );
|
||||
this.formationPlaneEntityLimit = this.get( "automation", "formationPlaneEntityLimit", this.formationPlaneEntityLimit ).getInt(
|
||||
this.formationPlaneEntityLimit );
|
||||
|
||||
this.wirelessTerminalBattery = this.get( "battery", "wirelessTerminal", this.wirelessTerminalBattery ).getInt( this.wirelessTerminalBattery );
|
||||
this.chargedStaffBattery = this.get( "battery", "chargedStaff", this.chargedStaffBattery ).getInt( this.chargedStaffBattery );
|
||||
@@ -171,7 +201,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
{
|
||||
if( feature.isVisible() )
|
||||
{
|
||||
if( this.get( "Features." + feature.category, feature.name(), feature.defaultValue ).getBoolean( feature.defaultValue ) )
|
||||
if( this.get( "Features." + feature.category(), feature.key(), feature.isEnabled() ).getBoolean( feature.isEnabled() ) )
|
||||
{
|
||||
this.featureFlags.add( feature );
|
||||
}
|
||||
@@ -188,13 +218,14 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
final List<String> version = Arrays.asList( "59.0.0", "59.0.1", "59.0.2" );
|
||||
if( version.contains( imb.getVersion() ) )
|
||||
{
|
||||
this.featureFlags.remove( AEFeature.AlphaPass );
|
||||
this.featureFlags.remove( AEFeature.ALPHA_PASS );
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
this.selectedPowerUnit = PowerUnits.valueOf( this.get( "Client", "PowerUnit", this.selectedPowerUnit.name(), this.getListComment( this.selectedPowerUnit ) ).getString() );
|
||||
this.selectedPowerUnit = PowerUnits.valueOf(
|
||||
this.get( "Client", "PowerUnit", this.selectedPowerUnit.name(), this.getListComment( this.selectedPowerUnit ) ).getString() );
|
||||
}
|
||||
catch( final Throwable t )
|
||||
{
|
||||
@@ -206,22 +237,34 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
tr.Load( this );
|
||||
}
|
||||
|
||||
if( this.isFeatureEnabled( AEFeature.SpatialIO ) )
|
||||
if( this.isFeatureEnabled( AEFeature.SPATIAL_IO ) )
|
||||
{
|
||||
this.storageBiomeID = this.get( "spatialio", "storageBiomeID", this.storageBiomeID ).getInt( this.storageBiomeID );
|
||||
this.storageProviderID = this.get( "spatialio", "storageProviderID", this.storageProviderID ).getInt( this.storageProviderID );
|
||||
this.spatialPowerMultiplier = this.get( "spatialio", "spatialPowerMultiplier", this.spatialPowerMultiplier ).getDouble( this.spatialPowerMultiplier );
|
||||
this.spatialPowerMultiplier = this.get( "spatialio", "spatialPowerMultiplier", this.spatialPowerMultiplier ).getDouble(
|
||||
this.spatialPowerMultiplier );
|
||||
this.spatialPowerExponent = this.get( "spatialio", "spatialPowerExponent", this.spatialPowerExponent ).getDouble( this.spatialPowerExponent );
|
||||
}
|
||||
|
||||
if( this.isFeatureEnabled( AEFeature.CraftingCPU ) )
|
||||
if( this.isFeatureEnabled( AEFeature.CRAFTING_CPU ) )
|
||||
{
|
||||
this.craftingCalculationTimePerTick = this.get( "craftingCPU", "craftingCalculationTimePerTick", this.craftingCalculationTimePerTick ).getInt( this.craftingCalculationTimePerTick );
|
||||
this.craftingCalculationTimePerTick = this.get( "craftingCPU", "craftingCalculationTimePerTick", this.craftingCalculationTimePerTick ).getInt(
|
||||
this.craftingCalculationTimePerTick );
|
||||
}
|
||||
|
||||
this.updatable = true;
|
||||
}
|
||||
|
||||
public static void init( final File configFile )
|
||||
{
|
||||
instance = new AEConfig( configFile );
|
||||
}
|
||||
|
||||
public static AEConfig instance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void clientSync()
|
||||
{
|
||||
this.disableColoredCableRecipesInJEI = this.get( "Client", "disableColoredCableRecipesInJEI", true ).getBoolean( true );
|
||||
@@ -308,17 +351,17 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
|
||||
public double wireless_getDrainRate( final double range )
|
||||
{
|
||||
return this.WirelessTerminalDrainMultiplier * range;
|
||||
return this.wirelessTerminalDrainMultiplier * range;
|
||||
}
|
||||
|
||||
public double wireless_getMaxRange( final int boosters )
|
||||
{
|
||||
return this.WirelessBaseRange + this.WirelessBoosterRangeMultiplier * Math.pow( boosters, this.WirelessBoosterExp );
|
||||
return this.wirelessBaseRange + this.wirelessBoosterRangeMultiplier * Math.pow( boosters, this.wirelessBoosterExp );
|
||||
}
|
||||
|
||||
public double wireless_getPowerDrain( final int boosters )
|
||||
{
|
||||
return this.WirelessBaseCost + this.WirelessCostMultiplier * Math.pow( boosters, 1 + boosters / this.WirelessHighWirelessCount );
|
||||
return this.wirelessBaseCost + this.wirelessCostMultiplier * Math.pow( boosters, 1 + boosters / this.wirelessHighWirelessCount );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -340,7 +383,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
@Override
|
||||
public void save()
|
||||
{
|
||||
if( this.isFeatureEnabled( AEFeature.SpatialIO ) )
|
||||
if( this.isFeatureEnabled( AEFeature.SPATIAL_IO ) )
|
||||
{
|
||||
this.get( "spatialio", "storageBiomeID", this.storageBiomeID ).set( this.storageBiomeID );
|
||||
this.get( "spatialio", "storageProviderID", this.storageProviderID ).set( this.storageProviderID );
|
||||
@@ -375,12 +418,13 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
|
||||
public boolean useAEVersion( final MaterialType mt )
|
||||
{
|
||||
if( this.isFeatureEnabled( AEFeature.WebsiteRecipes ) )
|
||||
if( this.isFeatureEnabled( AEFeature.WEBSITE_RECIPES ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
this.setCategoryComment( "OreCamouflage", "AE2 Automatically uses alternative ores present in your instance of MC to blend better with its surroundings, if you prefer you can disable this selectively using these flags; Its important to note, that some if these items even if enabled may not be craftable in game because other items are overriding their recipes." );
|
||||
this.setCategoryComment( "OreCamouflage",
|
||||
"AE2 Automatically uses alternative ores present in your instance of MC to blend better with its surroundings, if you prefer you can disable this selectively using these flags; Its important to note, that some if these items even if enabled may not be craftable in game because other items are overriding their recipes." );
|
||||
final Property p = this.get( "OreCamouflage", mt.name(), true );
|
||||
p.setComment( "OreDictionary Names: " + mt.getOreName() );
|
||||
|
||||
@@ -506,4 +550,212 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
this.selectedPowerUnit = Platform.rotateEnum( this.selectedPowerUnit, backwards, Settings.POWER_UNITS.getPossibleValues() );
|
||||
this.save();
|
||||
}
|
||||
|
||||
// Getters
|
||||
public boolean isRemoveCrashingItemsOnLoad()
|
||||
{
|
||||
return removeCrashingItemsOnLoad;
|
||||
}
|
||||
|
||||
public int getFormationPlaneEntityLimit()
|
||||
{
|
||||
return formationPlaneEntityLimit;
|
||||
}
|
||||
|
||||
public boolean isEnableEffects()
|
||||
{
|
||||
return enableEffects;
|
||||
}
|
||||
|
||||
public boolean isUseLargeFonts()
|
||||
{
|
||||
return useLargeFonts;
|
||||
}
|
||||
|
||||
public boolean isUseColoredCraftingStatus()
|
||||
{
|
||||
return useColoredCraftingStatus;
|
||||
}
|
||||
|
||||
public boolean isDisableColoredCableRecipesInJEI()
|
||||
{
|
||||
return disableColoredCableRecipesInJEI;
|
||||
}
|
||||
|
||||
public int getCraftingCalculationTimePerTick()
|
||||
{
|
||||
return craftingCalculationTimePerTick;
|
||||
}
|
||||
|
||||
public PowerUnits getSelectedPowerUnit()
|
||||
{
|
||||
return selectedPowerUnit;
|
||||
}
|
||||
|
||||
public int[] getCraftByStacks()
|
||||
{
|
||||
return craftByStacks;
|
||||
}
|
||||
|
||||
public int[] getPriorityByStacks()
|
||||
{
|
||||
return priorityByStacks;
|
||||
}
|
||||
|
||||
public int[] getLevelByStacks()
|
||||
{
|
||||
return levelByStacks;
|
||||
}
|
||||
|
||||
public int getStorageBiomeID()
|
||||
{
|
||||
return storageBiomeID;
|
||||
}
|
||||
|
||||
public int getStorageProviderID()
|
||||
{
|
||||
return storageProviderID;
|
||||
}
|
||||
|
||||
public double getSpatialPowerExponent()
|
||||
{
|
||||
return spatialPowerExponent;
|
||||
}
|
||||
|
||||
public double getSpatialPowerMultiplier()
|
||||
{
|
||||
return spatialPowerMultiplier;
|
||||
}
|
||||
|
||||
public String[] getGrinderOres()
|
||||
{
|
||||
return grinderOres;
|
||||
}
|
||||
|
||||
public double getOreDoublePercentage()
|
||||
{
|
||||
return oreDoublePercentage;
|
||||
}
|
||||
|
||||
public int getWirelessTerminalBattery()
|
||||
{
|
||||
return wirelessTerminalBattery;
|
||||
}
|
||||
|
||||
public int getEntropyManipulatorBattery()
|
||||
{
|
||||
return entropyManipulatorBattery;
|
||||
}
|
||||
|
||||
public int getMatterCannonBattery()
|
||||
{
|
||||
return matterCannonBattery;
|
||||
}
|
||||
|
||||
public int getPortableCellBattery()
|
||||
{
|
||||
return portableCellBattery;
|
||||
}
|
||||
|
||||
public int getColorApplicatorBattery()
|
||||
{
|
||||
return colorApplicatorBattery;
|
||||
}
|
||||
|
||||
public int getChargedStaffBattery()
|
||||
{
|
||||
return chargedStaffBattery;
|
||||
}
|
||||
|
||||
public float getSpawnChargedChance()
|
||||
{
|
||||
return spawnChargedChance;
|
||||
}
|
||||
|
||||
public int getQuartzOresPerCluster()
|
||||
{
|
||||
return quartzOresPerCluster;
|
||||
}
|
||||
|
||||
public int getQuartzOresClusterAmount()
|
||||
{
|
||||
return quartzOresClusterAmount;
|
||||
}
|
||||
|
||||
public int getChargedChange()
|
||||
{
|
||||
return chargedChange;
|
||||
}
|
||||
|
||||
public int getMinMeteoriteDistance()
|
||||
{
|
||||
return minMeteoriteDistance;
|
||||
}
|
||||
|
||||
public int getMinMeteoriteDistanceSq()
|
||||
{
|
||||
return minMeteoriteDistanceSq;
|
||||
}
|
||||
|
||||
public double getMeteoriteClusterChance()
|
||||
{
|
||||
return meteoriteClusterChance;
|
||||
}
|
||||
|
||||
public int getMeteoriteMaximumSpawnHeight()
|
||||
{
|
||||
return meteoriteMaximumSpawnHeight;
|
||||
}
|
||||
|
||||
public int[] getMeteoriteDimensionWhitelist()
|
||||
{
|
||||
return meteoriteDimensionWhitelist;
|
||||
}
|
||||
|
||||
public double getWirelessBaseCost()
|
||||
{
|
||||
return wirelessBaseCost;
|
||||
}
|
||||
|
||||
public double getWirelessCostMultiplier()
|
||||
{
|
||||
return wirelessCostMultiplier;
|
||||
}
|
||||
|
||||
public double getWirelessTerminalDrainMultiplier()
|
||||
{
|
||||
return wirelessTerminalDrainMultiplier;
|
||||
}
|
||||
|
||||
public double getWirelessBaseRange()
|
||||
{
|
||||
return wirelessBaseRange;
|
||||
}
|
||||
|
||||
public double getWirelessBoosterRangeMultiplier()
|
||||
{
|
||||
return wirelessBoosterRangeMultiplier;
|
||||
}
|
||||
|
||||
public double getWirelessBoosterExp()
|
||||
{
|
||||
return wirelessBoosterExp;
|
||||
}
|
||||
|
||||
public double getWirelessHighWirelessCount()
|
||||
{
|
||||
return wirelessHighWirelessCount;
|
||||
}
|
||||
|
||||
// Setters keep visibility as low as possible.
|
||||
|
||||
void setStorageBiomeID( int id )
|
||||
{
|
||||
this.storageBiomeID = id;
|
||||
}
|
||||
|
||||
void setStorageProviderID( int id )
|
||||
{
|
||||
this.storageProviderID = id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class AELog
|
||||
*/
|
||||
public static boolean isLogEnabled()
|
||||
{
|
||||
return AEConfig.instance == null || AEConfig.instance.isFeatureEnabled( AEFeature.Logging );
|
||||
return AEConfig.instance() == null || AEConfig.instance().isFeatureEnabled( AEFeature.LOGGING );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,7 +278,7 @@ public final class AELog
|
||||
*/
|
||||
public static boolean isDebugLogEnabled()
|
||||
{
|
||||
return AEConfig.instance.isFeatureEnabled( AEFeature.DebugLogging );
|
||||
return AEConfig.instance().isFeatureEnabled( AEFeature.DEBUG_LOGGING );
|
||||
}
|
||||
|
||||
//
|
||||
@@ -292,7 +292,7 @@ public final class AELog
|
||||
*/
|
||||
public static void grinder( @Nonnull final String message )
|
||||
{
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.GrinderLogging ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.GRINDER_LOGGING ) )
|
||||
{
|
||||
log( Level.DEBUG, "grinder: " + message );
|
||||
}
|
||||
@@ -305,7 +305,7 @@ public final class AELog
|
||||
*/
|
||||
public static void integration( @Nonnull final Throwable exception )
|
||||
{
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.IntegrationLogging ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.INTEGRATION_LOGGING ) )
|
||||
{
|
||||
debug( exception );
|
||||
}
|
||||
@@ -322,7 +322,7 @@ public final class AELog
|
||||
*/
|
||||
public static void blockUpdate( @Nonnull final BlockPos pos, @Nonnull final AEBaseTile aeBaseTile )
|
||||
{
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.UpdateLogging ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.UPDATE_LOGGING ) )
|
||||
{
|
||||
info( BLOCK_UPDATE, aeBaseTile.getClass().getName(), pos );
|
||||
}
|
||||
@@ -337,7 +337,7 @@ public final class AELog
|
||||
*/
|
||||
public static boolean isCraftingLogEnabled()
|
||||
{
|
||||
return AEConfig.instance.isFeatureEnabled( AEFeature.CraftingLog );
|
||||
return AEConfig.instance().isFeatureEnabled( AEFeature.CRAFTING_LOG );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -366,7 +366,7 @@ public final class AELog
|
||||
*/
|
||||
public static boolean isCraftingDebugLogEnabled()
|
||||
{
|
||||
return AEConfig.instance.isFeatureEnabled( AEFeature.CraftingLog ) && AEConfig.instance.isFeatureEnabled( AEFeature.DebugLogging );
|
||||
return AEConfig.instance().isFeatureEnabled( AEFeature.CRAFTING_LOG ) && AEConfig.instance().isFeatureEnabled( AEFeature.DEBUG_LOGGING );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,10 +78,10 @@ public final class AppEng
|
||||
|
||||
// depend on version of forge used for build.
|
||||
"after:appliedenergistics2-core;" + "required-after:Forge@[" // require forge.
|
||||
+ net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",)"; // buildVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",)"; // buildVersion
|
||||
|
||||
@Nonnull
|
||||
private static final AppEng INSTANCE = new AppEng();
|
||||
@@ -141,8 +141,9 @@ public final class AppEng
|
||||
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 );
|
||||
AEConfig.init( configFile );
|
||||
FacadeConfig.init( facadeFile );
|
||||
|
||||
final VersionCheckerConfig versionCheckerConfig = new VersionCheckerConfig( versionFile );
|
||||
this.customRecipeConfig = new CustomRecipeForgeConfiguration( recipeConfiguration );
|
||||
this.exportConfig = new ForgeExportConfig( recipeConfiguration );
|
||||
@@ -150,7 +151,7 @@ public final class AppEng
|
||||
AELog.info( "Pre Initialization ( started )" );
|
||||
|
||||
CreativeTab.init();
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.FACADES ) )
|
||||
{
|
||||
CreativeTabFacade.init();
|
||||
}
|
||||
@@ -174,8 +175,7 @@ public final class AppEng
|
||||
|
||||
// Instantiate all Plugins
|
||||
List<Object> injectables = Lists.newArrayList(
|
||||
AEApi.instance()
|
||||
);
|
||||
AEApi.instance() );
|
||||
new PluginLoader().loadPlugins( injectables, event.getAsmData() );
|
||||
}
|
||||
|
||||
@@ -226,10 +226,10 @@ public final class AppEng
|
||||
FMLCommonHandler.instance().registerCrashCallable( new IntegrationCrashEnhancement() );
|
||||
|
||||
CommonHelper.proxy.postInit();
|
||||
AEConfig.instance.save();
|
||||
AEConfig.instance().save();
|
||||
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler );
|
||||
NetworkHandler.instance = new NetworkHandler( "AE2" );
|
||||
NetworkHandler.init( "AE2" );
|
||||
|
||||
AELog.info( "Post Initialization ( ended after " + start.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class CreativeTab extends CreativeTabs
|
||||
final IItems items = definitions.items();
|
||||
final IMaterials materials = definitions.materials();
|
||||
|
||||
return this.findFirst( blocks.controller(), blocks.chest(), blocks.cellWorkbench(), blocks.fluixBlock(), items.cell1k(), items.networkTool(), materials.fluixCrystal(), materials.certusQuartzCrystal() );
|
||||
return this.findFirst( blocks.controller(), blocks.chest(), blocks.cellWorkbench(), blocks.fluixBlock(), items.cell1k(), items.networkTool(), materials.fluixCrystal(), materials.certusQuartzCrystal(), materials.skyDust() );
|
||||
}
|
||||
|
||||
private ItemStack findFirst( final IItemDefinition... choices )
|
||||
|
||||
@@ -33,7 +33,8 @@ import net.minecraftforge.common.config.Configuration;
|
||||
public class FacadeConfig extends Configuration
|
||||
{
|
||||
|
||||
public static FacadeConfig instance;
|
||||
private static FacadeConfig instance;
|
||||
|
||||
private final Pattern replacementPattern;
|
||||
|
||||
public FacadeConfig( final File facadeFile )
|
||||
@@ -42,6 +43,16 @@ public class FacadeConfig extends Configuration
|
||||
this.replacementPattern = Pattern.compile( "[^a-zA-Z0-9]" );
|
||||
}
|
||||
|
||||
public static void init( final File configFile )
|
||||
{
|
||||
instance = new FacadeConfig( configFile );
|
||||
}
|
||||
|
||||
public static FacadeConfig instance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
|
||||
public boolean checkEnabled( final Block id, final int metadata, final boolean automatic )
|
||||
{
|
||||
if( id == null )
|
||||
|
||||
@@ -149,42 +149,42 @@ public final class Registration
|
||||
|
||||
private void registerSpatial( final boolean force )
|
||||
{
|
||||
if( !AEConfig.instance.isFeatureEnabled( AEFeature.SpatialIO ) )
|
||||
if( !AEConfig.instance().isFeatureEnabled( AEFeature.SPATIAL_IO ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final AEConfig config = AEConfig.instance;
|
||||
final AEConfig config = AEConfig.instance();
|
||||
|
||||
if( this.storageBiome == null )
|
||||
{
|
||||
if( force && config.storageBiomeID == -1 )
|
||||
if( force && config.getStorageBiomeID() == -1 )
|
||||
{
|
||||
config.storageBiomeID = Platform.findEmpty( Biome.REGISTRY, 0, 256 );
|
||||
if( config.storageBiomeID == -1 )
|
||||
config.setStorageBiomeID( Platform.findEmpty( Biome.REGISTRY, 0, 256 ) );
|
||||
if( config.getStorageBiomeID() == -1 )
|
||||
{
|
||||
throw new IllegalStateException( "Biome Array is full, please free up some Biome ID's or disable spatial." );
|
||||
}
|
||||
|
||||
this.storageBiome = new BiomeGenStorage();
|
||||
Biome.registerBiome( config.storageBiomeID, "appliedenergistics2:storage_biome", this.storageBiome );
|
||||
Biome.registerBiome( config.getStorageBiomeID(), "appliedenergistics2:storage_biome", this.storageBiome );
|
||||
config.save();
|
||||
}
|
||||
|
||||
if( !force && config.storageBiomeID != -1 )
|
||||
if( !force && config.getStorageBiomeID() != -1 )
|
||||
{
|
||||
this.storageBiome = new BiomeGenStorage();
|
||||
Biome.registerBiome( config.storageBiomeID, "appliedenergistics2:storage_biome", this.storageBiome );
|
||||
Biome.registerBiome( config.getStorageBiomeID(), "appliedenergistics2:storage_biome", this.storageBiome );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if( config.storageProviderID != -1 )
|
||||
if( config.getStorageProviderID() != -1 )
|
||||
{
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.storageProviderID, StorageWorldProvider.class, false );
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
|
||||
}
|
||||
|
||||
if( config.storageProviderID == -1 && force )
|
||||
if( config.getStorageProviderID() == -1 && force )
|
||||
{
|
||||
final Set<Integer> ids = new HashSet<>();
|
||||
for( DimensionType type : DimensionType.values() )
|
||||
@@ -192,14 +192,14 @@ public final class Registration
|
||||
ids.add( type.getId() );
|
||||
}
|
||||
|
||||
config.storageProviderID = -11;
|
||||
config.setStorageProviderID( -11 );
|
||||
|
||||
while( ids.contains( config.storageProviderID ) )
|
||||
while( ids.contains( config.getStorageProviderID() ) )
|
||||
{
|
||||
config.storageProviderID--;
|
||||
config.setStorageProviderID( config.getStorageProviderID() - 1 );
|
||||
}
|
||||
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.storageProviderID, StorageWorldProvider.class, false );
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
|
||||
|
||||
config.save();
|
||||
}
|
||||
@@ -264,10 +264,9 @@ public final class Registration
|
||||
|
||||
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
||||
|
||||
|
||||
MinecraftForge.EVENT_BUS.register( new PartPlacement() );
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.ChestLoot ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.CHEST_LOOT ) )
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register( new ChestLoot() );
|
||||
}
|
||||
@@ -285,8 +284,7 @@ public final class Registration
|
||||
registries.cell().addCellHandler( new BasicCellHandler() );
|
||||
registries.cell().addCellHandler( new CreativeCellHandler() );
|
||||
|
||||
api.definitions().materials().matterBall().maybeStack( 1 ).ifPresent( ammoStack ->
|
||||
{
|
||||
api.definitions().materials().matterBall().maybeStack( 1 ).ifPresent( ammoStack -> {
|
||||
final double weight = 32;
|
||||
|
||||
registries.matterCannon().registerAmmo( ammoStack, weight );
|
||||
@@ -294,17 +292,17 @@ public final class Registration
|
||||
|
||||
this.recipeHandler.injectRecipes();
|
||||
|
||||
final PlayerStatsRegistration registration = new PlayerStatsRegistration( MinecraftForge.EVENT_BUS, AEConfig.instance );
|
||||
final PlayerStatsRegistration registration = new PlayerStatsRegistration( MinecraftForge.EVENT_BUS, AEConfig.instance() );
|
||||
registration.registerAchievementHandlers();
|
||||
registration.registerAchievements();
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.EnableDisassemblyCrafting ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.ENABLE_DISASSEMBLY_CRAFTING ) )
|
||||
{
|
||||
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.ENABLE_FACADE_CRAFTING ) )
|
||||
{
|
||||
definitions.items().facade().maybeItem().ifPresent( facadeItem -> {
|
||||
GameRegistry.addRecipe( new FacadeRecipe( (ItemFacade) facadeItem ) );
|
||||
@@ -398,24 +396,23 @@ public final class Registration
|
||||
// Inscriber
|
||||
Upgrades.SPEED.registerItem( blocks.inscriber(), 3 );
|
||||
|
||||
items.wirelessTerminal().maybeItem().ifPresent( terminal ->
|
||||
{
|
||||
items.wirelessTerminal().maybeItem().ifPresent( terminal -> {
|
||||
registries.wireless().registerWirelessHandler( (IWirelessTermHandler) terminal );
|
||||
} );
|
||||
|
||||
// add villager trading to black smiths for a few basic materials
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.VillagerTrading ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.VILLAGER_TRADING ) )
|
||||
{
|
||||
// TODO: VILLAGER TRADING
|
||||
// VillagerRegistry.instance().getRegisteredVillagers()..registerVillageTradeHandler( 3, new AETrading() );
|
||||
}
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.CertusQuartzWorldGen ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.CERTUS_QUARTZ_WORLD_GEN ) )
|
||||
{
|
||||
GameRegistry.registerWorldGenerator( new QuartzWorldGen(), 0 );
|
||||
}
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.MeteoriteWorldGen ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.METEORITE_WORLD_GEN ) )
|
||||
{
|
||||
GameRegistry.registerWorldGenerator( new MeteoriteWorldGen(), 0 );
|
||||
}
|
||||
@@ -470,7 +467,7 @@ public final class Registration
|
||||
}
|
||||
|
||||
// whitelist from config
|
||||
for( final int dimension : AEConfig.instance.meteoriteDimensionWhitelist )
|
||||
for( final int dimension : AEConfig.instance().getMeteoriteDimensionWhitelist() )
|
||||
{
|
||||
registries.worldgen().enableWorldGenForDimension( WorldGenType.METEORITES, dimension );
|
||||
}
|
||||
|
||||
@@ -203,20 +203,22 @@ public final class ApiBlocks implements IBlocks
|
||||
{
|
||||
// this.quartzOre = new BlockDefinition( "ore.quartz", new OreQuartz() );
|
||||
this.quartzOre = registry.block( "quartz_ore", BlockQuartzOre::new )
|
||||
.features( AEFeature.CERTUS_ORE )
|
||||
.postInit( ( block, item ) ->
|
||||
{
|
||||
OreDictionary.registerOre( "oreCertusQuartz", new ItemStack( block ) );
|
||||
} )
|
||||
.build();
|
||||
this.quartzOreCharged = registry.block( "charged_quartz_ore", BlockChargedQuartzOre::new )
|
||||
.features( AEFeature.CERTUS_ORE, AEFeature.CHARGED_CERTUS_ORE )
|
||||
.postInit( ( block, item ) ->
|
||||
{
|
||||
OreDictionary.registerOre( "oreCertusQuartz", new ItemStack( block ) );
|
||||
} )
|
||||
.build();
|
||||
this.matrixFrame = registry.block( "matrix_frame", BlockMatrixFrame::new ).features( AEFeature.SpatialIO ).build();
|
||||
this.matrixFrame = registry.block( "matrix_frame", BlockMatrixFrame::new ).features( AEFeature.SPATIAL_IO ).build();
|
||||
|
||||
FeatureFactory deco = registry.features( AEFeature.DecorativeQuartzBlocks );
|
||||
FeatureFactory deco = registry.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS );
|
||||
this.quartzBlock = deco.block( "quartz_block", BlockQuartz::new ).build();
|
||||
this.quartzPillar = deco.block( "quartz_pillar", BlockQuartzPillar::new ).build();
|
||||
this.chiseledQuartzBlock = deco.block( "chiseled_quartz_block", BlockChiseledQuartz::new ).build();
|
||||
@@ -233,11 +235,11 @@ public final class ApiBlocks implements IBlocks
|
||||
} )
|
||||
.build();
|
||||
this.quartzVibrantGlass = deco.block( "quartz_vibrant_glass", BlockQuartzLamp::new )
|
||||
.addFeatures( AEFeature.DecorativeLights )
|
||||
.addFeatures( AEFeature.DECORATIVE_LIGHTS )
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
this.quartzFixture = registry.block( "quartz_fixture", BlockQuartzFixture::new )
|
||||
.features( AEFeature.DecorativeLights )
|
||||
.features( AEFeature.DECORATIVE_LIGHTS )
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
|
||||
@@ -248,32 +250,33 @@ public final class ApiBlocks implements IBlocks
|
||||
this.skyStoneSmallBrick = deco.block( "sky_stone_small_brick", () -> new BlockSkyStone( SkystoneType.SMALL_BRICK ) ).build();
|
||||
|
||||
this.skyStoneChest = registry.block( "sky_stone_chest", () -> new BlockSkyChest( SkyChestType.STONE ) )
|
||||
.features( AEFeature.SkyStoneChests )
|
||||
.features( AEFeature.SKY_STONE_CHESTS )
|
||||
.rendering( new SkyChestRenderingCustomizer( SkyChestType.STONE ) )
|
||||
.build();
|
||||
this.smoothSkyStoneChest = registry.block( "smooth_sky_stone_chest", () -> new BlockSkyChest( SkyChestType.BLOCK ) )
|
||||
.features( AEFeature.SkyStoneChests )
|
||||
.features( AEFeature.SKY_STONE_CHESTS )
|
||||
.rendering( new SkyChestRenderingCustomizer( SkyChestType.BLOCK ) )
|
||||
.build();
|
||||
|
||||
this.skyCompass = registry.block( "sky_compass", BlockSkyCompass::new )
|
||||
.features( AEFeature.MeteoriteCompass )
|
||||
.features( AEFeature.METEORITE_COMPASS )
|
||||
.rendering( new SkyCompassRendering() )
|
||||
.build();
|
||||
this.grindstone = registry.block( "grindstone", BlockGrinder::new ).features( AEFeature.GrindStone ).build();
|
||||
this.grindstone = registry.block( "grindstone", BlockGrinder::new ).features( AEFeature.GRIND_STONE ).build();
|
||||
this.crank = registry.block( "crank", BlockCrank::new )
|
||||
.features( AEFeature.GrindStone )
|
||||
.features( AEFeature.GRIND_STONE )
|
||||
.rendering( new CrankRendering() )
|
||||
.build();
|
||||
this.inscriber = registry.block( "inscriber", BlockInscriber::new )
|
||||
.features( AEFeature.Inscriber )
|
||||
.features( AEFeature.INSCRIBER )
|
||||
.rendering( new InscriberRendering() )
|
||||
.build();
|
||||
this.wirelessAccessPoint = registry.block( "wireless_access_point", BlockWireless::new )
|
||||
.features( AEFeature.WirelessAccessTerminal )
|
||||
.features( AEFeature.WIRELESS_ACCESS_TERMINAL )
|
||||
.rendering( new WirelessRendering() )
|
||||
.build();
|
||||
this.charger = registry.block( "charger", BlockCharger::new )
|
||||
.features( AEFeature.CHARGER )
|
||||
.rendering( new BlockRenderingCustomizer()
|
||||
{
|
||||
@Override
|
||||
@@ -284,67 +287,71 @@ public final class ApiBlocks implements IBlocks
|
||||
}
|
||||
} )
|
||||
.build();
|
||||
this.tinyTNT = registry.block( "tiny_tnt", BlockTinyTNT::new ).features( AEFeature.TinyTNT )
|
||||
this.tinyTNT = registry.block( "tiny_tnt", BlockTinyTNT::new )
|
||||
.features( AEFeature.TINY_TNT )
|
||||
.postInit( ( block, item ) ->
|
||||
{
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( item, new DispenserBehaviorTinyTNT() );
|
||||
} )
|
||||
.build();
|
||||
this.securityStation = registry.block( "security_station", BlockSecurityStation::new )
|
||||
.features( AEFeature.Security )
|
||||
.features( AEFeature.SECURITY )
|
||||
.rendering( new SecurityStationRendering() )
|
||||
.build();
|
||||
this.quantumRing = registry.block( "quantum_ring", BlockQuantumRing::new )
|
||||
.features( AEFeature.QuantumNetworkBridge )
|
||||
.features( AEFeature.QUANTUM_NETWORK_BRIDGE )
|
||||
.rendering( new QuantumBridgeRendering() )
|
||||
.build();
|
||||
this.quantumLink = registry.block( "quantum_link", BlockQuantumLinkChamber::new )
|
||||
.features( AEFeature.QuantumNetworkBridge )
|
||||
.features( AEFeature.QUANTUM_NETWORK_BRIDGE )
|
||||
.rendering( new QuantumBridgeRendering() )
|
||||
.build();
|
||||
this.spatialPylon = registry.block( "spatial_pylon", BlockSpatialPylon::new )
|
||||
.features( AEFeature.SpatialIO )
|
||||
.features( AEFeature.SPATIAL_IO )
|
||||
.useCustomItemModel()
|
||||
.rendering( new SpatialPylonRendering() )
|
||||
.build();
|
||||
this.spatialIOPort = registry.block( "spatial_io_port", BlockSpatialIOPort::new ).features( AEFeature.SpatialIO ).build();
|
||||
this.spatialIOPort = registry.block( "spatial_io_port", BlockSpatialIOPort::new ).features( AEFeature.SPATIAL_IO ).build();
|
||||
this.controller = registry.block( "controller", BlockController::new )
|
||||
.features( AEFeature.Channels )
|
||||
.features( AEFeature.CHANNELS )
|
||||
.useCustomItemModel()
|
||||
.rendering( new ControllerRendering() )
|
||||
.build();
|
||||
this.drive = registry.block( "drive", BlockDrive::new )
|
||||
.features( AEFeature.StorageCells, AEFeature.MEDrive )
|
||||
.features( AEFeature.STORAGE_CELLS, AEFeature.ME_DRIVE )
|
||||
.useCustomItemModel()
|
||||
.rendering( new DriveRendering() )
|
||||
.build();
|
||||
this.chest = registry.block( "chest", BlockChest::new )
|
||||
.features( AEFeature.StorageCells, AEFeature.MEChest )
|
||||
.features( AEFeature.STORAGE_CELLS, AEFeature.ME_CHEST )
|
||||
.useCustomItemModel()
|
||||
.rendering( new ChestRendering() )
|
||||
.build();
|
||||
this.iface = registry.block( "interface", BlockInterface::new ).build();
|
||||
this.cellWorkbench = registry.block( "cell_workbench", BlockCellWorkbench::new ).features( AEFeature.StorageCells ).build();
|
||||
this.iOPort = registry.block( "io_port", BlockIOPort::new ).features( AEFeature.StorageCells, AEFeature.IOPort ).build();
|
||||
this.condenser = registry.block( "condenser", BlockCondenser::new ).build();
|
||||
this.energyAcceptor = registry.block( "energy_acceptor", BlockEnergyAcceptor::new ).build();
|
||||
this.vibrationChamber = registry.block( "vibration_chamber", BlockVibrationChamber::new ).features( AEFeature.PowerGen ).build();
|
||||
this.quartzGrowthAccelerator = registry.block( "quartz_growth_accelerator", BlockQuartzGrowthAccelerator::new ).build();
|
||||
this.iface = registry.block( "interface", BlockInterface::new ).features( AEFeature.INTERFACE ).build();
|
||||
this.cellWorkbench = registry.block( "cell_workbench", BlockCellWorkbench::new ).features( AEFeature.STORAGE_CELLS ).build();
|
||||
this.iOPort = registry.block( "io_port", BlockIOPort::new ).features( AEFeature.STORAGE_CELLS, AEFeature.IO_PORT ).build();
|
||||
this.condenser = registry.block( "condenser", BlockCondenser::new ).features( AEFeature.CONDENSER ).build();
|
||||
this.energyAcceptor = registry.block( "energy_acceptor", BlockEnergyAcceptor::new ).features( AEFeature.ENERGY_ACCEPTOR ).build();
|
||||
this.vibrationChamber = registry.block( "vibration_chamber", BlockVibrationChamber::new ).features( AEFeature.POWER_GEN ).build();
|
||||
this.quartzGrowthAccelerator = registry.block( "quartz_growth_accelerator", BlockQuartzGrowthAccelerator::new )
|
||||
.features( AEFeature.CRYSTAL_GROWTH_ACCELERATOR )
|
||||
.build();
|
||||
this.energyCell = registry.block( "energy_cell", BlockEnergyCell::new )
|
||||
.features( AEFeature.ENERGY_CELLS )
|
||||
.item( AEBaseItemBlockChargeable::new )
|
||||
.rendering( new BlockEnergyCellRendering( new ResourceLocation( AppEng.MOD_ID, "energy_cell" ) ) )
|
||||
.build();
|
||||
this.energyCellDense = registry.block( "dense_energy_cell", BlockDenseEnergyCell::new )
|
||||
.features( AEFeature.DenseEnergyCells )
|
||||
.features( AEFeature.ENERGY_CELLS, AEFeature.DENSE_ENERGY_CELLS )
|
||||
.item( AEBaseItemBlockChargeable::new )
|
||||
.rendering( new BlockEnergyCellRendering( new ResourceLocation( AppEng.MOD_ID, "dense_energy_cell" ) ) )
|
||||
.build();
|
||||
this.energyCellCreative = registry.block( "creative_energy_cell", BlockCreativeEnergyCell::new )
|
||||
.features( AEFeature.Creative )
|
||||
.features( AEFeature.CREATIVE )
|
||||
.item( AEBaseItemBlockChargeable::new )
|
||||
.build();
|
||||
|
||||
FeatureFactory crafting = registry.features( AEFeature.CraftingCPU );
|
||||
FeatureFactory crafting = registry.features( AEFeature.CRAFTING_CPU );
|
||||
this.craftingUnit = crafting.block( "crafting_unit", () -> new BlockCraftingUnit( CraftingUnitType.UNIT ) )
|
||||
.rendering( new CraftingCubeRendering( "crafting_unit", CraftingUnitType.UNIT ) )
|
||||
.useCustomItemModel()
|
||||
@@ -378,12 +385,13 @@ public final class ApiBlocks implements IBlocks
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
|
||||
this.molecularAssembler = registry.block( "molecular_assembler", BlockMolecularAssembler::new ).features( AEFeature.MolecularAssembler ).build();
|
||||
this.lightDetector = registry.block( "light_detector", BlockLightDetector::new ).features( AEFeature.LightDetector )
|
||||
this.molecularAssembler = registry.block( "molecular_assembler", BlockMolecularAssembler::new ).features( AEFeature.MOLECULAR_ASSEMBLER ).build();
|
||||
this.lightDetector = registry.block( "light_detector", BlockLightDetector::new )
|
||||
.features( AEFeature.LIGHT_DETECTOR )
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
this.paint = registry.block( "paint", BlockPaint::new )
|
||||
.features( AEFeature.PaintBalls )
|
||||
.features( AEFeature.PAINT_BALLS )
|
||||
.rendering( new PaintRendering() )
|
||||
.build();
|
||||
|
||||
@@ -398,7 +406,8 @@ public final class ApiBlocks implements IBlocks
|
||||
|
||||
this.multiPart = registry.block( "cable_bus", BlockCableBus::new )
|
||||
.rendering( new CableBusRendering( partModels ) )
|
||||
.postInit( (block, item) -> {
|
||||
.postInit( ( block, item ) ->
|
||||
{
|
||||
( (BlockCableBus) block ).setupTile();
|
||||
} )
|
||||
.build();
|
||||
@@ -413,19 +422,19 @@ public final class ApiBlocks implements IBlocks
|
||||
this.quartzPillarSlab = makeSlab( "quartz_pillar_slab", "quartz_pillar_double_slab", registry, this.quartzPillar() );
|
||||
|
||||
this.itemGen = registry.block( "debug_item_gen", BlockItemGen::new )
|
||||
.features( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative )
|
||||
.features( AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE )
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
this.chunkLoader = registry.block( "debug_chunk_loader", BlockChunkloader::new )
|
||||
.features( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative )
|
||||
.features( AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE )
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
this.phantomNode = registry.block( "debug_phantom_node", BlockPhantomNode::new )
|
||||
.features( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative )
|
||||
.features( AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE )
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
this.cubeGenerator = registry.block( "debug_cube_gen", BlockCubeGenerator::new )
|
||||
.features( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative )
|
||||
.features( AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE )
|
||||
.useCustomItemModel()
|
||||
.build();
|
||||
}
|
||||
@@ -440,7 +449,7 @@ public final class ApiBlocks implements IBlocks
|
||||
Block block = blockDef.maybeBlock().get();
|
||||
|
||||
IBlockDefinition slabDef = registry.block( slabId, () -> new BlockSlabCommon.Half( block ) )
|
||||
.features( AEFeature.DecorativeQuartzBlocks )
|
||||
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
|
||||
.disableItem()
|
||||
.build();
|
||||
|
||||
@@ -453,7 +462,7 @@ public final class ApiBlocks implements IBlocks
|
||||
|
||||
// Reigster the double slab variant as well
|
||||
IBlockDefinition doubleSlabDef = registry.block( doubleSlabId, () -> new BlockSlabCommon.Double( slabBlock, block ) )
|
||||
.features( AEFeature.DecorativeQuartzBlocks )
|
||||
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
|
||||
.disableItem()
|
||||
.build();
|
||||
|
||||
@@ -463,7 +472,7 @@ public final class ApiBlocks implements IBlocks
|
||||
|
||||
// Make the slab item
|
||||
IItemDefinition itemDef = registry.item( slabId, () -> new ItemSlab( slabBlock, slabBlock, doubleSlabBlock ) )
|
||||
.features( AEFeature.DecorativeQuartzBlocks )
|
||||
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
|
||||
.build();
|
||||
|
||||
Verify.verify( itemDef.maybeItem().isPresent() );
|
||||
@@ -475,7 +484,7 @@ public final class ApiBlocks implements IBlocks
|
||||
private static IBlockDefinition makeStairs( String registryName, FeatureFactory registry, IBlockDefinition block )
|
||||
{
|
||||
return registry.block( registryName, () -> new BlockStairCommon( block.maybeBlock().get(), block.identifier() ) )
|
||||
.features( AEFeature.DecorativeQuartzBlocks )
|
||||
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
|
||||
.rendering( new BlockRenderingCustomizer()
|
||||
{
|
||||
@Override
|
||||
|
||||
@@ -125,85 +125,113 @@ public final class ApiItems implements IItems
|
||||
|
||||
public ApiItems( FeatureFactory registry )
|
||||
{
|
||||
FeatureFactory certusTools = registry.features( AEFeature.CertusQuartzTools );
|
||||
this.certusQuartzAxe = certusTools.item( "certus_quartz_axe", () -> new ToolQuartzAxe( AEFeature.CertusQuartzTools ) ).addFeatures( AEFeature.QuartzAxe ).build();
|
||||
this.certusQuartzHoe = certusTools.item( "certus_quartz_hoe", () -> new ToolQuartzHoe( AEFeature.CertusQuartzTools ) ).addFeatures( AEFeature.QuartzHoe ).build();
|
||||
this.certusQuartzShovel = certusTools.item( "certus_quartz_spade", () -> new ToolQuartzSpade( AEFeature.CertusQuartzTools ) ).addFeatures( AEFeature.QuartzSpade ).build();
|
||||
this.certusQuartzPick = certusTools.item( "certus_quartz_pickaxe", () -> new ToolQuartzPickaxe( AEFeature.CertusQuartzTools ) ).addFeatures( AEFeature.QuartzPickaxe ).build();
|
||||
this.certusQuartzSword = certusTools.item( "certus_quartz_sword", () -> new ToolQuartzSword( AEFeature.CertusQuartzTools ) ).addFeatures( AEFeature.QuartzSword ).build();
|
||||
this.certusQuartzWrench = certusTools.item( "certus_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QuartzWrench ).build();
|
||||
this.certusQuartzKnife = certusTools.item( "certus_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.CertusQuartzTools ) ).addFeatures( AEFeature.QuartzKnife ).build();
|
||||
FeatureFactory certusTools = registry.features( AEFeature.CERTUS_QUARTZ_TOOLS );
|
||||
this.certusQuartzAxe = certusTools.item( "certus_quartz_axe", () -> new ToolQuartzAxe( AEFeature.CERTUS_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_AXE )
|
||||
.build();
|
||||
this.certusQuartzHoe = certusTools.item( "certus_quartz_hoe", () -> new ToolQuartzHoe( AEFeature.CERTUS_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_HOE )
|
||||
.build();
|
||||
this.certusQuartzShovel = certusTools.item( "certus_quartz_spade", () -> new ToolQuartzSpade( AEFeature.CERTUS_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_SPADE )
|
||||
.build();
|
||||
this.certusQuartzPick = certusTools.item( "certus_quartz_pickaxe", () -> new ToolQuartzPickaxe( AEFeature.CERTUS_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_PICKAXE )
|
||||
.build();
|
||||
this.certusQuartzSword = certusTools.item( "certus_quartz_sword", () -> new ToolQuartzSword( AEFeature.CERTUS_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_SWORD )
|
||||
.build();
|
||||
this.certusQuartzWrench = certusTools.item( "certus_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QUARTZ_WRENCH ).build();
|
||||
this.certusQuartzKnife = certusTools.item( "certus_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.CERTUS_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_KNIFE )
|
||||
.build();
|
||||
|
||||
FeatureFactory netherTools = registry.features( AEFeature.NetherQuartzTools );
|
||||
this.netherQuartzAxe = netherTools.item( "nether_quartz_axe", () -> new ToolQuartzAxe( AEFeature.NetherQuartzTools ) ).addFeatures( AEFeature.QuartzAxe ).build();
|
||||
this.netherQuartzHoe = netherTools.item( "nether_quartz_hoe", () -> new ToolQuartzHoe( AEFeature.NetherQuartzTools ) ).addFeatures( AEFeature.QuartzHoe ).build();
|
||||
this.netherQuartzShovel = netherTools.item( "nether_quartz_spade", () -> new ToolQuartzSpade( AEFeature.NetherQuartzTools ) ).addFeatures( AEFeature.QuartzSpade ).build();
|
||||
this.netherQuartzPick = netherTools.item( "nether_quartz_pickaxe", () -> new ToolQuartzPickaxe( AEFeature.NetherQuartzTools ) ).addFeatures( AEFeature.QuartzPickaxe ).build();
|
||||
this.netherQuartzSword = netherTools.item( "nether_quartz_sword", () -> new ToolQuartzSword( AEFeature.NetherQuartzTools ) ).addFeatures( AEFeature.QuartzSword ).build();
|
||||
this.netherQuartzWrench = netherTools.item( "nether_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QuartzWrench ).build();
|
||||
this.netherQuartzKnife = netherTools.item( "nether_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.NetherQuartzTools ) ).addFeatures( AEFeature.QuartzKnife ).build();
|
||||
FeatureFactory netherTools = registry.features( AEFeature.NETHER_QUARTZ_TOOLS );
|
||||
this.netherQuartzAxe = netherTools.item( "nether_quartz_axe", () -> new ToolQuartzAxe( AEFeature.NETHER_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_AXE )
|
||||
.build();
|
||||
this.netherQuartzHoe = netherTools.item( "nether_quartz_hoe", () -> new ToolQuartzHoe( AEFeature.NETHER_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_HOE )
|
||||
.build();
|
||||
this.netherQuartzShovel = netherTools.item( "nether_quartz_spade", () -> new ToolQuartzSpade( AEFeature.NETHER_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_SPADE )
|
||||
.build();
|
||||
this.netherQuartzPick = netherTools.item( "nether_quartz_pickaxe", () -> new ToolQuartzPickaxe( AEFeature.NETHER_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_PICKAXE )
|
||||
.build();
|
||||
this.netherQuartzSword = netherTools.item( "nether_quartz_sword", () -> new ToolQuartzSword( AEFeature.NETHER_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_SWORD )
|
||||
.build();
|
||||
this.netherQuartzWrench = netherTools.item( "nether_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QUARTZ_WRENCH ).build();
|
||||
this.netherQuartzKnife = netherTools.item( "nether_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.NETHER_QUARTZ_TOOLS ) )
|
||||
.addFeatures( AEFeature.QUARTZ_KNIFE )
|
||||
.build();
|
||||
|
||||
FeatureFactory powerTools = registry.features( AEFeature.PoweredTools );
|
||||
FeatureFactory powerTools = registry.features( AEFeature.POWERED_TOOLS );
|
||||
this.entropyManipulator = powerTools.item( "entropy_manipulator", ToolEntropyManipulator::new )
|
||||
.addFeatures( AEFeature.EntropyManipulator )
|
||||
.addFeatures( AEFeature.ENTROPY_MANIPULATOR )
|
||||
.dispenserBehavior( DispenserBlockTool::new )
|
||||
.build();
|
||||
this.wirelessTerminal = powerTools.item( "wireless_terminal", ToolWirelessTerminal::new ).addFeatures( AEFeature.WirelessAccessTerminal ).build();
|
||||
this.chargedStaff = powerTools.item( "charged_staff", ToolChargedStaff::new ).addFeatures( AEFeature.ChargedStaff ).build();
|
||||
this.wirelessTerminal = powerTools.item( "wireless_terminal", ToolWirelessTerminal::new ).addFeatures( AEFeature.WIRELESS_ACCESS_TERMINAL ).build();
|
||||
this.chargedStaff = powerTools.item( "charged_staff", ToolChargedStaff::new ).addFeatures( AEFeature.CHARGED_STAFF ).build();
|
||||
this.massCannon = powerTools.item( "matter_cannon", ToolMatterCannon::new )
|
||||
.addFeatures( AEFeature.MatterCannon )
|
||||
.addFeatures( AEFeature.MATTER_CANNON )
|
||||
.dispenserBehavior( DispenserMatterCannon::new )
|
||||
.build();
|
||||
this.portableCell = powerTools.item( "portable_cell", ToolPortableCell::new ).addFeatures( AEFeature.PortableCell, AEFeature.StorageCells ).build();
|
||||
this.portableCell = powerTools.item( "portable_cell", ToolPortableCell::new ).addFeatures( AEFeature.PORTABLE_CELL, AEFeature.STORAGE_CELLS ).build();
|
||||
this.colorApplicator = powerTools.item( "color_applicator", ToolColorApplicator::new )
|
||||
.addFeatures( AEFeature.ColorApplicator )
|
||||
.addFeatures( AEFeature.COLOR_APPLICATOR )
|
||||
.dispenserBehavior( DispenserBlockTool::new )
|
||||
.rendering( new ToolColorApplicatorRendering() )
|
||||
.build();
|
||||
|
||||
this.biometricCard = registry.item( "biometric_card", ToolBiometricCard::new )
|
||||
.rendering( new ToolBiometricCardRendering() )
|
||||
.features( AEFeature.Security ).build();
|
||||
this.memoryCard = registry.item( "memory_card", ToolMemoryCard::new ).build();
|
||||
this.networkTool = registry.item( "network_tool", ToolNetworkTool::new ).features( AEFeature.NetworkTool ).build();
|
||||
.features( AEFeature.SECURITY )
|
||||
.build();
|
||||
this.memoryCard = registry.item( "memory_card", ToolMemoryCard::new ).features( AEFeature.MEMORY_CARD ).build();
|
||||
this.networkTool = registry.item( "network_tool", ToolNetworkTool::new ).features( AEFeature.NETWORK_TOOL ).build();
|
||||
|
||||
this.cellCreative = registry.item( "creative_storage_cell", ItemCreativeStorageCell::new ).features( AEFeature.StorageCells, AEFeature.Creative ).build();
|
||||
this.viewCell = registry.item( "view_cell", ItemViewCell::new ).build();
|
||||
this.cellCreative = registry.item( "creative_storage_cell", ItemCreativeStorageCell::new )
|
||||
.features( AEFeature.STORAGE_CELLS, AEFeature.CREATIVE )
|
||||
.build();
|
||||
this.viewCell = registry.item( "view_cell", ItemViewCell::new ).features( AEFeature.VIEW_CELL ).build();
|
||||
|
||||
FeatureFactory storageCells = registry.features( AEFeature.StorageCells );
|
||||
FeatureFactory storageCells = registry.features( AEFeature.STORAGE_CELLS );
|
||||
this.cell1k = storageCells.item( "storage_cell_1k", () -> new ItemBasicStorageCell( MaterialType.Cell1kPart, 1 ) ).build();
|
||||
this.cell4k = storageCells.item( "storage_cell_4k", () -> new ItemBasicStorageCell( MaterialType.Cell4kPart, 4 ) ).build();
|
||||
this.cell16k = storageCells.item( "storage_cell_16k", () -> new ItemBasicStorageCell( MaterialType.Cell16kPart, 16 ) ).build();
|
||||
this.cell64k = storageCells.item( "storage_cell_64k", () -> new ItemBasicStorageCell( MaterialType.Cell64kPart, 64 ) ).build();
|
||||
|
||||
FeatureFactory spatialCells = registry.features( AEFeature.SpatialIO );
|
||||
FeatureFactory spatialCells = registry.features( AEFeature.SPATIAL_IO );
|
||||
this.spatialCell2 = spatialCells.item( "spatial_storage_cell_2_cubed", () -> new ItemSpatialStorageCell( 2 ) ).build();
|
||||
this.spatialCell16 = spatialCells.item( "spatial_storage_cell_16_cubed", () -> new ItemSpatialStorageCell( 16 ) ).build();
|
||||
this.spatialCell128 = spatialCells.item( "spatial_storage_cell_128_cubed", () -> new ItemSpatialStorageCell( 128 ) ).build();
|
||||
|
||||
this.facade = registry.item( "facade", ItemFacade::new )
|
||||
.features( AEFeature.Facades )
|
||||
.features( AEFeature.FACADES )
|
||||
.creativeTab( CreativeTabFacade.instance )
|
||||
.rendering( new FacadeRendering() )
|
||||
.build();
|
||||
this.crystalSeed = registry.item( "crystal_seed", ItemCrystalSeed::new )
|
||||
.features( AEFeature.CRYSTAL_SEEDS )
|
||||
.rendering( new ItemCrystalSeedRendering() )
|
||||
.build();
|
||||
|
||||
// rv1
|
||||
this.encodedPattern = registry.item( "encoded_pattern", ItemEncodedPattern::new )
|
||||
.features( AEFeature.Patterns )
|
||||
.features( AEFeature.PATTERNS )
|
||||
.rendering( new ItemEncodedPatternRendering() )
|
||||
.build();
|
||||
|
||||
this.paintBall = registry.item( "paint_ball", ItemPaintBall::new )
|
||||
.features( AEFeature.PaintBalls )
|
||||
.features( AEFeature.PAINT_BALLS )
|
||||
.rendering( new ItemPaintBallRendering() )
|
||||
.build();
|
||||
this.coloredPaintBall = registry.colored( this.paintBall, 0 );
|
||||
this.coloredLumenPaintBall = registry.colored( this.paintBall, 20 );
|
||||
|
||||
FeatureFactory debugTools = registry.features( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative );
|
||||
FeatureFactory debugTools = registry.features( AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE );
|
||||
this.toolEraser = debugTools.item( "debug_eraser", ToolEraser::new ).build();
|
||||
this.toolMeteoritePlacer = debugTools.item( "debug_meteorite_placer", ToolMeteoritePlacer::new ).build();
|
||||
this.toolDebugCard = debugTools.item( "debug_card", ToolDebugCard::new ).build();
|
||||
|
||||
@@ -24,7 +24,7 @@ public enum AEFeature
|
||||
// stuff that has no reason for ever being turned off, or that
|
||||
// is just flat out required by tons of
|
||||
// important stuff.
|
||||
Core( null )
|
||||
CORE( "Core", null )
|
||||
{
|
||||
@Override
|
||||
public boolean isVisible()
|
||||
@@ -33,124 +33,162 @@ public enum AEFeature
|
||||
}
|
||||
},
|
||||
|
||||
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 ),
|
||||
CERTUS_QUARTZ_WORLD_GEN( "CertusQuartzWorldGen", Constants.CATEGORY_WORLD ),
|
||||
METEORITE_WORLD_GEN( "MeteoriteWorldGen", Constants.CATEGORY_WORLD ),
|
||||
DECORATIVE_LIGHTS( "DecorativeLights", Constants.CATEGORY_WORLD ),
|
||||
DECORATIVE_QUARTZ_BLOCKS( "DecorativeQuartzBlocks", Constants.CATEGORY_WORLD ),
|
||||
SKY_STONE_CHESTS( "SkyStoneChests", Constants.CATEGORY_WORLD ),
|
||||
SPAWN_PRESSES_IN_METEORITES( "SpawnPressesInMeteorites", Constants.CATEGORY_WORLD ),
|
||||
GRIND_STONE( "GrindStone", Constants.CATEGORY_WORLD ),
|
||||
FLOUR( "Flour", Constants.CATEGORY_WORLD ),
|
||||
INSCRIBER( "Inscriber", Constants.CATEGORY_WORLD ),
|
||||
CHARGER( "Charger", Constants.CATEGORY_WORLD ),
|
||||
CRYSTAL_GROWTH_ACCELERATOR( "CrystalGrowthAccelerator", Constants.CATEGORY_WORLD ),
|
||||
CHEST_LOOT( "ChestLoot", Constants.CATEGORY_WORLD ),
|
||||
VILLAGER_TRADING( "VillagerTrading", Constants.CATEGORY_WORLD ),
|
||||
TINY_TNT( "TinyTNT", Constants.CATEGORY_WORLD ),
|
||||
CERTUS_ORE( "CertusOre", Constants.CATEGORY_WORLD ),
|
||||
CHARGED_CERTUS_ORE( "ChargedCertusOre", Constants.CATEGORY_WORLD ),
|
||||
|
||||
PoweredTools( Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
|
||||
CertusQuartzTools( Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
|
||||
NetherQuartzTools( Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
|
||||
POWERED_TOOLS( "PoweredTools", Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
|
||||
CERTUS_QUARTZ_TOOLS( "CertusQuartzTools", Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
|
||||
NETHER_QUARTZ_TOOLS( "NetherQuartzTools", Constants.CATEGORY_TOOLS_CLASSIFICATIONS ),
|
||||
|
||||
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 ),
|
||||
QUARTZ_HOE( "QuartzHoe", Constants.CATEGORY_TOOLS ),
|
||||
QUARTZ_SPADE( "QuartzSpade", Constants.CATEGORY_TOOLS ),
|
||||
QUARTZ_SWORD( "QuartzSword", Constants.CATEGORY_TOOLS ),
|
||||
QUARTZ_PICKAXE( "QuartzPickaxe", Constants.CATEGORY_TOOLS ),
|
||||
QUARTZ_AXE( "QuartzAxe", Constants.CATEGORY_TOOLS ),
|
||||
QUARTZ_KNIFE( "QuartzKnife", Constants.CATEGORY_TOOLS ),
|
||||
QUARTZ_WRENCH( "QuartzWrench", Constants.CATEGORY_TOOLS ),
|
||||
CHARGED_STAFF( "ChargedStaff", Constants.CATEGORY_TOOLS ),
|
||||
ENTROPY_MANIPULATOR( "EntropyManipulator", Constants.CATEGORY_TOOLS ),
|
||||
MATTER_CANNON( "MatterCannon", Constants.CATEGORY_TOOLS ),
|
||||
WIRELESS_ACCESS_TERMINAL( "WirelessAccessTerminal", Constants.CATEGORY_TOOLS ),
|
||||
COLOR_APPLICATOR( "ColorApplicator", Constants.CATEGORY_TOOLS ),
|
||||
METEORITE_COMPASS( "MeteoriteCompass", Constants.CATEGORY_TOOLS ),
|
||||
|
||||
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 ),
|
||||
POWER_GEN( "PowerGen", Constants.CATEGORY_NETWORK_FEATURES ),
|
||||
SECURITY( "Security", Constants.CATEGORY_NETWORK_FEATURES ),
|
||||
SPATIAL_IO( "SpatialIO", Constants.CATEGORY_NETWORK_FEATURES ),
|
||||
QUANTUM_NETWORK_BRIDGE( "QuantumNetworkBridge", Constants.CATEGORY_NETWORK_FEATURES ),
|
||||
CHANNELS( "Channels", Constants.CATEGORY_NETWORK_FEATURES ),
|
||||
|
||||
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 ),
|
||||
INTERFACE( "Interface", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
LEVEL_EMITTER( "LevelEmitter", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
CRAFTING_TERMINAL( "CraftingTerminal", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
TERMINAL( "Terminal", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
STORAGE_MONITOR( "StorageMonitor", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
P2P_TUNNEL( "P2PTunnel", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
FORMATION_PLANE( "FormationPlane", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
ANNIHILATION_PLANE( "AnnihilationPlane", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
IDENTITY_ANNIHILATION_PLANE( "IdentityAnnihilationPlane", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
IMPORT_BUS( "ImportBus", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
EXPORT_BUS( "ExportBus", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
STORAGE_BUS( "StorageBus", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
PART_CONVERSION_MONITOR( "PartConversionMonitor", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
TOGGLE_BUS( "ToggleBus", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
PANELS( "Panels", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
QUARTZ_FIBER( "QuartzFiber", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
CABLE_ANCHOR( "CableAnchor", Constants.CATEGORY_NETWORK_BUSES ),
|
||||
|
||||
PortableCell( Constants.CATEGORY_PORTABLE_CELL ),
|
||||
PORTABLE_CELL( "PortableCell", Constants.CATEGORY_PORTABLE_CELL ),
|
||||
|
||||
StorageCells( Constants.CATEGORY_STORAGE ),
|
||||
MEChest( Constants.CATEGORY_STORAGE ),
|
||||
MEDrive( Constants.CATEGORY_STORAGE ),
|
||||
IOPort( Constants.CATEGORY_STORAGE ),
|
||||
STORAGE_CELLS( "StorageCells", Constants.CATEGORY_STORAGE ),
|
||||
ME_CHEST( "MEChest", Constants.CATEGORY_STORAGE ),
|
||||
ME_DRIVE( "MEDrive", Constants.CATEGORY_STORAGE ),
|
||||
IO_PORT( "IOPort", Constants.CATEGORY_STORAGE ),
|
||||
CONDENSER( "Condenser", Constants.CATEGORY_STORAGE ),
|
||||
|
||||
NetworkTool( Constants.CATEGORY_NETWORK_TOOL ),
|
||||
NETWORK_TOOL( "NetworkTool", Constants.CATEGORY_NETWORK_TOOL ),
|
||||
MEMORY_CARD( "MemoryCard", Constants.CATEGORY_NETWORK_TOOL ),
|
||||
|
||||
DenseEnergyCells( Constants.CATEGORY_HIGHER_CAPACITY ),
|
||||
DenseCables( Constants.CATEGORY_HIGHER_CAPACITY ),
|
||||
GLASS_CABLES( "GlassCables", Constants.CATEGORY_CABLES ),
|
||||
COVERED_CABLES( "CoveredCables", Constants.CATEGORY_CABLES ),
|
||||
SMART_CABLES( "SmartCables", Constants.CATEGORY_CABLES ),
|
||||
|
||||
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 ),
|
||||
ENERGY_CELLS( "EnergyCells", Constants.CATEGORY_ENERGY ),
|
||||
ENERGY_ACCEPTOR( "EnergyAcceptor", Constants.CATEGORY_ENERGY ),
|
||||
|
||||
MassCannonBlockDamage( Constants.CATEGORY_BLOCK_FEATURES ),
|
||||
TinyTNTBlockDamage( Constants.CATEGORY_BLOCK_FEATURES ),
|
||||
DENSE_ENERGY_CELLS( "DenseEnergyCells", Constants.CATEGORY_HIGHER_CAPACITY ),
|
||||
DENSE_CABLES( "DenseCables", Constants.CATEGORY_HIGHER_CAPACITY ),
|
||||
|
||||
Facades( Constants.CATEGORY_FACADES ),
|
||||
P2P_TUNNEL_RF( "P2PTunnelRF", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_ME( "P2PTunnelME", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_ITEMS( "P2PTunnelItems", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_REDSTONE( "P2PTunnelRedstone", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_EU( "P2PTunnelEU", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_LIQUIDS( "P2PTunnelLiquids", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_LIGHT( "P2PTunnelLight", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_OPEN_COMPUTERS( "P2PTunnelOpenComputers", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
P2P_TUNNEL_PRESSURE( "P2PTunnelPressure", Constants.CATEGORY_P2P_TUNNELS ),
|
||||
|
||||
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 ),
|
||||
MASS_CANNON_BLOCK_DAMAGE( "MassCannonBlockDamage", Constants.CATEGORY_BLOCK_FEATURES ),
|
||||
TINY_TNT_BLOCK_DAMAGE( "TinyTNTBlockDamage", Constants.CATEGORY_BLOCK_FEATURES ),
|
||||
|
||||
EnableFacadeCrafting( Constants.CATEGORY_CRAFTING ),
|
||||
InWorldSingularity( Constants.CATEGORY_CRAFTING ),
|
||||
InWorldFluix( Constants.CATEGORY_CRAFTING ),
|
||||
InWorldPurification( Constants.CATEGORY_CRAFTING ),
|
||||
InterfaceTerminal( Constants.CATEGORY_CRAFTING ),
|
||||
EnableDisassemblyCrafting( Constants.CATEGORY_CRAFTING ),
|
||||
FACADES( "Facades", Constants.CATEGORY_FACADES ),
|
||||
|
||||
AlphaPass( Constants.CATEGORY_RENDERING ),
|
||||
PaintBalls( Constants.CATEGORY_TOOLS ),
|
||||
UNSUPPORTED_DEVELOPER_TOOLS( "UnsupportedDeveloperTools", Constants.CATEGORY_MISC, false ),
|
||||
CREATIVE( "Creative", Constants.CATEGORY_MISC ),
|
||||
GRINDER_LOGGING( "GrinderLogging", Constants.CATEGORY_MISC, false ),
|
||||
LOGGING( "Logging", Constants.CATEGORY_MISC ),
|
||||
INTEGRATION_LOGGING( "IntegrationLogging", Constants.CATEGORY_MISC, false ),
|
||||
WEBSITE_RECIPES( "WebsiteRecipes", Constants.CATEGORY_MISC, false ),
|
||||
LOG_SECURITY_AUDITS( "LogSecurityAudits", Constants.CATEGORY_MISC, false ),
|
||||
ACHIEVEMENTS( "Achievements", Constants.CATEGORY_MISC ),
|
||||
UPDATE_LOGGING( "UpdateLogging", Constants.CATEGORY_MISC, false ),
|
||||
PACKET_LOGGING( "PacketLogging", Constants.CATEGORY_MISC, false ),
|
||||
CRAFTING_LOG( "CraftingLog", Constants.CATEGORY_MISC, false ),
|
||||
LIGHT_DETECTOR( "LightDetector", Constants.CATEGORY_MISC ),
|
||||
DEBUG_LOGGING( "DebugLogging", Constants.CATEGORY_MISC, false ),
|
||||
|
||||
MolecularAssembler( Constants.CATEGORY_CRAFTING_FEATURES ),
|
||||
Patterns( Constants.CATEGORY_CRAFTING_FEATURES ),
|
||||
CraftingCPU( Constants.CATEGORY_CRAFTING_FEATURES ),
|
||||
ENABLE_FACADE_CRAFTING( "EnableFacadeCrafting", Constants.CATEGORY_CRAFTING ),
|
||||
IN_WORLD_SINGULARITY( "InWorldSingularity", Constants.CATEGORY_CRAFTING ),
|
||||
IN_WORLD_FLUIX( "InWorldFluix", Constants.CATEGORY_CRAFTING ),
|
||||
IN_WORLD_PURIFICATION( "InWorldPurification", Constants.CATEGORY_CRAFTING ),
|
||||
INTERFACE_TERMINAL( "InterfaceTerminal", Constants.CATEGORY_CRAFTING ),
|
||||
ENABLE_DISASSEMBLY_CRAFTING( "EnableDisassemblyCrafting", Constants.CATEGORY_CRAFTING ),
|
||||
|
||||
ChunkLoggerTrace( Constants.CATEGORY_COMMANDS, false );
|
||||
ALPHA_PASS( "AlphaPass", Constants.CATEGORY_RENDERING ),
|
||||
PAINT_BALLS( "PaintBalls", Constants.CATEGORY_TOOLS ),
|
||||
|
||||
public final String category;
|
||||
public final boolean defaultValue;
|
||||
MOLECULAR_ASSEMBLER( "MolecularAssembler", Constants.CATEGORY_CRAFTING_FEATURES ),
|
||||
PATTERNS( "Patterns", Constants.CATEGORY_CRAFTING_FEATURES ),
|
||||
CRAFTING_CPU( "CraftingCPU", Constants.CATEGORY_CRAFTING_FEATURES ),
|
||||
|
||||
AEFeature( final String cat )
|
||||
BASIC_CARDS( "BasicCards", Constants.CATEGORY_UPGRADES ),
|
||||
ADVANCED_CARDS( "AdvancedCards", Constants.CATEGORY_UPGRADES ),
|
||||
VIEW_CELL( "ViewCell", Constants.CATEGORY_UPGRADES ),
|
||||
|
||||
PROCESSORS( "Processors", Constants.CATEGORY_MATERIALS ),
|
||||
PRINTED_CIRCUITS( "PrintedCircuits", Constants.CATEGORY_MATERIALS ),
|
||||
PRESSES( "Presses", Constants.CATEGORY_MATERIALS ),
|
||||
CRYSTAL_SEEDS( "CrystalSeeds", Constants.CATEGORY_MATERIALS ),
|
||||
PURE_CRYSTALS( "PureCrystals", Constants.CATEGORY_MATERIALS ),
|
||||
CERTUS( "Certus", Constants.CATEGORY_MATERIALS ),
|
||||
FLUIX( "Fluix", Constants.CATEGORY_MATERIALS ),
|
||||
SILICON( "Silicon", Constants.CATEGORY_MATERIALS ),
|
||||
DUSTS( "Dusts", Constants.CATEGORY_MATERIALS ),
|
||||
NUGGETS( "Nuggets", Constants.CATEGORY_MATERIALS ),
|
||||
MATTER_BALL( "MatterBall", Constants.CATEGORY_MATERIALS ),
|
||||
CORES( "Cores", Constants.CATEGORY_MATERIALS ),
|
||||
|
||||
CHUNK_LOGGER_TRACE( "ChunkLoggerTrace", Constants.CATEGORY_COMMANDS, false );
|
||||
|
||||
private final String key;
|
||||
private final String category;
|
||||
private final boolean enabled;
|
||||
|
||||
AEFeature( final String key, final String cat )
|
||||
{
|
||||
this( cat, true );
|
||||
this( key, cat, true );
|
||||
}
|
||||
|
||||
AEFeature( final String cat, final boolean defaultValue )
|
||||
AEFeature( final String key, final String cat, final boolean enabled )
|
||||
{
|
||||
this.key = key;
|
||||
this.category = cat;
|
||||
this.defaultValue = defaultValue;
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -163,6 +201,21 @@ public enum AEFeature
|
||||
return true;
|
||||
}
|
||||
|
||||
public String key()
|
||||
{
|
||||
return key;
|
||||
}
|
||||
|
||||
public String category()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
|
||||
private enum Constants
|
||||
{
|
||||
;
|
||||
@@ -177,6 +230,7 @@ public enum AEFeature
|
||||
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_CABLES = "Cables";
|
||||
private static final String CATEGORY_HIGHER_CAPACITY = "HigherCapacity";
|
||||
private static final String CATEGORY_NETWORK_FEATURES = "NetworkFeatures";
|
||||
private static final String CATEGORY_COMMANDS = "Commands";
|
||||
@@ -184,5 +238,8 @@ public enum AEFeature
|
||||
private static final String CATEGORY_FACADES = "Facades";
|
||||
private static final String CATEGORY_NETWORK_TOOL = "NetworkTool";
|
||||
private static final String CATEGORY_PORTABLE_CELL = "PortableCell";
|
||||
private static final String CATEGORY_ENERGY = "Energy";
|
||||
private static final String CATEGORY_UPGRADES = "Upgrades";
|
||||
private static final String CATEGORY_MATERIALS = "Materials";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,12 +30,14 @@ import appeng.items.materials.MaterialType;
|
||||
public class MaterialStackSrc implements IStackSrc
|
||||
{
|
||||
private final MaterialType src;
|
||||
private final boolean enabled;
|
||||
|
||||
public MaterialStackSrc( final MaterialType src )
|
||||
public MaterialStackSrc( final MaterialType src, boolean enabled )
|
||||
{
|
||||
Preconditions.checkNotNull( src );
|
||||
|
||||
this.src = src;
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,6 +61,6 @@ public class MaterialStackSrc implements IStackSrc
|
||||
@Override
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return true;
|
||||
return this.enabled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
{
|
||||
final ItemStack extra = is.copy();
|
||||
extra.stackSize = ratio - 1;
|
||||
this.addRecipe( item, is, extra, (float) ( AEConfig.instance.oreDoublePercentage / 100.0 ), 8 );
|
||||
this.addRecipe( item, is, extra, (float) ( AEConfig.instance().getOreDoublePercentage() / 100.0 ), 8 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -256,7 +256,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
{
|
||||
final ItemStack extra = is.copy();
|
||||
extra.stackSize = ratio - 1;
|
||||
this.addRecipe( d.getKey(), is, extra, (float) ( AEConfig.instance.oreDoublePercentage / 100.0 ), 8 );
|
||||
this.addRecipe( d.getKey(), is, extra, (float) ( AEConfig.instance().getOreDoublePercentage() / 100.0 ), 8 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -279,7 +279,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
{
|
||||
if( name.startsWith( "ore" ) || name.startsWith( "crystal" ) || name.startsWith( "gem" ) || name.startsWith( "ingot" ) || name.startsWith( "dust" ) )
|
||||
{
|
||||
for( final String ore : AEConfig.instance.grinderOres )
|
||||
for( final String ore : AEConfig.instance().getGrinderOres() )
|
||||
{
|
||||
if( name.equals( "ore" + ore ) )
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
|
||||
this.considerItem( name, item, "Sodium", 22.9897 );
|
||||
this.considerItem( name, item, "Magnesium", 24.305 );
|
||||
this.considerItem( name, item, "Aluminum", 26.9815 );
|
||||
this.considerItem( name, item, "Silicon", 28.0855 );
|
||||
this.considerItem( name, item, "SILICON", 28.0855 );
|
||||
this.considerItem( name, item, "Phosphorus", 30.9738 );
|
||||
this.considerItem( name, item, "Sulfur", 32.065 );
|
||||
this.considerItem( name, item, "Potassium", 39.0983 );
|
||||
|
||||
@@ -32,7 +32,7 @@ import appeng.core.features.AEFeature;
|
||||
/**
|
||||
* Registers any items a player is picking up or is crafting.
|
||||
* Registered items are added to the player stats.
|
||||
* This will only happen if the {@link AEFeature#Achievements} feature is enabled.
|
||||
* This will only happen if the {@link AEFeature#ACHIEVEMENTS} feature is enabled.
|
||||
*/
|
||||
public class PlayerStatsRegistration
|
||||
{
|
||||
@@ -43,7 +43,7 @@ public class PlayerStatsRegistration
|
||||
private final EventBus bus;
|
||||
|
||||
/**
|
||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the
|
||||
* is true if the {@link appeng.core.features.AEFeature#ACHIEVEMENTS} is enabled in the
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@@ -55,12 +55,12 @@ public class PlayerStatsRegistration
|
||||
*
|
||||
* @param bus {@see #bus}
|
||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the
|
||||
* {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||
* {@link appeng.core.features.AEFeature#ACHIEVEMENTS} is enabled
|
||||
*/
|
||||
public PlayerStatsRegistration( final EventBus bus, final AEConfig config )
|
||||
{
|
||||
this.bus = bus;
|
||||
this.isAchievementFeatureEnabled = config.isFeatureEnabled( AEFeature.Achievements );
|
||||
this.isAchievementFeatureEnabled = config.isFeatureEnabled( AEFeature.ACHIEVEMENTS );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -71,9 +71,9 @@ public abstract class AppEngPacket implements Packet
|
||||
throw new IllegalArgumentException( "Sorry AE2 made a " + this.p.array().length + " byte packet by accident!" );
|
||||
}
|
||||
|
||||
final FMLProxyPacket pp = new FMLProxyPacket( this.p, NetworkHandler.instance.getChannel() );
|
||||
final FMLProxyPacket pp = new FMLProxyPacket( this.p, NetworkHandler.instance().getChannel() );
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.PacketLogging ) )
|
||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.PACKET_LOGGING ) )
|
||||
{
|
||||
AELog.info( this.getClass().getName() + " : " + pp.payload().readableBytes() );
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import appeng.core.worlddata.WorldData;
|
||||
|
||||
public class NetworkHandler
|
||||
{
|
||||
public static NetworkHandler instance;
|
||||
private static NetworkHandler instance;
|
||||
|
||||
private final FMLEventChannel ec;
|
||||
private final String myChannelName;
|
||||
@@ -55,6 +55,16 @@ public class NetworkHandler
|
||||
this.serveHandler = this.createServerSide();
|
||||
}
|
||||
|
||||
public static void init( final String channelName )
|
||||
{
|
||||
instance = new NetworkHandler( channelName );
|
||||
}
|
||||
|
||||
public static NetworkHandler instance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
|
||||
private IPacketHandler createClientSide()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -70,7 +70,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||
@Override
|
||||
public void calculatedDirection( final boolean hasResult, final boolean spin, final double radians, final double dist )
|
||||
{
|
||||
NetworkHandler.instance.sendTo( new PacketCompassResponse( this, hasResult, spin, radians ), (EntityPlayerMP) this.talkBackTo );
|
||||
NetworkHandler.instance().sendTo( new PacketCompassResponse( this, hasResult, spin, radians ), (EntityPlayerMP) this.talkBackTo );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class PacketLightning extends AppEngPacket
|
||||
{
|
||||
try
|
||||
{
|
||||
if( Platform.isClient() && AEConfig.instance.enableEffects )
|
||||
if( Platform.isClient() && AEConfig.instance().isEnableEffects() )
|
||||
{
|
||||
final LightningFX fx = new LightningFX( ClientHelper.proxy.getWorld(), this.x, this.y, this.z, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
|
||||
@@ -113,7 +113,7 @@ final class DimensionData implements IWorldDimensionData, IOnWorldStartable, IOn
|
||||
this.storageCellDimensionIDs.add( newStorageCellID );
|
||||
DimensionManager.registerDimension( newStorageCellID, AppEng.instance().getRegistration().getStorageDimensionType() );
|
||||
|
||||
NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newStorageCellID ) );
|
||||
NetworkHandler.instance().sendToAll( new PacketNewStorageDimension( newStorageCellID ) );
|
||||
|
||||
final String[] values = new String[this.storageCellDimensionIDs.size()];
|
||||
|
||||
@@ -164,7 +164,7 @@ final class DimensionData implements IWorldDimensionData, IOnWorldStartable, IOn
|
||||
{
|
||||
for( final TickHandler.PlayerColor pc : TickHandler.INSTANCE.getPlayerColors().values() )
|
||||
{
|
||||
NetworkHandler.instance.sendToAll( pc.getPacket() );
|
||||
NetworkHandler.instance().sendToAll( pc.getPacket() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user