Skip to content

Commit

Permalink
make contentsChange method public and move check down to GTItemStackH…
Browse files Browse the repository at this point in the history
…andler
  • Loading branch information
ghzdude committed Aug 1, 2024
1 parent 3f19f8a commit a9c9e70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public GTItemStackHandler(MetaTileEntity metaTileEntity, NonNullList<ItemStack>
}

@Override
protected void onContentsChanged(int slot) {
public void onContentsChanged(int slot) {
super.onContentsChanged(slot);
metaTileEntity.markDirty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager)
.slotGroup("item_inv")
.changeListener((newItem, onlyAmountChanged, client, init) -> {
if (onlyAmountChanged &&
handler instanceof NotifiableItemStackHandler notif) {
notif.onContentsChanged(index);
handler instanceof GTItemStackHandler gtHandler) {
gtHandler.onContentsChanged(index);
}
})
.accessibility(!isExportHatch, true)));
Expand Down

0 comments on commit a9c9e70

Please sign in to comment.