aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-02-26 18:05:56 +0100
committerLinnea Gräf <nea@nea.moe>2024-02-26 18:05:56 +0100
commit953ab2f83e2337b10a6c8c7dbbecf45a75ff8b59 (patch)
tree5a6ab13cf9a52c89f2f5f6f9cc1c296188628e98
parentef79d334ab88480e865f4ee5dad8656023577f1c (diff)
downloadFirmament-953ab2f83e2337b10a6c8c7dbbecf45a75ff8b59.tar.gz
Firmament-953ab2f83e2337b10a6c8c7dbbecf45a75ff8b59.tar.bz2
Firmament-953ab2f83e2337b10a6c8c7dbbecf45a75ff8b59.zip
Fix item rarities being rendered after dropping an item
-rw-r--r--src/main/java/moe/nea/firmament/mixins/HudRenderEvents.java2
1 files changed, 1 insertions, 1 deletions
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));
}
}