Note: I am pull requesting this onto branch 1.16.1, because there is none for 1.16.4, however if you want this port to be on a separate branch, you can create a new branch, then change the target branch of this pull request.
I changed the onPlayerDestroy overrides to onBlockHarvested because the world provided by the former is not of the proper type for the ItemEntity constructor, and the shulker box uses that as well to make it drop like it does. At the same time, I removed the null check before the instanceof check, because instanceof implicitly checks for null. You don't need an extra null check infront of an instanceof.
I also fixed launch configs not generating properly.
Also a couple things that I noticed, but have not included in this PR:
For the screens, save the text components as static final values if possible, to prevent a new object from being created every tick.
Uneducated assumption based on loose knowledge: To create a list, using Arrays#asList is better than constructing and collecting a stream (especially when done every tick).
Your mods.toml still has the description (and I think credits as well) from the example mod. Consider changing this.
Note: I am pull requesting this onto branch 1.16.1, because there is none for 1.16.4, however if you want this port to be on a separate branch, you can create a new branch, then change the target branch of this pull request.
I changed the
onPlayerDestroy
overrides toonBlockHarvested
because the world provided by the former is not of the proper type for theItemEntity
constructor, and the shulker box uses that as well to make it drop like it does. At the same time, I removed the null check before the instanceof check, becauseinstanceof
implicitly checks fornull
. You don't need an extra null check infront of an instanceof. I also fixed launch configs not generating properly.Also a couple things that I noticed, but have not included in this PR:
Arrays#asList
is better than constructing and collecting a stream (especially when done every tick).mods.toml
still has the description (and I think credits as well) from the example mod. Consider changing this.