PluginBugs / Issues-ItemsAdder

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

MMOItems attributes not loaded #1644

Closed buchaosi closed 2 years ago

buchaosi commented 2 years ago

Terms

Discord tag (optional)

No response

What happened?

Itemsadder cannot connect to mmoitems This is the problem of the loading order of plug-ins

Steps to reproduce the issue

I created an item in itemsadder and asked him to read the items of mmoitems I use the "/ iareload" command Then I use the "/ iaget" command to give the item I created It was found that the item information of mmoitems was not read

Server version

This server is running Paper version git-Paper-794 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

ItemsAdder Version

ItemsAdder version 3.1.1

ProtocolLib Version

ProtocolLib version 4.8.0

LoneLibs Version

LoneLibs version 1.0.18

LightAPI Version (optional)

LightAPI version 3.5.2

LibsDisguises Version (optional)

LibsDisguises version 10.0.28

FULL server log

No response

Error (optional)

No response

ItemsAdder config.yml

metrics: true
update-checker: false
disable-plugin-loading-messages_DONT_ASK_ME_FOR_SUPPORT_IF_YOU_SET_TRUE__THANKS: false
resource-pack:
  apply-on-join: false
  kick-player-on-decline: false
  kick-player-on-fail: true
  delay-ticks: 400
  notify-other-plugins-interfering: true
  title:
    enabled: true
  protect-player:
    black-screen: true
    hide-hud: false
    cancel-movement: true
    lock-player: true
  custom-font:
    enabled: false
    name: ipaexg.ttf
    shift: '[0,0]'
    size: 11.0
    oversample: 2.0
  thin-font:
    enabled: false
  zip:
    fix_transparent_noteblocks__disable-for-more-performance: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - html
    protect-file-from-unzip:
      enabled: true
      extreme: true
    overwrite-vanilla-models: false
    overwrite-vanilla-lang-json: true
    compress-png-files: true
    compress-json-files: true
    generate-custom-armors-textures:
      vanilla_1_17: false
      optifine: false
    disable-overwrite-leather-armor-layers-textures: false
  hosting:
    no-host:
      enabled: false
    auto-external-host:
      enabled: false
    self-host:
      enabled: true
      server-ip: Inconvenient to disclose
      pack-port: Inconvenient to disclose
    external-host:
      enabled: false
      url: ''
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
  command:
    usage-cooldown-seconds: 60
  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
    seach-also-in-these-biomes: {}
    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
  fix-liquids-flow: true
  fix-floating-blocks: true
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: false
  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: false
    replace-only-packets: 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: true
    update-every-ticks: 3600
  player-display-name:
    enabled: true
    update-every-ticks: 1200
  replace-in-customitems-name-and-lore: true
entities:
  max-furniture-vehicles-per-chunk: 100
  allow-removing-old-furnitures_2_3_11: false
  custom-entitites:
    enabled: false
    emotes: false
    interval-rendering-packets-ticks: 1
recipes:
  remove-vanilla-recipes:
    enabled: true
    list:
      DIAMOND_SWORD: false
      IRON_INGOT: false
  hide-vanilla-unrecognized-recipe-errors: true
  fix-packet-too-large-kick: false
  custom-recipes:
    unlock:
      all-on-join: false
      on-pickup:
        any: false
        ingredients: true
debug:
  items:
    log-files-loading: false
    log-items-loading: false
    log-items-loading-disabled: false
    log-font-images-loading: false
    log-huds-loading: false
    log-attribute-modifiers-loading: false
    log-warnings: false
    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
    log-fix-packet-too-large: false
  resource-pack:
    log-extract-default-resources: false
    log-not-extract-default-resources-already-exist: false
  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-generation: false
    log-loading-no-world: true
  trees-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-generation: false
    log-loading-no-world: true
  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
  surface-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-generation: false
    log-loading-no-world: true
  entities:
    log-files-loading: false
    log-entities-loading: false
    log-entities-loading-disabled: false
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
loots:
  allow-loots-drop-from-spawners-using-silk-touch: false

Problematic items yml configuration file (optional)

info:
  namespace: disc
items:
 never_gonna_give_you_up:
    display_name: ""
    mmoitem:
      type: DISIC
      id: nevergonnagiveyouup
    resource:
      generate: true
      material: paper
      model_id: 12001
      textures:
      - "disc/music_disc_nevergonnagiveyouup"
    behaviours:
      music_disc:
        song:
          name: music:disc.NeverGonnaGiveYouUp
          description: Never Gonna Give You Up | by - Rick Astley

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

