Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use_cooldown nbt(item component/MC 1.21.1+) got ignored at POTION/projectiles #4279

Closed
6 tasks done
minejango2 opened this issue Dec 27, 2024 · 4 comments
Closed
6 tasks done
Labels
type: bug Something isn't working
Milestone

Comments

@minejango2
Copy link

Terms

  • I'm using the very latest version of ItemsAdder and its dependencies.
  • I am sure this is a bug and it is not caused by a misconfiguration or by another plugin.
  • I've looked for already existing issues on the Issue Tracker and haven't found any.
  • I already searched on the plugin wiki to know if a solution is already known.
  • I searched the #itemsadder-forum channel on Discord for similar issues.
  • I tested that this issue persists on a bare-minimum Server as described in #4187.

Discord Username (optional)

No response

What happened?

The item's "use_cooldown" nbt got ignored.
For example, if put a projectile or food value such as ender_pearl or wind_charge in the material and put use_cooldown nbt value at nbt, take out the item and test it, can keep throwing or eating it without actually applying the cooldown.

(I checked item's nbt by /data merge entity @s SelectedItem, there was a use_cooldown nbt.)
(There are a few errors in the latest log, but they were simply my mistake in typing nbt incorrectly, and there were no error messages in the final test. (still uploded latest.log))
(I used Google Translator. sorry if my words were aggresive)

Steps to reproduce the issue

item doesn't ignore use_cooldown nbt.

Server version

Paper version 1.21.4-49-main@953f6f9 (2024-12-27T00:08:09Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)

ItemsAdder Version

ItemsAdder version 4.0.6

ProtocolLib Version

ProtocolLib version 5.4.0-SNAPSHOT-738

LoneLibs Version

LoneLibs version 1.0.63

Full Server Log

https://mclo.gs/kohIM9F

Error (optional)

No response

Problematic items yml configuration file (optional)

c_windcharge:
    enabled: true
    display_name: '&ftest'
    specific_properties:
      potion:
        color: 3145556
    nbt: "{components: {\"minecraft:consumable\": {consume_seconds: 1f, sound: \"minecraft:block.glass.break\"}, \"minecraft:max_stack_size\":16, \"minecraft:use_cooldown\": {seconds: 10.0f}}}"
    resource:
      material: ender_pearl
      generate: true
      textures:
        - "minecraft:item/potion_overlay"
        - "minecraft:item/potion"

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)

ezgif-7-247dba6763

@minejango2 minejango2 added the type: bug Something isn't working label Dec 27, 2024
@minejango2
Copy link
Author

minejango2 commented Dec 27, 2024

  • about food & drinks, only potion ignores use_cooldown item component, not food. sorry for misinformation

@minejango2 minejango2 changed the title use_cooldown nbt(item component/MC 1.20.5+) got ignored use_cooldown nbt(item component/MC 1.20.5+) got ignored at POTION/projectiles Dec 30, 2024
@LoneDev6
Copy link
Collaborator

This will be tested, strange

@LoneDev6 LoneDev6 moved this from New to Todo in ItemsAdder Jan 13, 2025
@LoneDev6 LoneDev6 added this to the 4.0.7 milestone Jan 13, 2025
@LoneDev6 LoneDev6 modified the milestones: 4.0.7, 4.0.8 Jan 23, 2025
@LoneDev6
Copy link
Collaborator

LoneDev6 commented Jan 27, 2025

Fixed in the upcoming update, thanks!
Note that this feature is only for 1.21.1+ (client and server).

@LoneDev6
Copy link
Collaborator

Minecraft.1.21.4.-.Multiplayer.3rd-party.Server.2025-01-27.18-28-55.2.mp4
  cooldown_bar_test_vanilla3:
    enabled: true
    display_name: 'cooldown_bar_test_vanilla3'
    max_stack_size: 64
    nbt: "{components: {\"minecraft:consumable\": {consume_seconds: 1f, sound: \"minecraft:block.glass.break\"}}"
    events_settings:
      cooldown:
        indicator: VANILLA
        ticks: 200
    resource:
      generate: false
      model_path: minecraft:item/diamond
      material: ENDER_PEARL

In the next updates I will also implement the consumable settings directly in ItemsAdder item config instead of using NBT.
In the meantime take a look at the new NBT file feature #4114

@LoneDev6 LoneDev6 moved this from Todo to Done in ItemsAdder Jan 27, 2025
@LoneDev6 LoneDev6 changed the title use_cooldown nbt(item component/MC 1.20.5+) got ignored at POTION/projectiles use_cooldown nbt(item component/MC 1.20.5+) got ignored at POTION/projectiles Jan 27, 2025
@LoneDev6 LoneDev6 changed the title use_cooldown nbt(item component/MC 1.20.5+) got ignored at POTION/projectiles use_cooldown nbt(item component/MC 1.21.1+) got ignored at POTION/projectiles Jan 27, 2025
@LoneDev6 LoneDev6 closed this as completed Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants