Slimefun Rainbow armor is able to recolor normal and even custom leather armor
TheLaoming opened this issue · 1 comments
❗ Checklist
- I am using the official english version of Slimefun and did not modify the jar.
- I am using an up to date "DEV" (not "RC") version of Slimefun.
- I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
- I searched for similar open issues and could not find an existing bug report on this.
📍 Description
Hey, so very quickly and briefly, this bug is about rainbow armor. Once when you put on the armor and quickly wear on a different leather armor (even custom one), it's recolored then too. This mess up with other armors and especially custom armors, cuz these needs specific colors to work.
📑 Reproduction Steps
- Put on rainbow chestplate or any other part
- Take it off
- Quickly put on basic leather armor, it's recolored.
💡 Expected Behavior
Do not recolor other armors.
📷 Screenshots / Videos
sf.issue.mp4
📜 Server Log
No response
📂 /error-reports/
folder
No response
💻 Server Software
Paper
🎮 Minecraft Version
1.19.x
⭐ Slimefun version
Slimefun version DEV - 1087 (git dc22e66)
🧭 Other plugins
No response
Can confirm this. This is caused by a difference in the armor-update-interval
and rainbow-armor-update-interval
config options. The default values are 10 and 3 respectively. When the rainbow armor task runs it checks the armor that's cached by the armor update task, but since the armor update task is slower, the rainbow task will almost always run once or twice before the armor update task runs. The only conditions in the rainbow task are: the cached armor piece is rainbow armor, the player can use the cached armor piece, the current armor piece is leather and the current armor piece has item meta (e.g. custom name, lore or color). If those 4 conditions are fulfilled it just changes the color.