Configuration of modelengine

Model-Engine: Detection-Range: 64.0 Marker-Tick: 3 Strict-Raytrace: true Use-Slerp: false Animation: LAND: land JUMP: jump DEATH: death SPAWN: spawn WALK: walk IDLE: idle Mode: Animation: B Movement: A Movement-Resolution: 0.001 Model-Generator: Generate-On-Start: true Enable-Error: true Overwrite: true Namespace: modelengine Compartment-Size: 1000 Auto-Clear-Cache: false Create-Zip: true Item-Model: leather_horse_armor Model-Calibrator: Use-Calibration: true Body-Rotation: 0.33 Animation-Sync-A: 0.33 Animation-Sync-B: 0.68 Experimental-Features: Use-Async: false

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

image

LoneDev6 commented 2 years ago

Are you 100% sure that ModelEngine somehow is interfering with the MMOItems->ItemsAdder integration? I really don't see how this is possible. Thanks

buchaosi commented 2 years ago

Are you 100% sure that ModelEngine somehow is interfering with the MMOItems->ItemsAdder integration? I really don't see how this is possible. Thanks

Sorry, my conclusion is wrong Modelengine does not prevent itemsadder from reading items from mmoitems When you replied to me, I had been testing for an hour A new conclusion when When the number of loaded plug-ins reaches 49 and there is a modelengine, itemsader cannot read the ammunition I don't know why the number of plug-ins and modelengine make itemsader unable to read mmoitems But this is true

LoneDev6 commented 2 years ago

Don't worry. Anyway I doubt the cause is the number of plugins. You have to find out the precise plugin which is interfering. Let me know, thanks

buchaosi commented 2 years ago

Don't worry. Anyway I doubt the cause is the number of plugins. You have to find out the precise plugin which is interfering. Let me know, thanks

I just revised my comments. Please look

alantr7 commented 2 years ago

Hello, can you maybe send a list of your plugins? I also have the same problem, and I also have 49 plugins haha.

buchaosi commented 2 years ago

Hello, can you maybe send a list of your plugins? I also have the same problem, and I also have 49 plugins haha.

Certainly Plugins (49): AntiAttack, AuthMe, BlockLocker, Boom, Brewery, ChatItemDisplay, ChestCommands, Chunkmaster, Citizens, CMILib, ConsoleSpamFix, CoreProtect, CoreProtect-Clear, CrazyAuctionsPlus, DeluxeTags, DungeonPlus, DungeonPlusVitality, EasyMotd, Essentials, EssentialsSpawn, GCore, GSit, HolographicDisplays, ItemsAdder, Kingdoms, LagAssist, LaggRemover, LibsDisguises, LightAPI, LiteSignIn, LoneLibs, LuckPerms, Mcrmb, McrmbShop, McrmbVip, MiaoChat, MMOCore, MMOItems, ModelEngine, Multiverse-Core, MythicLib, MythicMobs, OpenInv, PlaceholderAPI, PlayerParticles, ProtocolLib, Vault, WorldEdit, WorldGuard

buchaosi commented 2 years ago

Don't worry. Anyway I doubt the cause is the number of plugins. You have to find out the precise plugin which is interfering. Let me know, thanks

I tested for two hours and came to the conclusion that When the number of loaded plug-ins reaches 49 and there is a modelengine, itemsadder cannot read mmoitems I don't know why it's like this When I test, I randomly delete a plug-in from the list Strangely, itemsadder can read the items of mmoitems again Although those plug-ins are not associated with other plug-ins, even if it is just a white list plug-in

alantr7 commented 2 years ago

I think I have figured it out. Somehow ItemsAdder loads before MMOItems even tho it's plugin.yml has MMOItems specified as a softdepend, so I am not sure what goes wrong here.

So, ItemsAdder thinks MMOItems is not loaded and that's why items are blank.

I'm thinking... there's either another plugin that forces ItemsAdder to load BEFORE MMOItems, or maybe server ignores ItemsAdder's softdepend once a specific amount of plugins are installed and just loads them alphabetically, in this case 49.

alantr7 commented 2 years ago

I don't think LoneDev can do much about this. However, it would still help a lot if he made ItemsAdder recheck loaded plugins (at least the ones used for items) when I do /iareload, instead of only in the plugin enable phase.

buchaosi commented 2 years ago

