Skip to content

Commit

Permalink
Fixed an UnsupportedOperationException when getting contents of wild …
Browse files Browse the repository at this point in the history
…chests (#158)
  • Loading branch information
OmerBenGera committed Jan 27, 2023
1 parent 6052edd commit 9faad3b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -85,7 +85,7 @@ public ItemStack getItem(int i) {
public NonNullList<ItemStack> getContents() {
List<WildContainerItem> contents = ((WChest) chest).getWildContents();
NonNullList<ItemStack> nonNullList = NonNullList.a(contents.size(), ItemStack.b);
contents.forEach(wildContainerItem -> nonNullList.add(((WildContainerItemImpl) wildContainerItem).getHandle()));
contents.forEach(wildContainerItem -> nonNullList.add(nonNullList.size(), ((WildContainerItemImpl) wildContainerItem).getHandle()));
return nonNullList;
}

Expand Down

0 comments on commit 9faad3b

Please sign in to comment.