PluginBugs / Issues-ItemsAdder

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

Add a warning about missing `textures` property #2812

Closed TypicalShavonne closed 1 year ago

TypicalShavonne commented 1 year ago

Terms

Discord tag (optional)

typical#0

What happened?

The resourcepack is unable to generate or the /iazip command does not work

Steps to reproduce the issue

  1. Have ItemsAdder installed with MMOItems
  2. Put the config file below into the contents/namespace
  3. Try to /iazip

Server version

This server is running Paper version git-Paper-550 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 483368e on ver/1.19.4)

ItemsAdder Version

ItemsAdder version 3.5.0b

ProtocolLib Version

ProtocolLib version 5.1.0-SNAPSHOT-654

LoneLibs Version

LoneLibs version 1.0.25

FULL server log

2023-06-24-21.log

Error (optional)

[18:26:44] [Craft Scheduler Thread - 25 - ItemsAdder/WARN]: [ItemsAdder] Plugin ItemsAdder v3.5.0b generated an exception while executing task 1191
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
    at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) ~[?:?]
    at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) ~[?:?]
    at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) ~[?:?]
    at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
    at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
    at ia.m.iR.a(SourceFile:172) ~[ItemsAdder_3.5.0b.jar:?]
    at ia.m.iR.b(SourceFile:146) ~[ItemsAdder_3.5.0b.jar:?]
    at ia.m.iR.k(SourceFile:117) ~[ItemsAdder_3.5.0b.jar:?]
    at ia.m.iB.b(SourceFile:525) ~[ItemsAdder_3.5.0b.jar:?]
    at ia.m.G.a(SourceFile:2691) ~[ItemsAdder_3.5.0b.jar:?]
    at ia.m.hH.a(SourceFile:86) ~[ItemsAdder_3.5.0b.jar:?]
    at ia.m.G.a(SourceFile:2458) ~[ItemsAdder_3.5.0b.jar:?]
    at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.4.jar:git-Paper-550]
    at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.4.jar:git-Paper-550]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.4.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]

Problematic items yml configuration file (optional)

info:
  namespace: simpmc
