Removing custom names on Chests does not work

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • CraftBukkit

      The setting of custom names on chests still work. However, the removal does not.

      The doActivate method is a helper method so I don't activate the code every time I click something. It only runs when I am sneaking, with a specific item in my main hand, and I performed the required action.

      When set to null: https://i.imgur.com/cNKG5Gu.png

      When set to empty string: https://i.imgur.com/ye2vTMh.png

      Both of those pictures are of me opening the chest after the code ran.

      You can see the disconnect in the states.

      Both of these situations should make the hasCustomName method in TileEntityLootable(and therefore TileEntityChest) return false.

      The issue seems to be loading/saving of nbt to the TileEntity. 

      When the snapshot saves it's data, it has no tag CustomName, and therefore the new(updated) TileEntityChest does not receive the updated information that it's custom name is now gone.

      I'm not really sure how to fix this without making a lot of changes to the way snapshots now work.

            Assignee:
            Unassigned
            Reporter:
            Senmori
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: