PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Try to merge same nbt item of mmoitems items and itemsadder items #1392

Closed Caishangqi closed 2 years ago

Caishangqi commented 2 years ago

Terms

Discord tag (optional)

Caihuashe#6817

What happened?

By using the tag

mmoitem:
      type: 
      id: 

I could connect mmoitems item with Itemsadder, and itemsadder would add a nbt tag at the end of the nbt tag. I'd like to make the items generated by mmoitems and itemsadder stack together. I add a custom nbt in mmoitems, and it correctly generated by itemsadder. However, the two items can not stack with the same number of nbts. I had check the individual nbt and found that the display part of nbt was different between the two plugins, which I I think this is the problem.

Here are the two files which I paste the nbts: The nbt generated by Itemsadder: items1 nbt The nbt generated by MMOItems: items2 nbt

%)$_%GAX9U 8Y{N}KCA534H

In line 23, the display.lore.data was shown in different syntaxes between the two files. Besides, I had tried add custom nbt in ItemsAdder Items but it was not work, perhaps the tag mmoitem: overridden it. Here is the yml file I modified on the custom item. items yml

Steps to reproduce the issue

  1. create an itemsadder items
  2. create an mmoitems items
  3. connect itemsadder with mmoitems by using mmoitem: in yml
  4. add a custom nbt tag at mmoitems
  5. take 1 item from mmoitems
  6. take 1 same item from itemsadder
  7. try to merge them
  8. although with the same number of nbts, they can not merge together

Server version

This server is running Paper version git-Paper-401 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: 5bd2611 on ver/1.17.1) You are 7 version(s) behind Download the new version at: https://papermc.io/downloads Previous version: git-Paper-391 (MC: 1.17.1)

ItemsAdder Version

ItemsAdder version 2.5.1-beta4

ProtocolLib Version

ProtocolLib version 4.8.0-SNAPSHOT-b538

LoneLibs Version

LoneLibs version 1.0.16b

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

No response

Error (optional)

No response

ItemsAdder config.yml

metrics: true
update-checker: true
disable-plugin-loading-messages_DONT_ASK_ME_FOR_SUPPORT_IF_YOU_SET_TRUE__THANKS: false
resource-pack:
  hosting:
    no-host:
      enabled: false
    auto-external-host:
      enabled: false
    self-host:
      enabled: true
      server-ip: 127.0.0.1
      pack-port: 8163
    external-host:
      enabled: false
      url: ''
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
  apply-on-join: true
  kick-player-on-decline: false
  kick-player-on-fail: false
  delay-ticks: 1
  notify-other-plugins-interfering: true
  title:
    enabled: true
  protect-player:
    black-screen: true
    hide-hud: true
    cancel-movement: true
    lock-player: true
  command:
    usage-cooldown-seconds: 60
  custom-font:
    enabled: false
    name: ipaexg.ttf
    shift: '[0,0]'
    size: 11.0
    oversample: 2.0
  thin-font:
    enabled: false
  zip:
    protect-file-from-unzip:
      enabled: false
      extreme: false
    compress-png-files: true
    compress-json-files: true
    overwrite-vanilla-models: false
    overwrite-vanilla-lang-json: false
    generate-custom-armors-textures:
      _: 'Available values: VANILLA_1_17 or OPTIFINE'
      enabled: true
      mode: VANILLA_1_17
    fix_transparent_noteblocks__disable-for-more-performance: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - html
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 11000
config_files:
  lang: zh_cn
  dictionaries-lang: zh_cn
  extract-default-items: false
  extract-default-resources: false
blocks:
  light-api: true
  fix-glitched-blocks:
    enabled: true
    only-new-chunks: false
    search-also-in-these-biomes:
      enabled: false
      biomes:
      - BEACH
      - BIRCH_FOREST
      - BIRCH_FOREST_HILLS
      - FOREST
      - MOUNTAINS
      - MOUNTAIN_EDGE
      - GRAVELLY_MOUNTAINS
      - PLAINS
      - RIVER
  cancel-break-wrong-tool:
    enabled: true
    send-actionbar: true
  campfire:
    unlit-on-place: true
    allow-any-item: true
  disable-REAL: false
  disable-REAL_TRANSPARENT: false
  disable-REAL_NOTE: false
  disable-REAL_WIRE: true
  disable-FIRE: false
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: true
  hide-custom-durability-lore: false
liquids:
  enabled: true
huds:
  enabled: true
mobs:
  disable-MOB-behaviour__DISABLE_AT_YOUR_OWN_RISK: false
font_images:
  chat:
    enabled: true
    doublecheck-permission__disable-for-more-performance: false
    add-hover-suggestion: true
  command:
    enabled: true
    commandblocks: true
    excluded:
    - home
    - sethome
    - tpa
  sign:
    enabled: true
  book:
    enabled: true
  anvil:
    enabled: true
  inventory-title:
    enabled: true
  tab-header-footer:
    enabled: true
  vault-prefix-suffix:
    enabled: true
    update-every-ticks: 1200
  scoreboard-teams:
    enabled: false
    update-every-ticks: 3600
  player-display-name:
    enabled: true
    update-every-ticks: 1200
  replace-in-customitems-name-and-lore: true
effects:
  hide-scoreboard-numbers: false
  text-effects:
    enabled: true
    replace-in-customitems-name-and-lore: true
    chat:
      enabled: true
    sign:
      enabled: true
    book:
      enabled: true
    anvil:
      enabled: true
    tab-header-footer:
      enabled: true
entities:
  max-furniture-vehicles-per-chunk: 30
  allow-removing-old-furnitures_2_3_11: false
recipes:
  hide-vanilla-unrecognized-recipe-errors: true
  custom-recipes:
    unlock:
      all-on-join: false
      on-pickup:
        any: false
        ingredients: true
  remove-vanilla-recipes:
    enabled: true
    list:
      DIAMOND_SWORD: false
      IRON_INGOT: false
debug:
  items:
    log-files-loading: true
    log-items-loading: true
    log-items-loading-disabled: false
    log-font-images-loading: false
    log-huds-loading: false
    log-attribute-modifiers-loading: false
    log-warnings: true
    log-loots-loading: false
    log-loots-loading-disabled: false
    log-armors-loading: false
  recipes:
    log-recipes-loading: false
    log-recipes-loading-disabled: false
    log-recipes-removed-vanilla: false
  resource-pack:
    log-extract-default-resources: false
    log-not-extract-default-resources-already-exist: true
  blocks:
    log-save: false
    log-save-on-unload: false
    log-mined-unknown-blocks: true
  worlds-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  trees-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  surface-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
  player-stats:
    log-save: false
  performance:
    loading-ms: true
  huds:
    log-triggers: false
  other:
    log-dictionaries-loading: false
    log-liquids-loading: false
    log-minecraft_lang_overwrite-loading: false
  categories:
    log-total-loaded: true
    log-single-loaded: false
    log-single-loaded-overwrite: false
    log-single-skip: false

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

1641209680437

LoneDev6 commented 2 years ago

It's not really possible because of how Minecraft stacking works. It doesn't work if NBT tag values are organized in different order or if a single NBT tag is added to an item and not to the other.

The only way to handle this situation is to make sure to get the ItemsAdder+MMOItem merged custom items from ItemsAdder menu/command and not from MMOItem menu/command. This way is the only way to make sure items are 100% equal and stackable.

Caishangqi commented 2 years ago

It's not really possible because of how Minecraft stacking works. It doesn't work if NBT tag values are organized in different order or if a single NBT tag is added to an item and not to the other.

The only way to handle this situation is to make sure to get the ItemsAdder+MMOItem merged custom items from ItemsAdder menu/command and not from MMOItem menu/command. This way is the only way to make sure items are 100% equal and stackable.

Got it, thanks!

LoneDev6 commented 2 years ago

I'm very sorry, I wish I had a solution for this bug it's not possible. Have a nice day!