Skip to content

Commit

Permalink
Also use dyed_color for coloring items
Browse files Browse the repository at this point in the history
  • Loading branch information
UserNugget committed Apr 28, 2024
1 parent ea00cf6 commit 2c0da9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dependencies {
compileOnly("com.velocitypowered:velocity-proxy:$velocityVersion") // From Elytrium Repo.

compileOnly("io.netty:netty-codec:$nettyVersion")
compileOnly("it.unimi.dsi:fastutil-core:$fastutilVersion")

compileOnly("com.github.spotbugs:spotbugs-annotations:$spotbugsVersion")

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
limboapiVersion=1.1.23
velocityVersion=3.3.0-SNAPSHOT
nettyVersion=4.1.86.Final
fastutilVersion=8.5.11
spotbugsVersion=4.7.3
elytriumCommonsVersion=1.2.5-1
bstatsVersion=3.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.velocitypowered.api.util.GameProfile;
import com.velocitypowered.api.util.GameProfile.Property;
import com.velocitypowered.proxy.protocol.ProtocolUtils;
import it.unimi.dsi.fastutil.Pair;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
Expand Down Expand Up @@ -162,6 +163,7 @@ public ItemComponentMap buildComponents(ProtocolVersion protocolVersion) {

if (this.hasColor) {
componentMap.add(protocolVersion, "minecraft:base_color", this.color);
componentMap.add(protocolVersion, "minecraft:dyed_color", Pair.of(this.color, true));
}

componentMap.add(protocolVersion, "minecraft:hide_additional_tooltip", true);
Expand Down

0 comments on commit 2c0da9a

Please sign in to comment.