Skip to content

Commit

Permalink
Don't render thirst when mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz committed Jan 4, 2024
1 parent fc37fb6 commit 772b48d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import toughasnails.api.potion.TANEffects;
import toughasnails.api.thirst.IThirst;
Expand Down Expand Up @@ -41,7 +42,9 @@ public static void onBeginRenderAir(RenderGuiEvent.Pre event)
return;

Minecraft minecraft = Minecraft.getInstance();
if (!minecraft.options.hideGui && GuiUtils.shouldDrawSurvivalElements())
Entity vehicle = minecraft.player.getVehicle();
boolean isMounted = vehicle != null && vehicle.showVehicleHealth();
if (!isMounted && !minecraft.options.hideGui && GuiUtils.shouldDrawSurvivalElements())
{
GuiUtils.setupOverlayRenderState(true, false);
Player player = minecraft.player;
Expand Down

0 comments on commit 772b48d

Please sign in to comment.