From 953ab2f83e2337b10a6c8c7dbbecf45a75ff8b59 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 26 Feb 2024 18:05:56 +0100 Subject: Fix item rarities being rendered after dropping an item --- src/main/java/moe/nea/firmament/mixins/HudRenderEvents.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/moe') diff --git a/src/main/java/moe/nea/firmament/mixins/HudRenderEvents.java b/src/main/java/moe/nea/firmament/mixins/HudRenderEvents.java index 5ed969d..ff4e995 100644 --- a/src/main/java/moe/nea/firmament/mixins/HudRenderEvents.java +++ b/src/main/java/moe/nea/firmament/mixins/HudRenderEvents.java @@ -26,7 +26,7 @@ public class HudRenderEvents { @Inject(method = "renderHotbarItem", at = @At("HEAD")) public void onRenderHotbarItem(DrawContext context, int x, int y, float tickDelta, PlayerEntity player, ItemStack stack, int seed,CallbackInfo ci) { - if (stack != null) + if (stack != null && !stack.isEmpty()) HotbarItemRenderEvent.Companion.publish(new HotbarItemRenderEvent(stack, context, x, y, tickDelta)); } } -- cgit