Closed urielsalis closed 3 years ago
Adds a helper method that only puts a tag in a compound tag if its not null
The idea is allow easier chaining while adding new elements (as you dont have to do a null check on each one)
While I was at it I also cleaned up the test a bit, let me know if you want me to revert it
Coverage increased (+0.04%) to 78.246% when pulling 52680ebad88ee0df9a34154706ae32679b9a394e on urielsalis:add-put-if-not-null into f05f37f6675e81b5263a31f660e65895283b05d7 on Querz:master.
lgtm
Adds a helper method that only puts a tag in a compound tag if its not null
The idea is allow easier chaining while adding new elements (as you dont have to do a null check on each one)
While I was at it I also cleaned up the test a bit, let me know if you want me to revert it