Skip to content

Commit

Permalink
Fix #4657
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazkii committed Apr 5, 2024
1 parent 980193d commit a07f833
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ public record FoodComponent(ItemStack stack, int width,
@Override
public void renderImage(@NotNull Font font, int tooltipX, int tooltipY, @NotNull GuiGraphics guiGraphics) {
PoseStack pose = guiGraphics.pose();
Minecraft mc = Minecraft.getInstance();

if(stack.isEdible()) {
FoodProperties food = stack.getItem().getFoodProperties();
FoodProperties food = stack.getItem().getFoodProperties(stack, mc.player);
if(food != null) {
RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft mc = Minecraft.getInstance();

int pips = food.getNutrition();
if(pips == 0)
Expand Down

0 comments on commit a07f833

Please sign in to comment.