blob: 60bda976622a75d04ef42133b1758617fc01f6eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package de.hysky.skyblocker.skyblock.item;
import net.minecraft.util.Formatting;
public enum SkyblockItemRarity {
ADMIN(Formatting.DARK_RED),
ULTIMATE(Formatting.DARK_RED),
VERY_SPECIAL(Formatting.RED),
SPECIAL(Formatting.RED),
DIVINE(Formatting.AQUA),
MYTHIC(Formatting.LIGHT_PURPLE),
LEGENDARY(Formatting.GOLD),
EPIC(Formatting.DARK_PURPLE),
RARE(Formatting.BLUE),
UNCOMMON(Formatting.GREEN),
COMMON(Formatting.WHITE);
public final int color;
public final float r;
public final float g;
public final float b;
SkyblockItemRarity(Formatting formatting) {
//noinspection DataFlowIssue
this.color = formatting.getColorValue();
this.r = ((color >> 16) & 0xFF) / 255f;
this.g = ((color >> 8) & 0xFF) / 255f;
this.b = (color & 0xFF) / 255f;
}
}
|