From 8235f471442c169cf5cd6116ccd5f0923d964665 Mon Sep 17 00:00:00 2001 From: HyCraftHD Date: Thu, 1 Aug 2024 16:43:03 +0200 Subject: [PATCH] Fix colors for undyed items --- .../u_team/useful_backpacks/init/UsefulBackpacksColors.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/common/java/info/u_team/useful_backpacks/init/UsefulBackpacksColors.java b/common/src/common/java/info/u_team/useful_backpacks/init/UsefulBackpacksColors.java index 74d6b21..6c91aea 100644 --- a/common/src/common/java/info/u_team/useful_backpacks/init/UsefulBackpacksColors.java +++ b/common/src/common/java/info/u_team/useful_backpacks/init/UsefulBackpacksColors.java @@ -5,13 +5,14 @@ import info.u_team.u_team_core.api.registry.client.ColorProviderRegister; import info.u_team.useful_backpacks.item.BackpackItem; import net.minecraft.Util; +import net.minecraft.util.FastColor; import net.minecraft.world.item.component.DyedItemColor; public class UsefulBackpacksColors { private static final ColorProviderRegister COLORS = Util.make(ColorProviderRegister.create(), colors -> { colors.register((itemColors, blockColors, colorRegister) -> colorRegister.register((stack, index) -> { - return DyedItemColor.getOrDefault(stack, BackpackItem.DEFAULT_COLOR); + return DyedItemColor.getOrDefault(stack, FastColor.ARGB32.opaque(BackpackItem.DEFAULT_COLOR)); }, Stream.of(UsefulBackpacksItems.SMALL_BACKPACK.get(), UsefulBackpacksItems.MEDIUM_BACKPACK.get(), UsefulBackpacksItems.LARGE_BACKPACK.get()))); });