Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

Slimefun Rainbow armor is able to recolor normal and even custom leather armor

Open TheLaoming opened this issue 2 years ago โ€ข 1 comments

โ— Checklist

  • [X] I am using the official english version of Slimefun and did not modify the jar.
  • [X] I am using an up to date "DEV" (not "RC") version of Slimefun.
  • [X] I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • [X] 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

  1. Put on rainbow chestplate or any other part
  2. Take it off
  3. Quickly put on basic leather armor, it's recolored.

๐Ÿ’ก Expected Behavior

Do not recolor other armors.

๐Ÿ“ท Screenshots / Videos

https://github.com/Slimefun/Slimefun4/assets/75527300/2747fa92-b06d-4bb2-90ea-638b79cc5491

๐Ÿ“œ Server Log

No response

๐Ÿ“‚ /error-reports/ folder

No response

๐Ÿ’ป Server Software

Paper

๐ŸŽฎ Minecraft Version

1.19.x

โญ Slimefun version

Slimefun version DEV - 1087 (git dc22e665)

๐Ÿงญ Other plugins

No response

TheLaoming avatar Jul 30 '23 20:07 TheLaoming

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.

iTwins avatar Aug 03 '23 00:08 iTwins