From c7157ee6c9721eb3d280882ffcdc2238873e9da7 Mon Sep 17 00:00:00 2001 From: Ryuta Iwakura Date: Sun, 1 Sep 2024 15:42:37 +0900 Subject: [PATCH] Add pre-check for LinkChest circular reference --- .../net/unknown/launchwrapper/mixins/MixinChestBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/unknown/launchwrapper/mixins/MixinChestBlockEntity.java b/src/main/java/net/unknown/launchwrapper/mixins/MixinChestBlockEntity.java index 5338f74..7b8c592 100644 --- a/src/main/java/net/unknown/launchwrapper/mixins/MixinChestBlockEntity.java +++ b/src/main/java/net/unknown/launchwrapper/mixins/MixinChestBlockEntity.java @@ -167,7 +167,7 @@ public NonNullList getItems() { } if (this.linkChestMode == LinkChestMode.CLIENT) { - if (this.linkChestSource != null) { + if (this.linkChestSource != null && this.linkChestSource.equals(new WrappedBlockPos(this.getLevel(), this.getBlockPos()))) { BlockEntity blockEntity = this.linkChestSource.getBlockEntity(true, 3); if (blockEntity instanceof MixinChestBlockEntity chestBlockEntity) { if (chestBlockEntity.getChestTransportMode() == LinkChestMode.SOURCE) {