PluginBugs / Issues-ItemsAdder

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

Custom mob drop and craft spawner #1393

Closed Apiz05 closed 2 years ago

Apiz05 commented 2 years ago

Terms

Discord tag (optional)

Aech_#1655

What happened?

when i add this yml the plugin crash and nothing work at all the command and more

here is the yml

  namespace: hhmhsmp
recipes:
  crafting_table:
    zombie_spawner:
      enabled: true
      pattern:
        - FFF
        - FZF
        - FFF
      ingredients:
        Z: hhmhsmp:zombie_soul
        F: hhmhsmp:spawner_fragment
      result:
        item: SPAWNER
        amount: 1
      nbt:
        spawner_type:
          path: SpawnData.id
          value: minecraft:zombie
          type: string  
loots:
  blocks:
    spawner:
      enabled: true
      type: SPAWNER
      items:
        spawner_fragment:
          item: hhmhsmp:spawner_fragment
          min_amount: 1
          max_amount: 1
          chance: 60.0          
  mobs:
    zombie:
      type: ZOMBIE
      items:
        zombie_soul:
          item: hhmhsmp:zombie_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    skeleton:
      type: SKELETON
      items:
        skeleton_soul:
          item: hhmhsmp:skeleton_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    spider:
      type: SPIDER
      items:
        spider_soul:
          item: hhmhsmp:spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    cave_spider:
      type: CAVE_SPIDER
      items:
        cave_spider_soul:
          item: hhmhsmp:cave_spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    stray:
      type: STRAY
      items:
        stray_soul:
          item: hhmhsmp:stray_soul
          min_amount: 1
          max_amount: 1
          chance: 40```

### Steps to reproduce the issue

```info: 
  namespace: hhmhsmp
loots:
  blocks:
    spawner:
      type: spawner
      items:
        spawner_frag:
          item: hhmhsmp:spawner_fragment
          chance: 60.0
          min_amount: 1
          max_amount: 1
  mobs:
    zombie:
      type: ZOMBIE
      items:
        zombie_soul:
          item: hhmhsmp:zombie_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    skeleton:
      type: SKELETON
      items:
        skeleton_soul:
          item: hhmhsmp:skeleton_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    spider:
      type: SPIDER
      items:
        spider_soul:
          item: hhmhsmp:spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    cave_spider:
      type: CAVE_SPIDER
      items:
        cave_spider_soul:
          item: hhmhsmp:cave_spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    stray:
      type: STRAY
      items:
        stray_soul:
          item: hhmhsmp:stray_soul
          min_amount: 1
          max_amount: 1
          chance: 40
