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

attackSpeed attribute issue (breaks take command?) #1528

Closed
Rickyling97 opened this issue Jan 16, 2017 · 2 comments
Closed

attackSpeed attribute issue (breaks take command?) #1528

Rickyling97 opened this issue Jan 16, 2017 · 2 comments

Comments

@Rickyling97
Copy link
Contributor

Build: 1633
Spigot: 1.11.2

So, I'm using the nbt_attribute to modify attackspeed for items, and I've got a few items set up like this:

TankSword:
type: item
material: iron_sword[nbt_attributes=li@generic&dotattackDamage/mainhand/0/20.0|generic&dotmovementSpeed/mainhand/2/-0.15|generic&dotattackSpeed/mainhand/0/-3.5]
bound: true
display name: <&7>Longsword
enchantments:
- SWEEPING:3
- KNOCKBACK:1

Any item including the attackSpeed attribute no longer can be found/called by the <inventory.find[ ]> tag. Most everything else can still have their slot returned, but the TankSword one just returns -1. There's no errors in debug or anything.

Somewhat more important, the take command is also affected by this. If I try and take a specific item, by referring to the item script, like - take i@TankShield, as long as there's an item using the attackSpeed nbt attribute in the inventory, in "front" of the item being taken, it'll throw this error.
http://pastebin.com/zeyDFnMr
It looks like when the command is searching the inventory, it errors upon reading the TankSword item?

The TankSword and other attackSpeed using tools also have the "attackspeed:li@randomnumberetc/generic.attackSpeed/ADD_SPEED/3.5;" tag added to them, which seems like the old format/mechanism for attackSpeed.

mcmonkey4eva added a commit to mcmonkey4eva/Denizen that referenced this issue Jan 16, 2017
@mcmonkey4eva
Copy link
Member

I removed the attack speed old stuff. Probably not the best move but anyone who relies on it already, is probably watching changes enough to change it.
If it becomes an issue I can always add back mech-only support or something...

I also improved the meta for that mech as well.

And it looks like somehow you're getting a NULL slot value. Which is odd... not sure why it would be null... but I added a defaulter - if it's null, it will assume "mainhand" instead.
That oughtta prevent the error.

Fixes are available in dev build 118+: http://ci.citizensnpcs.co/job/Denizen_Developmental/

@Rickyling97
Copy link
Contributor Author

Thanks, hopefully this'll fix the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants