ItemHelper#get/setCanPlaceOn - the blocks you can place an item on in adventure mode.
ItemHelper#get/setCanBreak - the blocks you can break with an item in adventure mode.
ReflectionMappingsInfo.AdventureModePredicate_predicates - reflection mappings for new ItemHelper methods.
Changes
ItemTag.can_place_on and can_destory now use the new ItemHelper methods.
[!NOTE]
Named the ItemHelper methods CanBreak instead of CanDestroy because that's what Mojang calls it now, and makes sense to reflect the internal naming for the thing it's setting there even if the Denizen naming is different imo - let me know if you'd prefer matching the Denizen naming though.
[!NOTE]
Kept the NBT handling in CustomNBT as it's methods that will eventually be removed either way & didn't want to clutter ItemHelper, but let me know if we should just move them there.
[!NOTE]
This doesn't represent the full thing anymore, as Mojang added block state & tile entity NBT predicates to these values.
Didn't want to implement this right now as A. this is mostly a "make it work" PR, B. not sure how to cleanly represent something like this in Denizen currently, and C. this is something Paper is adding API for, so we're probably better off waiting for that and implementing it based on what they add, to avoid being stuck with NMS forever.
To avoid item data getting erased was thinking to add a raw_properties property to still persist stuff that aren't properly represented in Denizen properties yet (like what raw_nbt used to do).
Additions
ItemHelper#get/setCanPlaceOn
- the blocks you can place an item on in adventure mode.ItemHelper#get/setCanBreak
- the blocks you can break with an item in adventure mode.ReflectionMappingsInfo.AdventureModePredicate_predicates
- reflection mappings for newItemHelper
methods.Changes
ItemTag.can_place_on
andcan_destory
now use the newItemHelper
methods.