mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 06:14:41 +00:00
Add sideIsOutput and sideIsConsumer methods
getOutputtingSides and getConsumingSides both have to construct an EnumSet, but most usages only immediately call contains() on the EnumSet and then discard it. Improve performance by adding a method that can test a side and return a boolean, avoiding the EnumSet creation.
This commit is contained in:
1 parent
491a03cf63
commit
0c0411979d
18 files changed
+171
-35
No files matched your search
@@ -25,8 +25,10 @@ import cofh.api.energy.IEnergyReceiver;
|
||||
public interface IEnergyWrapper extends IStrictEnergyStorage, IEnergyReceiver, IEnergyProvider, IEnergySink, IEnergySource, IEnergyStorage, IStrictEnergyAcceptor, IStrictEnergyOutputter, IInventory
|
||||
{
|
||||
public EnumSet<EnumFacing> getOutputtingSides();
|
||||
public boolean sideIsOutput(EnumFacing side);
|
||||
|
||||
public EnumSet<EnumFacing> getConsumingSides();
|
||||
public boolean sideIsConsumer(EnumFacing side);
|
||||
|
||||
public double getMaxOutput();
|
||||
}
|
||||
Reference in new issue
Block a user