I don't think LoneDev can do much about this. However, it would still help a lot if he made ItemsAdder recheck loaded plugins (at least the ones used for items) when I do /iareload, instead of only in the plugin enable phase.

I think we should check the loaded plug-ins again in the phase of enabling the resource package, because it is impossible to use the "/ iareload" command every time the server is started

LoneDev6 commented 2 years ago

MMOItems is in the softdepend list of ItemsAdder. I use that method to make sure that MMOItems loads before ItemsAdder because I need to call the MMOItems API in order to "inject" the MMOItems attributes into my custom items.

softdepend:
  - ViaVersion
  - LibsDisguises
  - WorldGuard
  - GriefPrevention
  - Towny
  - Essentials
  - LightAPI
  - Realistic_World
  - EpicWorldGenerator
  - EpicNetherGenerator
  - Skript
  - MythicMobs
  - PlaceholderAPI
  - CMI
  - PermissionsEx
  - LuckPerms
  - Vault
  - MMOItems
  - GlowAPI
  - Slimefun
  - Orebfuscator
  - ExecutableItems
  - AdvancedEnchantments
  - Mimic
  - Citizens
  - ItemBridge
  - ModelEngine

I really don't know if there is another solution to mitigate this issue, maybe MMOItems could call /iareload once it needs to load its own stuff? This will force ItemsAdder to reload its data and correctly hook the items. It's a messy solution but that's the only thing I have on my mind.

alantr7 commented 2 years ago

I am not sure either.. only thing that comes to my mind is that you can maybe schedule item hooks and items loading for after all plugins are loaded, cause item loading is async anyway.

Or.. if item loading is done after all plugins are loaded already, you can probably just do this in the item loading method: Main.MMOITEMS_HOOK = ...is mmoitems loaded... (idk the actual variable name, it's obfuscated)

Thank you for responding.

LoneDev6 commented 2 years ago

This is a strange situation, I really have no clue on how to mitigate this issue. Also ItemsAdder loading is async

buchaosi commented 2 years ago

I used the simplest and most direct method to solve this problem

I used bandizip software to open the "itemsadder. jar" file Then open the "plugin.yml" file inside Move the "- mmoitems" in the softend column to the dependent column Then save Start server The plug-in mmoitems attribute loads normally However, this method is only applicable to servers with this requirement :)

I hope the author can add this method to the wiki This should be the simplest before you think of a good solution It should help a lot of people

LoneDev6 commented 2 years ago

Interesting, i'd like to know if there is a better solution, can you please send this issue link to the MMOItems dev? We might find a solution

buchaosi commented 2 years ago

Interesting, i'd like to know if there is a better solution, can you please send this issue link to the MMOItems dev? We might find a solution

This is the most direct way I can think of However, I would be happy to send this link to them

h266579110 commented 2 years ago

Same problem in here, tried /iareload image image image image

Gruszkomir commented 2 years ago

Yeah i have same problem to.. image image

image

buchaosi commented 2 years ago

Yeah i have same problem to.. image image

image

Please use the compression software to open the "itemsadder. Jar" file Like bandizip Then open the "plugin.yml" file inside Move the "- mmoitems" in the softend column to the dependent column Then save Start server The mmoitems attribute can be loaded normally

buchaosi commented 2 years ago

Same problem in here, tried /iareload image image image image

Please use the compression software to open the "itemsadder. Jar" file Like bandizip Then open the "plugin.yml" file inside Move the "- mmoitems" in the softend column to the dependent column Then save Start server The mmoitems attribute can be loaded normally

alantr7 commented 2 years ago

Hmm I don't think this has much to do with MMOItems specifically. I think a similar issue can happen with any other plugin from the softdepend list. I wonder if there's another way to check if all plugins are loaded without using softdepend, as it is apparently unreliable.

Maybe you can try scheduling the item loading task on the next server tick? I think it will be executed when all other plugins are loaded.

Gruszkomir commented 2 years ago

Please use the compression software to open the "itemsadder. Jar" file Like bandizip Then open the "plugin.yml" file inside Move the "- mmoitems" in the softend column to the dependent column Then save Start server The mmoitems attribute can be loaded normally

Yeah i have same problem to.. image image image

Please use the compression software to open the "itemsadder. Jar" file Like bandizip Then open the "plugin.yml" file inside Move the "- mmoitems" in the softend column to the dependent column Then save Start server The mmoitems attribute can be loaded normally

Thank you, everything works now image