recipes:
  crafting_table:
    zombie_spawner:
      enabled: true
      pattern:
        - FFF
        - FZF
        - FFF
      ingredients:
        Z: hhmhsmp:zombie_soul
        F: hhmhsmp:spawner_fragment
      result:
        item: SPAWNER
        amount: 1
      nbt:
        spawner_type:
          path: SpawnData.id
          value: minecraft:zombie
          type: string```

### Server version

```This server is running Purpur version git-Purpur-1441 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: fe05f43 on HEAD)```

### ItemsAdder Version

```[11:54:41 INFO]: ItemsAdder version 2.5.1-beta4
[11:54:41 INFO]: Customized Minecraft without client mods!
[11:54:41 INFO]: Website: devs.beer
[11:54:41 INFO]: Author: LoneDev```

### ProtocolLib Version

```[11:55:08 INFO]: ProtocolLib version 4.7.0
[11:55:08 INFO]: Provides read/write access to the Minecraft protocol.
[11:55:08 INFO]: Authors: dmulloy2 and comphenix```

### LoneLibs Version

```[11:55:28 INFO]: LoneLibs version 1.0.16b
[11:55:28 INFO]: Collection of libs used by my plugins
[11:55:28 INFO]: Authors: LoneDev and others```

### LightAPI Version (optional)

```[11:55:44 INFO]: LightAPI version bukkit-5.1.0 (build SNAPSHOT)
[11:55:44 INFO]: Bukkit library for edit light levels
[11:55:44 INFO]: Website: https://github.com/BeYkeRYkt/LightAPI
[11:55:44 INFO]: Authors: BeYkeRYkt and other contributors in GitHub```

### LibsDisguises Version (optional)

```not installed```

### FULL server log

[2022-01-03-6.log](https://github.com/PluginBugs/Issues-ItemsAdder/files/7801756/2022-01-03-6.log)

### Error (optional)

```shell
[10:29:05 WARN]: [ItemsAdder] Plugin ItemsAdder v2.5.1-beta4 generated an exception while executing task 282962
java.lang.NullPointerException: Cannot invoke "org.bukkit.Material.isBlock()" because "<parameter1>" is null
        at dev.lone.itemsadder.main.hf.g(SourceFile:904) ~[ItemsAdder.jar:?]
        at dev.lone.itemsadder.main.fQ.aK(SourceFile:235) ~[ItemsAdder.jar:?]
        at dev.lone.itemsadder.main.fQ.<init>(SourceFile:60) ~[ItemsAdder.jar:?]
        at dev.lone.itemsadder.main.fR.<init>(SourceFile:87) ~[ItemsAdder.jar:?]
        at dev.lone.itemsadder.main.az.a(SourceFile:1979) ~[ItemsAdder.jar:?]
        at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.1.jar:git-Purpur-1441]
        at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.18.1.jar:git-Purpur-1441]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.18.1.jar:git-Purpur-1441]
        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) ~[?:?]
