From dda32ba4c02c4ddc801374fd9a24cd69b233508d Mon Sep 17 00:00:00 2001 From: techno-sam <77073745+techno-sam@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:12:27 +0200 Subject: [PATCH] fix some client crashes --- .../createnumismatics/content/backend/BankAccount.java | 4 +++- .../content/salepoint/states/FluidSalepointState.java | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/dev/ithundxr/createnumismatics/content/backend/BankAccount.java b/common/src/main/java/dev/ithundxr/createnumismatics/content/backend/BankAccount.java index 5783169..03145c6 100644 --- a/common/src/main/java/dev/ithundxr/createnumismatics/content/backend/BankAccount.java +++ b/common/src/main/java/dev/ithundxr/createnumismatics/content/backend/BankAccount.java @@ -387,7 +387,9 @@ public void sendSubAccountsOnlyToMenu(FriendlyByteBuf buf) { SubAccount subAccount = subAccounts.remove(subAccountID); subAccount.setRemoved(); - NumismaticsPackets.PACKETS.sendTo(PlayerSelection.all(), BankAccountLabelPacket.remove(subAccount)); + + if (!clientSide) + NumismaticsPackets.PACKETS.sendTo(PlayerSelection.all(), BankAccountLabelPacket.remove(subAccount)); markDirty(); return subAccount; } diff --git a/common/src/main/java/dev/ithundxr/createnumismatics/content/salepoint/states/FluidSalepointState.java b/common/src/main/java/dev/ithundxr/createnumismatics/content/salepoint/states/FluidSalepointState.java index 4f55ff5..47c2d46 100644 --- a/common/src/main/java/dev/ithundxr/createnumismatics/content/salepoint/states/FluidSalepointState.java +++ b/common/src/main/java/dev/ithundxr/createnumismatics/content/salepoint/states/FluidSalepointState.java @@ -225,6 +225,7 @@ public void createConfigWidgets(WidgetConsumer widgetConsumer) { } @Override + @Environment(EnvType.CLIENT) public void createPurchaseWidgets(WidgetConsumer widgetConsumer) { widgetConsumer.addRenderableWidget(new SalepointFluidDisplayWidget(68, 55, this)); }