Implement the new interface in AE2 for network bytes informations. (#173)

* implement the interface

* sa

* Implements the new interface

---------

Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
MCTBLandMartin Robertz authored and GitHub committed 2023-11-20 19:25:54 +01:00
1 parent 2536488e53
commit 3077326c16
2 files changed
+59 -7

No files matched your search

+6 -6
View File
@@ -35,25 +35,25 @@
*/
dependencies {
api('com.github.GTNewHorizons:NotEnoughItems:2.4.12-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-281-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-286-GTNH:dev')
api('curse.maven:cofh-core-69162:2388751')
api('com.github.GTNewHorizons:waila:1.6.2:dev')
api('com.github.GTNewHorizons:waila:1.6.5:dev')
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.10.1:dev")
compileOnly('com.github.GTNewHorizons:Baubles:1.0.1.16:dev')
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.34:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ForestryMC:4.7.0:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.5.4:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.79:dev') {
compileOnly('com.github.GTNewHorizons:EnderIO:2.5.5:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.83:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.19-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.5.0-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:GTplusplus:1.10.27:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.3.29:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:GTplusplus:1.10.30:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.3.31:dev") { transitive = false }
runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.1.7:dev")
}
@@ -8,6 +8,7 @@ import com.glodblock.github.util.Util;
import appeng.api.AEApi;
import appeng.api.config.IncludeExclude;
import appeng.api.storage.ICellCacheRegistry;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
@@ -17,7 +18,8 @@ import appeng.me.storage.MEPassThrough;
import appeng.util.item.AEFluidStack;
import appeng.util.prioitylist.PrecisePriorityList;
public class FluidCellInventoryHandler extends MEInventoryHandler<IAEFluidStack> implements IFluidCellInventoryHandler {
public class FluidCellInventoryHandler extends MEInventoryHandler<IAEFluidStack>
implements IFluidCellInventoryHandler, ICellCacheRegistry {
protected FluidCellInventoryHandler(final IMEInventory<IAEFluidStack> c) {
super(c, StorageChannel.FLUIDS);
@@ -74,4 +76,54 @@ public class FluidCellInventoryHandler extends MEInventoryHandler<IAEFluidStack>
return val;
}
@Override
public boolean canGetInv() {
IFluidCellInventory cellInv = this.getCellInv();
if (cellInv instanceof CreativeFluidCellInventory) {
return false;
} else {
return true;
}
}
@Override
public long getTotalBytes() {
return this.getCellInv().getTotalBytes();
}
@Override
public long getFreeBytes() {
return this.getCellInv().getFreeBytes();
}
@Override
public long getUsedBytes() {
return this.getCellInv().getUsedBytes();
}
@Override
public long getTotalTypes() {
return this.getCellInv().getTotalFluidTypes();
}
@Override
public long getFreeTypes() {
return this.getCellInv().getRemainingFluidTypes();
}
@Override
public long getUsedTypes() {
return this.getCellInv().getStoredFluidTypes();
}
@Override
public int getCellStatus() {
return this.getStatusForCell();
}
@Override
public TYPE getCellType() {
return TYPE.FLUID;
}
}