[10:29:42 WARN]: [ItemsAdder] Plugin is still loading... Please wait before using /iareload```

ItemsAdder config.yml

: 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: 139.99.120.123
      pack-port: 2268
    external-host:
      enabled: false
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
      url: test.yml
  apply-on-join: true
  kick-player-on-decline: true
  kick-player-on-fail: true
  delay-ticks: 3
  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: true
      extreme: true
    overwrite-vanilla-models: false
    overwrite-vanilla-lang-json: false
    fix_transparent_noteblocks__disable-for-more-performance: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - html
    compress-png-files: true
    compress-json-files: true
    generate-custom-armors-textures:
      _: 'Available values: VANILLA_1_17 or OPTIFINE'
      enabled: true
      mode: VANILLA_1_17
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 11000
config_files:
  lang: en
  dictionaries-lang: en
  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: false
  disable-FIRE: false
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: 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:
      NOTE_BLOCK: false
      IRON_INGOT: false
      DIAMOND_SWORD: false
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: true
  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: 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-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)

: 

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

noting

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

noting

LoneDev6 commented 2 years ago

Does spawner_fragment item exists?

Apiz05 commented 2 years ago

yes it exists !!

image

LoneDev6 commented 2 years ago

instead of spawner use SPAWNER

LoneDev6 commented 2 years ago
loots:
  blocks:
    spawner:
      type: SPAWNER
      items:
        spawner_frag:
          item: hhmhsmp:spawner_fragment
          chance: 60.0
          min_amount: 1
          max_amount: 1
Apiz05 commented 2 years ago

I add what you told me but it not working

Apiz05 commented 2 years ago

asdfgh

Apiz05 commented 2 years ago

@LoneDev6

MrJorman commented 2 years ago

@Apiz05 Learn to watch your code, I've implemented it myself and everything works fine. Only here the charm of silk touch does not work at all on fragments and souls.

Apiz05 commented 2 years ago

@Apiz05 Learn to watch your code, I've implemented it myself and everything works fine. Only here the charm of silk touch does not work at all on fragments and souls.

i know that it work, but only for the drop not the craftable spawner

LoneDev6 commented 2 years ago

when i do this it start to working

loots:
  blocks:
    spawner:
      type: SPAWNER
      items:
        spawner_frag:
          item: hhmhsmp:spawner_fragment
          chance: 60.0
          min_amount: 1
          max_amount: 1
  mobs:
    zombie:
      type: ZOMBIE
      items:
        zombie_soul:
          item: hhmhsmp:zombie_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    skeleton:
      type: SKELETON
      items:
        skeleton_soul:
          item: hhmhsmp:skeleton_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    spider:
      type: SPIDER
      items:
        spider_soul:
          item: hhmhsmp:spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    cave_spider:
      type: CAVE_SPIDER
      items:
        cave_spider_soul:
          item: hhmhsmp:cave_spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    stray:
      type: STRAY
      items:
        stray_soul:
          item: hhmhsmp:stray_soul
          min_amount: 1
          max_amount: 1
          chance: 40
#recipes:
#  crafting_table:
#    zombie_spawner:
#       enabled: true
#      pattern:
#        - FFF
#        - FZF
#        - FFF
#      ingredients:
#        Z: hhmhsmp:zombie_soul
#        F: hhmhsmp:spawner_fragment
#      result:
#        item: SPAWNER
#        amount: 1
#      nbt:
#        spawner_type:
#          path: SpawnData.id
#          value: minecraft:zombie
#          type: string

Please be more specific, "when I do this". When you do what? Please explain.

Thanks

Apiz05 commented 2 years ago

i only add this


  blocks:
    spawner:
      type: SPAWNER
      items:
        spawner_frag:
          item: hhmhsmp:spawner_fragment
          chance: 60.0
          min_amount: 1
          max_amount: 1
  mobs:
    zombie:
      type: ZOMBIE
      items:
        zombie_soul:
          item: hhmhsmp:zombie_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    skeleton:
      type: SKELETON
      items:
        skeleton_soul:
          item: hhmhsmp:skeleton_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    spider:
      type: SPIDER
      items:
        spider_soul:
          item: hhmhsmp:spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    cave_spider:
      type: CAVE_SPIDER
      items:
        cave_spider_soul:
          item: hhmhsmp:cave_spider_soul
          min_amount: 1
          max_amount: 1
          chance: 40
    stray:
      type: STRAY
      items:
        stray_soul:
          item: hhmhsmp:stray_soul
          min_amount: 1
          max_amount: 1
          chance: 40
Apiz05 commented 2 years ago

not the recipe for spawner


#  crafting_table:
#    zombie_spawner:
#       enabled: true
#      pattern:
#        - FFF
#        - FZF
#        - FFF
#      ingredients:
#        Z: hhmhsmp:zombie_soul
#        F: hhmhsmp:spawner_fragment
#      result:
#        item: SPAWNER
#        amount: 1
#      nbt:
#        spawner_type:
#          path: SpawnData.id
#          value: minecraft:zombie
#          type: string
MrJorman commented 2 years ago

since in ItemsAdder you can add items and functions, and crafting can be done through the GUI in CustomCrafting

MrJorman commented 2 years ago

use plugin CustomCrafting

MrJorman commented 2 years ago

image i use CustomCrafting plugin

MrJorman commented 2 years ago

image

MrJorman commented 2 years ago

@LoneDev6 LoneDev will never hear me and will not understand that for the spawners you need to add a separate drop from the silk touch, because he is talking about some kind of dupe, but how will I dupe if I can turn the silk function on/off for the spawner in the config. I need souls and fragments to also fall when the spawner is broken with a silk touch.

MrJorman commented 2 years ago

Breaking the spawner with a silk touch in Vanilla Minecraft - nothing falls but experience. Understand this, what kind of deception do you see here?

Apiz05 commented 2 years ago

@MrJorman is this plugin compitable with items adder??

Apiz05 commented 2 years ago

@MrJorman are you stealing asset? from OR

Apiz05 commented 2 years ago

thanks to @MrJorman and @LoneDev6 because read and help me with this