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:
@@ -64,14 +64,14 @@ class PoweredItemCapabilities implements ICapabilityProvider, IEnergyStorage
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capability, @Nullable EnumFacing facing )
|
||||
{
|
||||
return capability == CapabilityEnergy.ENERGY || capability == Capabilities.TESLA_CONSUMER || capability == Capabilities.TESLA_HOLDER;
|
||||
return capability == Capabilities.FORGE_ENERGY || capability == Capabilities.TESLA_CONSUMER || capability == Capabilities.TESLA_HOLDER;
|
||||
}
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||
{
|
||||
if( capability == CapabilityEnergy.ENERGY )
|
||||
if( capability == Capabilities.FORGE_ENERGY )
|
||||
{
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user