Querz / NBT

A java implementation of the NBT protocol, including a way to implement custom tags.
MIT License
182 stars 48 forks source link

Add put if not null to CompoundTag #61

Closed urielsalis closed 3 years ago

urielsalis commented 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

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.04%) to 78.246% when pulling 52680ebad88ee0df9a34154706ae32679b9a394e on urielsalis:add-put-if-not-null into f05f37f6675e81b5263a31f660e65895283b05d7 on Querz:master.

Querz commented 3 years ago

lgtm