Polished capabilities, still need to decide if we're allowed to ship capability references in API

This commit is contained in:
aidancbrady committed 2016-05-27 14:02:15 -04:00
1 parent 1141de024c
commit c9f8fd011e
71 files changed
+566 -234

No files matched your search

@@ -472,15 +472,19 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
{
return capability == Capabilities.ENERGY_STORAGE_CAPABILITY
|| capability == Capabilities.ENERGY_ACCEPTOR_CAPABILITY
|| capability == Capabilities.CONFIG_CARD_CAPABILITY
|| capability == Capabilities.SPECIAL_CONFIG_DATA_CAPABILITY
|| super.hasCapability(capability, facing);
}
@Override
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
{
if(capability == Capabilities.ENERGY_STORAGE_CAPABILITY || capability == Capabilities.ENERGY_ACCEPTOR_CAPABILITY)
return (T) this;
if(capability == Capabilities.ENERGY_STORAGE_CAPABILITY
|| capability == Capabilities.ENERGY_ACCEPTOR_CAPABILITY
|| capability == Capabilities.CONFIG_CARD_CAPABILITY
|| capability == Capabilities.SPECIAL_CONFIG_DATA_CAPABILITY)
return (T)this;
return super.getCapability(capability, facing);
}
}