Use DefaultedList for equipment tracking

Because on 1.11+ a `null` item stack is not something that should exist.
This then also allows us to compare item stacks by value rather than only by
reference, potentially saving a few redundant entity equipment update
packets (but more importantly, also allows us to store a copy instead of the
original, which will be important for the next commit).
This commit is contained in:
Jonas Herzig
2022-07-31 12:49:46 +02:00
parent 42d04d123c
commit 62b9cd0538
3 changed files with 23 additions and 3 deletions

View File

@@ -1 +1,2 @@
net.minecraft.item.ItemStack EMPTY field_190927_a
net.minecraft.util.NonNullList withSize() func_191197_a()