Skip to content

Commit

Permalink
Fix creative tab title (#4437)
Browse files Browse the repository at this point in the history
  • Loading branch information
extclp authored Sep 26, 2023
1 parent a19fdee commit 1af050d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant;
import net.fabricmc.fabric.api.transfer.v1.fluid.base.FullItemFluidStorage;
import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage;
import net.minecraft.ChatFormatting;
import net.minecraft.commands.CommandBuildContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
Expand Down Expand Up @@ -211,7 +212,7 @@ private void registryInit() {
BuiltInRegistries.CREATIVE_MODE_TAB,
BotaniaRegistries.BOTANIA_TAB_KEY,
FabricItemGroup.builder()
.title(Component.translatable("itemGroup.botania.botania"))
.title(Component.translatable("itemGroup.botania.botania").withStyle((style -> style.withColor(ChatFormatting.WHITE))))
.icon(() -> new ItemStack(BotaniaItems.lexicon))
.backgroundSuffix("botania.png")
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.common.base.Suppliers;
import com.mojang.brigadier.CommandDispatcher;

import net.minecraft.ChatFormatting;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.core.Registry;
Expand Down Expand Up @@ -219,7 +220,7 @@ private void registryInit() {
});
bind(Registries.CREATIVE_MODE_TAB, consumer -> {
consumer.accept(CreativeModeTab.builder()
.title(Component.translatable("itemGroup.botania.botania"))
.title(Component.translatable("itemGroup.botania.botania").withStyle(style -> style.withColor(ChatFormatting.WHITE)))
.icon(() -> new ItemStack(BotaniaItems.lexicon))
.withTabsBefore(CreativeModeTabs.NATURAL_BLOCKS)
.backgroundSuffix("botania.png")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1af050d

Please sign in to comment.