From 293b24bea92e30284cd113a4d7c1f994851a203b Mon Sep 17 00:00:00 2001 From: wendavid552 Date: Thu, 15 Aug 2024 21:58:14 +0800 Subject: [PATCH] Also disable the ghost items rendering in recipe input slots. Resolve the fps problem. --- .../masa/itemscroller/mixin/MixinRecipeBookWidget.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/fi/dy/masa/itemscroller/mixin/MixinRecipeBookWidget.java b/src/main/java/fi/dy/masa/itemscroller/mixin/MixinRecipeBookWidget.java index d4ef82175..0ebc2e527 100644 --- a/src/main/java/fi/dy/masa/itemscroller/mixin/MixinRecipeBookWidget.java +++ b/src/main/java/fi/dy/masa/itemscroller/mixin/MixinRecipeBookWidget.java @@ -28,4 +28,14 @@ private void onUpdate(CallbackInfo ci) ci.cancel(); } } + + @Inject(method = "drawGhostSlots", at = @At("HEAD"), cancellable = true) + private void onDrawGhostSlots(CallbackInfo ci) + { + if (InventoryUtils.dontUpdateRecipeBook > 0) + { + ci.cancel(); + } + } + }