Zrips / CMI

116 stars 97 forks source link

Error loading Head Database head based CMI saved items #9020

Closed Momshroom closed 1 month ago

Momshroom commented 2 months ago

Description of Issue

When CMI is loading in 1.20.6 saved items that are based on HDB heads, I get a console error and the items do not have any of their attached commands and also do not look like the heads they should look like. This is true even if they are pulled from the /cmi saved items gui.

The same items work perfectly in 1.20.4. Please note that HDB changed their heads recently to use HeadDatabase rather than Head Database internally to be 1.20.6 compatible and I'm assuming that this is related to the problem. I'm not sure if this is entirely a CMI problem, but I would like the heads to at least work (have the attached commands still function) even if they can't look the same.

I have already replaced "internal" with "custom" in the file, which made my non-hdb based heads work again.

Version Information

[22:36:49 INFO]: --------------------------------------------------
[22:36:49 INFO]: CMI plugin version: 9.7.5.0 MySQL
[22:36:49 INFO]: CMILib: 1.5.1.0 
[22:36:49 INFO]: Server: Paper(148) 1.20.6-R0.1-SNAPSHOT+
[22:36:49 INFO]: CMI economy: Disabled Vault: 1.7.3-b131 CMI Chat: Disabled 
[22:36:49 INFO]: Modules -> 58 enabled 8 disabled: spawnerProximity, flightCharge, disabledEnchants, mirror, ranks, moneyCheque, spawners, spawnerCharge
[22:36:49 INFO]: --------------------------------------------------

Errors

https://paste.gg/p/Momshroom/5992190d76b348689bddc852570c4f98

Relevant Config Sections

Sample broken saved item:
  EasterBunnyCarrotCake:
    Item:
      v: 3700
      type: PLAYER_HEAD
      meta:
        ==: ItemMeta
        meta-type: SKULL
        display-name: '{"text":"","extra":[{"text":"The Easter Bunny''s Carrot Cake","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"#E6A500","bold":false}]}'
        lore:
        - '{"text":"","extra":[{"text":"Use this special cake to get a boost:","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"aqua","bold":false}]}'
        - '{"text":"","extra":[{"text":"Jump boost! (also speed, night vision and
          saturation)","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"aqua","bold":false}]}'
        - '{"text":"","extra":[{"text":"Make more with carrots!","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"aqua","bold":false}]}'
        - '{"text":"","extra":[{"text":"Item usages: ","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"yellow","bold":false},{"text":"1","italic":false,"color":"gold"}]}'
        internal: H4sIAAAAAAAA/3WQQW+CMABGu5glbrvsYLIf4RIRKNDDkgEThhHIBFf1Vi0TKlBEEPC0nz53XDKv70veS757AHqgPyc55ZlDnwbfwR148IzQ5Fl2gcc+AOAWvGL6yRTZcsgICTD1bZJyHcn+RpUqj5WeCnWsYFbtWnVn+PgNDeOstmJWWGJJcy554PlfQxMdmHzSisjSunUnxnkgoa32cqXXGIlI7MZdl/svBDVYBzQOV0tSBNOwW4tIz2My3XVQkZ0rBilt9blihqmBoX0eWdMZGy6W6b5aKgEZI/vjvFpt1ULCgnLN0MFkIpxar9tT3TTd5LBZbLBnwInvjnzBevdZzWXOpfO8Bwam68ySLKkiujhGZl2WUV5dDr3pgcc/k0vaXwx+AHRsGcOOAQAA
        skull-owner:
          ==: PlayerProfile
          uniqueId: 04049c90-d3e9-4621-9caf-0000aaa28270
          name: Head Database
          properties:
          - name: textures
            value: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmIyNmMxMjJlZGYwZDExZTQ2NWE1OTEyMDkwMDYwYWUyOTI3NGQyM2IxOWZkYjhkNzdiMWQ0YjM3NzNhN2VjZCJ9fX0=


### Relevant Plugins

HeadDatabase version 4.19.8

### Agreements

- [X] My server is supported by CMI.
- [X] My version of CMI at the time of this report is up to date.
- [X] I have searched the github and asked around before making this report.
Momshroom commented 2 months ago

Note: I just tried editing the skull owner name property in the saveditems.yml from Head Database to HeadDatabase.
This fixed the skins: the heads now look correct, and it removes the loading error, but now NONE of my saved items load with their attached commands, not even the non-hdb based ones.

Momshroom commented 2 months ago

Correction: items in my enderchest still have attached commands, ones obtained through /cmi saveditems do not

Momshroom commented 2 months ago

Removing the head based items from the saveditems.yml completely fixes the rest of the items.

Zrips commented 1 month ago

Issue is with how minecraft handles item deserialization in 1.20.6 which are now more picky when it comes to skull owner name having spaces in it, simply updating it with Head_Database or HeadDatabase can resolve your issue. This deserialization and serialization being done by minecraft server itself, so I have limited control over it. Its not ideal solution, but its one time thing when converting over to 1.20.6+ servers. Will check if I can make automated fix for it with next update