Complete implementation of complement PR's changes to main AE2

This commit is contained in:
Sanjay S. committed 2025-05-26 17:13:17 -04:00
1 parent 5cc8534ba2
commit 2f19144a28
2 files changed
+78 -1

No files matched your search

@@ -85,7 +85,6 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
PartFluidP2PInterface p2p = getInput();
if (p2p != null) {
this.craftingList = p2p.duality.craftingList;
try {
this.gridProxy.getGrid()
.postEvent(new MENetworkCraftingPatternChange(this, this.gridProxy.getNode()));
@@ -96,11 +95,86 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
}
}
@Override
public boolean updateStorage() {
if (!isOutput()) {
super.updateStorage();
try {
for (PartFluidP2PInterface p2p : getOutputs()) p2p.duality.updateStorage();
} catch (GridAccessException e) {
}
} else {
PartFluidP2PInterface p2p = getInput();
if ((p2p != null)) this.setStorage(p2p.duality.getStorage());
this.readConfig();
}
return true;
}
@Override
public void readConfig() {
if (!isOutput()) {
super.readConfig();
try {
for (PartFluidP2PInterface p2p : getOutputs()) p2p.duality.readConfig();
} catch (GridAccessException e) {
}
} else {
PartFluidP2PInterface p2p = getInput();
this.setHasConfig(false);
if (p2p != null) {
if (!p2p.duality.getConfig().isEmpty()) this.setHasConfig(p2p.duality.hasConfig());
this.notifyNeighbors();
}
}
}
@Override
public void addDrops(final List<ItemStack> drops) {
if (!isOutput()) {
super.addDrops(drops);
try {
for (PartFluidP2PInterface p2p : getOutputs()) p2p.duality.addDrops(drops);
} catch (GridAccessException e) {
}
} else {
if (this.getWaitingToSend() != null) {
for (final ItemStack is : this.getWaitingToSend()) {
if (is != null) {
drops.add(is);
}
}
}
for (final ItemStack is : this.getUpgrades()) {
if (is != null) {
drops.add(is);
}
}
for (final ItemStack is : this.getPatterns()) {
if (is != null) {
drops.add(is);
}
}
}
}
@Override
public int getInstalledUpgrades(Upgrades u) {
if (isOutput() && u == Upgrades.PATTERN_CAPACITY) return -1;
return super.getInstalledUpgrades(u);
}
@Override
public int getConfigSize() {
if (isOutput()) return -1;
return super.getConfigSize();
}
};
private final DualityFluidInterface dualityFluid = new DualityFluidInterface(this.getProxy(), this);
private final AppEngInternalAEInventory config = new AppEngInternalAEInventory(this, 6);
@@ -63,6 +63,9 @@ public class CommonProxy {
Upgrades.LOCK_CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_INTERFACE), 1);
Upgrades.LOCK_CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.INTERFACE), 1);
Upgrades.LOCK_CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_INTERFACE_P2P), 1);
Upgrades.FUZZY.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_INTERFACE), 3);
Upgrades.FUZZY.registerItem(new ItemStack(ItemAndBlockHolder.INTERFACE), 3);
Upgrades.FUZZY.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_INTERFACE_P2P), 3);
Upgrades.CAPACITY.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_STORAGE_BUS), 5);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_STORAGE_BUS), 1);
Upgrades.STICKY.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_STORAGE_BUS), 1);