How to implement inventories #3852
Unanswered
rackodo
asked this question in
Mod Dev Support
Replies: 1 comment
-
Hi, in 1.20.5 the signature of nbt methods changed to include Your code has to look like this: @Override
public void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup lookup) {
super.readNbt(nbt, lookup);
Inventories.readNbt(nbt, items, lookup);
}
@Override
public NbtCompound writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup lookup) {
Inventories.writeNbt(nbt, items, lookup);
return super.writeNbt(nbt, lookup);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Following this tutorial to implement an inventory, but the readNbt and writeNbt methods are asking for an extra argument that the tutorial doesn't address. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions