Skip to content

Commit

Permalink
Support to show p2p outputs in interface terminal (#179)
Browse files Browse the repository at this point in the history
Laiff authored Dec 19, 2023
1 parent f7ea2e9 commit e621da2
Showing 1 changed file with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -530,6 +530,54 @@ public void getDrops(List<ItemStack> drops, boolean wrenched) {

@Override
public boolean shouldDisplay() {
return IInterfaceHost.super.shouldDisplay() && !isOutput();
return IInterfaceHost.super.shouldDisplay();
}

@Override
public IInventory getPatterns() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.getPatterns();
}
return IInterfaceHost.super.getPatterns();
}
return IInterfaceHost.super.getPatterns();
}

@Override
public int rows() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.rows();
}
return IInterfaceHost.super.rows();
}
return IInterfaceHost.super.rows();
}

@Override
public int rowSize() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.rowSize();
}
return IInterfaceHost.super.rowSize();
}
return IInterfaceHost.super.rowSize();
}

@Override
public String getName() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.getName();
}
return IInterfaceHost.super.getName();
}
return IInterfaceHost.super.getName();
}
}

0 comments on commit e621da2

Please sign in to comment.