
Damage item/equipmentslot naturally
Fusezion opened this issue ยท 0 comments
Suggestion
add LivingEntity#damageItemStack(EquipmentSlot, Int) and ItemStack#damage(Int, LivingEntity)
Why?
Skript has no easy way for a player to damage an item, send a break effect and remove it.
This method handles everything for the player and follows general vanilla breaking mechanics.
Other
First one allows damaging a specific equipment slot which will break the item if they reach 0 and applies the item break effect and more.
Second one is similar but I am not fully sure how that one works, its behavior is a bit unknown but should follow similar principles as the first method,
I'm concerned about the pattern and some other things. Due to the nature it always requires an entity to process gamemode, stat and advancement triggers.
An originally suggested syntax is [naturally] damage %itemstack/equipmentslot% of %livingentity% by %number%
naturally doesn't do anything but helps express a bit more that it follows normal damage rules i.e. gamemode and unbreaking enchantments apply different than damage %itemstack% by %number%
Agreement
- I have read the guidelines above and affirm I am following them with this suggestion.