diff --git a/src/main/java/ml/pluto7073/plutoscoffee/Client.java b/src/main/java/ml/pluto7073/plutoscoffee/Client.java index cd05b67..6c3e8ad 100644 --- a/src/main/java/ml/pluto7073/plutoscoffee/Client.java +++ b/src/main/java/ml/pluto7073/plutoscoffee/Client.java @@ -5,12 +5,19 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; +import net.fabricmc.fabric.api.resource.ResourceManagerHelper; +import net.fabricmc.fabric.api.resource.ResourcePackActivationType; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.render.RenderLayer; +import net.minecraft.util.Identifier; @Environment(EnvType.CLIENT) public class Client implements ClientModInitializer { public void onInitializeClient() { + FabricLoader.getInstance().getModContainer(PlutosCoffee.MOD_ID).ifPresent(container -> + ResourceManagerHelper.registerBuiltinResourcePack(new Identifier(PlutosCoffee.MOD_ID, "dark_gui"), container, ResourcePackActivationType.NORMAL)); + BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.COFFEE_CROP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.COFFEE_BREWER, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.COFFEE_GRINDR, RenderLayer.getCutout()); diff --git a/src/main/java/ml/pluto7073/plutoscoffee/items/BrewedCoffee.java b/src/main/java/ml/pluto7073/plutoscoffee/items/BrewedCoffee.java index 11e5eb2..a3900b7 100644 --- a/src/main/java/ml/pluto7073/plutoscoffee/items/BrewedCoffee.java +++ b/src/main/java/ml/pluto7073/plutoscoffee/items/BrewedCoffee.java @@ -121,10 +121,10 @@ public void appendTooltip(ItemStack stack, @Nullable World world, List too additionCounts.put(id, ++count); } else additionCounts.put(id, 1); } - tooltip.add(Text.translatable("tooltip.plutoscoffee.caffeine_content", caffeine).formatted(Formatting.AQUA)); if (Utils.getCoffeeType(stack) != CoffeeTypes.EMPTY && Utils.getCoffeeType(stack) != null) tooltip.add(Text.translatable(Utils.getCoffeeType(stack).getTranslationKey()).formatted(Formatting.GRAY)); additionCounts.forEach((id, count) -> tooltip.add(Text.translatable(CoffeeAdditions.REGISTRY.get(id).getTranslationKey(), count).formatted(Formatting.GRAY))); } + tooltip.add(Text.translatable("tooltip.plutoscoffee.caffeine_content", caffeine).formatted(Formatting.AQUA)); } }