Updated caps to be manually disabled via config
Moved the cap injection to a method, allows them to be configurable. This is not possible for Forge Energy as it is injected before even the configuration are lodaed, thus violating their own capability contract to use the method injection to explicitly make it configurable. Updated the ratio key for forge energy to "ForgeEnergy" without a space
This commit is contained in:
@@ -146,7 +146,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
MinecraftForge.EVENT_BUS.register( this );
|
||||
|
||||
PowerUnits.EU.conversionRatio = this.get( "PowerRatios", "IC2", DEFAULT_IC2_EXCHANGE ).getDouble( DEFAULT_IC2_EXCHANGE );
|
||||
PowerUnits.RF.conversionRatio = this.get( "PowerRatios", "Forge Energy", DEFAULT_RF_EXCHANGE ).getDouble( DEFAULT_RF_EXCHANGE );
|
||||
PowerUnits.RF.conversionRatio = this.get( "PowerRatios", "ForgeEnergy", DEFAULT_RF_EXCHANGE ).getDouble( DEFAULT_RF_EXCHANGE );
|
||||
|
||||
final double usageEffective = this.get( "PowerRatios", "UsageMultiplier", 1.0 ).getDouble( 1.0 );
|
||||
PowerMultiplier.CONFIG.multiplier = Math.max( 0.01, usageEffective );
|
||||
|
||||
@@ -41,6 +41,7 @@ import appeng.api.definitions.IItemDefinition;
|
||||
import appeng.api.definitions.IParts;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.capabilities.Capabilities;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
@@ -244,7 +245,7 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
// Next, check if the Item you're holding supports Forge Energy
|
||||
for( EnumFacing face : EnumFacing.VALUES )
|
||||
{
|
||||
if( trigger.hasCapability( CapabilityEnergy.ENERGY, face ) )
|
||||
if( trigger.hasCapability( Capabilities.FORGE_ENERGY, face ) )
|
||||
{
|
||||
return TunnelType.FE_POWER;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user