Skip to content
New issue

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

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

Already on GitHub? # to your account

Problem of comparing ItemTypes #32

Closed
Romitou opened this issue May 1, 2021 · 2 comments
Closed

Problem of comparing ItemTypes #32

Romitou opened this issue May 1, 2021 · 2 comments
Labels
bug Something isn't working completed The issue has been resolved and the next update will apply requested changes help wanted Extra attention is needed priority : high Important features missing or bugs with a potentially high impact

Comments

@Romitou
Copy link
Collaborator

Romitou commented May 1, 2021

For example, using the code below, the ItemType#isTypeOf method does not work as expected, with for example nether warts:

on click on nether wart:
    broadcast "test"

Related code: https://github.com/Matocolotoe/Skript-1.8/blob/master/src/main/java/ch/njol/skript/events/EvtClick.java#L197
The ItemStack of o equals ItemStack{NETHER_WARTS x 1} while the ItemStack of block equals ItemStack{NETHER_STALK x 1}, which means that the event does not work.

@Matocolotoe Matocolotoe added bug Something isn't working help wanted Extra attention is needed priority : high Important features missing or bugs with a potentially high impact labels May 1, 2021
@AyhamAl-Ali
Copy link

I think this might help SkriptLang/Skript#4162 👍

@Matocolotoe
Copy link
Owner

The issue doesn't occur on 1.9+ with official Skript builds, with or without this pull request, so it's only related to 1.8 I guess.

Matocolotoe added a commit that referenced this issue Aug 27, 2021
@Matocolotoe Matocolotoe added the completed The issue has been resolved and the next update will apply requested changes label Aug 27, 2021
harryirl added a commit to harryirl/Skript-1.8 that referenced this issue May 26, 2022
@Henriiig Henriiig mentioned this issue Feb 4, 2024
1 task
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working completed The issue has been resolved and the next update will apply requested changes help wanted Extra attention is needed priority : high Important features missing or bugs with a potentially high impact
Projects
None yet
Development

No branches or pull requests

3 participants