Compare commits

...
Author SHA1 Message Date
lc-1337 f02e72e96a Fix storage name fluid emitter (#400) 2026-02-05 22:58:44 -05:00
lc-1337 c13cd0492a fix storage name on exp (#399) 2026-02-04 21:43:30 +00:00
4 changed files with 8 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@
*/
dependencies {
api('com.github.GTNewHorizons:NotEnoughItems:2.8.48-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-790-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-811-GTNH:dev')
api('curse.maven:cofh-core-69162:2388751')
api('com.github.GTNewHorizons:waila:1.9.15:dev')
api("com.github.GTNewHorizons:GTNHLib:0.8.41:dev")
@@ -83,7 +83,7 @@ public class PartFluidExportBus extends PartBaseExportBus<IAEFluidStack> {
public void readFromNBT(NBTTagCompound extra) {
super.readFromNBT(extra);
final IAEStackInventory config = this.getAEInventoryByName(StorageName.NONE);
final IAEStackInventory config = this.getAEInventoryByName(StorageName.CONFIG);
for (int i = 0; i < config.getSizeInventory(); i++) {
final IAEStack<?> stack = config.getAEStackInSlot(i);
if (stack instanceof IAEItemStack ais) {
@@ -137,7 +137,7 @@ public class PartFluidImportBus extends PartBaseImportBus<IAEFluidStack> {
}
private boolean isInFilter(FluidStack fluid) {
final IAEStackInventory inv = this.getAEInventoryByName(StorageName.NONE);
final IAEStackInventory inv = this.getAEInventoryByName(StorageName.CONFIG);
for (int i = 0; i < inv.getSizeInventory(); i++) {
final IAEFluidStack stack = (IAEFluidStack) inv.getAEStackInSlot(i);
if (stack != null && stack.getFluidStack().equals(fluid)) {
@@ -148,7 +148,7 @@ public class PartFluidImportBus extends PartBaseImportBus<IAEFluidStack> {
}
private boolean filterEnabled() {
final IAEStackInventory inv = this.getAEInventoryByName(StorageName.NONE);
final IAEStackInventory inv = this.getAEInventoryByName(StorageName.CONFIG);
for (int i = 0; i < inv.getSizeInventory(); i++) {
final IAEFluidStack stack = (IAEFluidStack) inv.getAEStackInSlot(i);
if (stack != null) {
@@ -163,7 +163,7 @@ public class PartFluidImportBus extends PartBaseImportBus<IAEFluidStack> {
public void readFromNBT(NBTTagCompound extra) {
super.readFromNBT(extra);
final IAEStackInventory config = this.getAEInventoryByName(StorageName.NONE);
final IAEStackInventory config = this.getAEInventoryByName(StorageName.CONFIG);
for (int i = 0; i < config.getSizeInventory(); i++) {
final IAEStack<?> stack = config.getAEStackInSlot(i);
if (stack instanceof IAEItemStack ais) {
@@ -5,6 +5,7 @@ import net.minecraft.nbt.NBTTagCompound;
import com.glodblock.github.common.item.ItemFluidPacket;
import appeng.api.storage.StorageName;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.helpers.Reflected;
@@ -21,9 +22,9 @@ public class PartFluidLevelEmitter extends PartLevelEmitter {
public void readFromNBT(NBTTagCompound data) {
super.readFromNBT(data);
final IAEStack<?> aes = this.getAEInventoryByName(null).getAEStackInSlot(0);
final IAEStack<?> aes = this.getAEInventoryByName(StorageName.CONFIG).getAEStackInSlot(0);
if (aes instanceof IAEItemStack ais && ais.getItem() instanceof ItemFluidPacket) {
this.getAEInventoryByName(null).putAEStackInSlot(0, ItemFluidPacket.getFluidAEStack(ais));
this.getAEInventoryByName(StorageName.CONFIG).putAEStackInSlot(0, ItemFluidPacket.getFluidAEStack(ais));
}
}
}