items:
  black_powder:
    mmoitem:
      id: BLACK_POWDER
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/black_powder.png
  bloom_doom:
    mmoitem:
      id: BLOOM_DOOM
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/bloom_doom.png
  blue_candycane:
    mmoitem:
      id: BLUE_CANDYCANE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/blue_candycane.png
  caeletus_ring:
    mmoitem:
      id: CAELETUS_RING
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/caeletus_ring.png
  calamity_handle:
    mmoitem:
      id: CALAMITY_HANDLE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/calamity_handle.png
  cataclysm_handle:
    mmoitem:
      id: CATACLYSM_HANDLE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/cataclysm_handle.png
  catastrophe_broken:
    mmoitem:
      id: CATASTROPHE_BROKEN
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/catastrophe_broken.png
  crate_key:
    mmoitem:
      id: CRATE_KEY
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/crate_key.png
  crimstone:
    mmoitem:
      id: CRIMSTONE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/crimstone.png
  detached_eye:
    mmoitem:
      id: DETACHED_EYE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/detached_eye.png
  divine_geode:
    mmoitem:
      id: DIVINE_GEODE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/divine_geode.png
  dragon_scale:
    mmoitem:
      id: DRAGON_SCALE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/dragon_scale.png
  endercore:
    mmoitem:
      id: ENDERCORE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/endercore.png
  exo_stone:
    mmoitem:
      id: EXO_STONE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/exo_stone.png
  hexim_necklace:
    mmoitem:
      id: HEXIM_NECKLACE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/hexim_necklace.png
  ignetto_alloy:
    mmoitem:
      id: IGNETTO_ALLOY
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/ignetto_alloy.png
  iridium_crystal:
    mmoitem:
      id: IRIDIUM_CRYSTAL
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/iridium_crystal.png
  iridium_shard:
    mmoitem:
      id: IRIDIUM_SHARD
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/iridium_shard.png
  mortos_belt:
    mmoitem:
      id: MORTOS_BELT
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/mortos_belt.png
  mythril_ingot:
    mmoitem:
      id: MYTHRIL_INGOT
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/mythril_ingot.png
  nightmare_bar:
    mmoitem:
      id: NIGHTMARE_BAR
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/nightmare_bar.png
  nightmare_fuel:
    mmoitem:
      id: NIGHTMARE_FUEL
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/nightmare_fuel.png
  null_cell:
    mmoitem:
      id: NULL_CELL
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/null_cell.png
  orichalcum_ingot:
    mmoitem:
      id: ORICHALCUM_INGOT
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/orichalcum_ingot.png
  prismatic_fruit:
    mmoitem:
      id: PRISMATIC_FRUIT
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/prismatic_fruit.png
  quinerus_cloak:
    mmoitem:
      id: QUINERUS_CLOAK
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/quinerus_cloak.png
  red_candycane:
    mmoitem:
      id: RED_CANDYCANE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/red_candycane.png
  shard_of_true_ice:
    mmoitem:
      id: SHARD_OF_TRUE_ICE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/shard_of_true_ice.png
  silver_leaf:
    mmoitem:
      id: SILVER_LEAF
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/silver_leaf.png
  slimy_mucus:
    mmoitem:
      id: SLIMY_MUCUS
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/slimy_mucus.png
  teal_mushroom:
    mmoitem:
      id: TEAL_MUSHROOM
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/teal_mushroom.png
  titanium_ingot:
    mmoitem:
      id: TITANIUM_INGOT
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/titanium_ingot.png
  uncanny_obelisk:
    mmoitem:
      id: UNCANNY_OBELISK
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/uncanny_obelisk.png
  uranium:
    mmoitem:
      id: URANIUM
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/uranium.png
  uranium_debris:
    mmoitem:
      id: URANIUM_DEBRIS
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/minerals/uranium_debris.png
  void_gem:
    mmoitem:
      id: VOID_GEM
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/void_gem.png
  void_stone:
    mmoitem:
      id: VOID_STONE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/void_stone.png
  warden_heart:
    mmoitem:
      id: WARDEN_HEART
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/warden_heart.png
  witch_blood:
    mmoitem:
      id: WITCH_BLOOD
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/witch_blood.png
  withered_rose:
    mmoitem:
      id: WITHERED_ROSE
      type: MATERIAL
    resource:
      generate: true
      material: PAPER
      textures:
        - custom/items/materials/withered_rose.png
  luoidaobien:
    display_name: "&bLưỡi Dao Biển"
    mmoitem:
      id: LUOIDAOBIEN
      type: MATERIAL
    resource:
      generate: true
      material: DRIED_KELP
  bongden:
    display_name: "&7Bóng đen khói mờ"
    mmoitem:
      id: BONGDEN
      type: MATERIAL
    resource:
      generate: true
      material: ENDER_PEARL
  ngocsang:
    display_name: "&eNgọc cẩm thạch sáng"
    mmoitem:
      id: NGOCSANG
      type: MATERIAL
    resource:
      generate: true
      material: GHAST_TEAR
  huyetngoc:
    display_name: "&cHuyết Ngọc Biển"
    mmoitem:
      id: HUYETNGOC
      type: MATERIAL
    resource:
      generate: true
      material: FERMENTED_SPIDER_EYE
  manhhuyetngoc:
    display_name: "&cMảnh Huyết Ngọc Biển"
    mmoitem:
      id: MANHHUYETNGOC
      type: MATERIAL
    resource:
      generate: true
      material: NETHER_WART
  recay:
    display_name: "&aRễ cây đại thụ"
    mmoitem:
      id: RECAY
      type: MATERIAL
    resource:
      generate: true
      material: OAK_SAPLING
  vayngoc:
    display_name: "&6Vảy Ngọc Biển"
    mmoitem:
      id: VAYNGOC
      type: MATERIAL
    resource:
      generate: true
      material: PRISMARINE_SHARD
  lachansongbien:
    display_name: "&9Lá chắn sóng biển"
    mmoitem:
      id: LACHANSONGBIEN
      type: MATERIAL
    resource:
      generate: true
      material: PRISMARINE
  huyetngocbien:
    display_name: "&9Huyết Ngọc Biển"
    mmoitem:
      id: HUYETNGOCBIEN
      type: MATERIAL
    resource:
      generate: true
      material: SLIME_BALL

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

material.zip MMOItems config

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

No response

LoneDev6 commented 1 year ago

Your models have no texture property even if you set generate: true. Even if this is not a bug I'll add a proper warning about it in the logs.

For example:

  huyetngocbien:
    display_name: "&9Huyết Ngọc Biển"
    mmoitem:
      id: HUYETNGOCBIEN
      type: MATERIAL
    resource:
      generate: true
      material: SLIME_BALL
      textures:
       - item/my_texture

or if you have a model for this item

  huyetngocbien:
    display_name: "&9Huyết Ngọc Biển"
    mmoitem:
      id: HUYETNGOCBIEN
      type: MATERIAL
    resource:
      generate: false
      material: SLIME_BALL
      model_path: item/my_model

Please use the official editor while editing to avoid mistakes. https://itemsadder.devs.beer/plugin-usage/files-editor As you can see it reports you the missing property instantly. DO NOT EDIT THE FILES MANUALLY.

image

TypicalShavonne commented 1 year ago

but i still want to have my item intergratef to itemsadder, that item is an normal minecraft item, i dont use any texture for it ?