mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Polished capabilities, still need to decide if we're allowed to ship capability references in API
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user