Open
Description
Skript/Server Version
[09:13:02 INFO]: [Skript] Server Version: 1.21.5-DEV-0153d6e (MC: 1.21.5)
[09:13:02 INFO]: [Skript] Skript Version: 2.11.0 (skriptlang-github)
[09:13:02 INFO]: [Skript] Installed Skript Addons:
[09:13:02 INFO]: [Skript] - SkBee v3.11.1 (https://github.com/ShaneBeee/SkBee)
[09:13:02 INFO]: [Skript] - skript-reflect v2.6 (https://github.com/SkriptLang/skript-reflect)
[09:13:02 INFO]: [Skript] - SkBriggy v1.5.0 (https://github.com/ShaneBeee/SkBriggy)
[09:13:02 INFO]: [Skript] - SkNMS v1.2.0-1.21.5 (https://github.com/ShaneBeee/SkNMS)
Bug Description
The %item% is edible
condition does not reflect the food properties of custom items.
As it stands right now the code uses Material#isEdible ... which only checks for vanilla items.
Expected Behavior
As of Minecraft 1.20.5 any item can be given custom food properties, the condition should return whether an ItemStack is edible rather than checking the Material.
Steps to Reproduce
Give yourself an apple, then run:
send whether player's tool is edible
This will return true.
Now give yourself a custom item:
/give @s stick[minecraft:consumable={},food={saturation:1,nutrition:2}]
and run the same code
send whether player's tool is edible
This will return false
Errors or Screenshots
No response
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.