From 1e86b13998f1a65c9c958c31edc2d63bd721069b Mon Sep 17 00:00:00 2001 From: Beam Date: Sun, 7 Jul 2024 01:55:30 -0700 Subject: [PATCH] Fix rendering screen crash --- .../stats/vanilla/mixin/client/AbstractDonkeyEntityMixin.java | 4 ++-- .../horse/stats/vanilla/mixin/client/HorseEntityMixin.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/AbstractDonkeyEntityMixin.java b/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/AbstractDonkeyEntityMixin.java index 98ef9e9..474f727 100644 --- a/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/AbstractDonkeyEntityMixin.java +++ b/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/AbstractDonkeyEntityMixin.java @@ -56,9 +56,9 @@ public ActionResult interactMob(PlayerEntity player, Hand hand, CallbackInfoRetu int healthValue = new BigDecimal(maxHealth.replace(',', '.')).intValue(); int strengthValue = new BigDecimal(strength.replace(',', '.')).intValue(); - MinecraftClient.getInstance().setScreen( + MinecraftClient.getInstance().execute(() -> MinecraftClient.getInstance().setScreen( new ToolTipGui(new TooltipDonkey(speedValue, jumpValue, healthValue, strengthValue)) - ); + )); } return ret.getReturnValue(); } diff --git a/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/HorseEntityMixin.java b/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/HorseEntityMixin.java index 0f3ff27..c67300b 100644 --- a/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/HorseEntityMixin.java +++ b/src/client/java/monkey/lumpy/horse/stats/vanilla/mixin/client/HorseEntityMixin.java @@ -50,9 +50,9 @@ public ActionResult interactMob(PlayerEntity player, Hand hand, CallbackInfoRetu double speedValue = new BigDecimal(speed.replace(',', '.')).doubleValue(); int healthValue = new BigDecimal(maxHealth.replace(',', '.')).intValue(); - MinecraftClient.getInstance().setScreen( + MinecraftClient.getInstance().execute(() -> MinecraftClient.getInstance().setScreen( new ToolTipGui(new Tooltip(speedValue, jumpValue, healthValue)) - ); + )); } return ret.getReturnValue(); }