Skip to content

Commit

Permalink
Add pre-check for LinkChest circular reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuuta0217 committed Sep 1, 2024
1 parent 84d845b commit c7157ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public NonNullList<ItemStack> 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) {
Expand Down

0 comments on commit c7157ee

Please sign in to comment.