Fix item rarities being rendered after dropping an item

This commit is contained in:
Linnea Gräf
2024-02-26 18:05:56 +01:00
parent ef79d334ab
commit 953ab2f83e

View File

@@ -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));
}
}