Skip to content

Commit

Permalink
Fix colors for undyed items
Browse files Browse the repository at this point in the history
  • Loading branch information
HyCraftHD committed Aug 1, 2024
1 parent 741173c commit 8235f47
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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())));
});

Expand Down

0 comments on commit 8235f47

Please sign in to comment.