Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/interface_term_simple' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master committed Oct 14, 2023
2 parents bc4a6b5 + 1e51d19 commit e775926
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode;
import appeng.api.networking.security.IActionHost;
import appeng.api.util.DimensionalCoord;
import appeng.api.util.IIfaceTermViewable;
import appeng.container.AEBaseContainer;
Expand All @@ -56,13 +57,13 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer {
private PacketIfaceTermUpdate dirty;
private boolean isDirty;
private IGrid grid;
private PartInterfaceTerminal partRef;
private IActionHost anchor;
private boolean wasOff;

public ContainerInterfaceTerminal(final InventoryPlayer ip, final PartInterfaceTerminal anchor) {
public ContainerInterfaceTerminal(final InventoryPlayer ip, final IActionHost anchor) {
super(ip, anchor);
assert anchor != null;
this.partRef = anchor;
this.anchor = anchor;
if (Platform.isServer()) {
this.grid = anchor.getActionableNode().getGrid();
dirty = this.updateList();
Expand All @@ -88,7 +89,7 @@ public void detectAndSendChanges() {
return;
}

final IGridNode agn = this.partRef.getActionableNode();
final IGridNode agn = this.anchor.getActionableNode();

if (!agn.isActive()) {
/*
Expand All @@ -107,7 +108,7 @@ public void detectAndSendChanges() {
}
this.wasOff = false;

if (this.partRef.needsUpdate()) {
if (anchor instanceof PartInterfaceTerminal terminal && terminal.needsUpdate()) {
PacketIfaceTermUpdate update = this.updateList();
if (update != null) {
update.encode();
Expand Down

0 comments on commit e775926

Please sign in to comment.