Resolution: Awaiting Response
Affects Version/s: Minecraft 18w03b
Fix Version/s: None
Use of items from offhand with uses (potions food bows etc..) require CanPlaceOn NBT tags to be useable whilst looking at blocks in adventure mode.
Additionally when these items have the required NBT to be use-able on, if being used from the offhand slot they also require an item in the players mainhand that also has the required CanPlaceOn NBT.
Despite 1.12 items with no NBT would always be useable despite their NBT in any case while in adventure mode.
The current functionality in the snapshots would also mean that CanPlaceOn is more akin to being CanUseOn rather than only handling placing which would still be inconsistent as you can use these items to interact with noteblocks chests and any other items still.
This could be a problem due to
- Give yourself a standard item with a use that is not placing related, such as a golden apple or potion
- Attempt to eat the apple while in adventure mode and looking at a block
- Now give yourself the same item but with CanPlaceOn NBT for the blocks you are looking at
- Note that you can now consume the apple while looking at the block
- Now place the apple in your offhand slot and place any item without a use into your mainhand, such as a stick or diamond
- Switching between mainhand and offhand note that you can only consume the apple while your mainhand is empty
- Now give yourself an item without a use with CanPlaceOn NBT for the blocks you are looking at
- Note that you can again consume the apple with the new NBT'd stick in your mainhand
Additionally the same results will be return with other items that have right click uses when used in place of the stick in this example such as a bow, drinkable/throwable potion though in previous versions it would be expected that you would be using the mainhanded item initially anyway.