Closed FireController1847 closed 2 years ago
(it would fall through to the next line, as in, default is dirt arrow, instead of returning null). Was this intentional logic? I need to revert this if it was.
This was intentional logic so that if another mod (or some vanilla mechanic we didn't think of) calls an empty or default ArrowType it doesn't crash the game, but instead just gives the Dirt arrow stats/item. Minecraft is weird with null values sometimes and either passes over them or just dies lol.
Oh, thanks for doing that for me. Was gonna revert it tomorrow but that's even better haha
You ready boys? Here's the list of things I did. The diff is not very helpful, I'd recommend opening up the workspace if you can and seeing how everything has changed and is related. If I did good, it should feel more consistent, clean, and easy to work with. If you really want to see a diff, try checking it per-commit since each commit did its own set of cleanup.
Theoretically, little to no logic was changed in how things are handled. It should all be cosmetic except for a few minor changes I made.
run/client
,run/server
, andrun/data
respectively. I've always found this to be cleaner for testing as it separates all the files on the client and the server in the run folder. I'd highly recommend you delete your current run configurations and run folder, then generate new ones, for cleanliness.@EventBusSubscriber
annotation, for cleanliness.The ArrowType#getModItemFor class was marked as nullable, but never returned null, so I fixed that as there was no return for default or empty cases (it would fall through to the next line, as in, default is dirt arrow, instead of returning null). Was this intentional logic? I need to revert this if it was.items.custom
toitems
).Most of the changes I made are entirely cosmetic, and so if you want me to revert any of the things listed above, go ahead and let me know and I will. Or if you want something else changed for consistency or cleanliness, I'd be more than willing to do that too. Otherwise, if it's good, then I'll continue work on the Quiver.