@@ -62,10 +62,7 @@ public void layout(ViewLayout<CraftingState> layout, CraftingState state, ViewCo
6262 Components .containerGrid (
6363 layout ,
6464 10 ,
65- 30 , (slot , oldItem , newItem , state1 ) -> {
66- Logger .info ("Container grid changed at slot " + slot );
67- Logger .info ("Old Item: " + oldItem );
68- Logger .info ("New Item: " + newItem );
65+ 30 , (_ , _ , _ , state1 ) -> {
6966 int newHash = computeGridHash (ctx );
7067 SkyBlockRecipe <?> newRecipe = SkyBlockRecipe .parseRecipe (getCurrentRecipeStacks (ctx ));
7168 if (state1 .lastGridHash () == newHash && Objects .equals (state1 .lastParsedRecipe (), newRecipe )) {
@@ -83,11 +80,9 @@ public void layout(ViewLayout<CraftingState> layout, CraftingState state, ViewCo
8380 Arrays .copyOfRange (result .errorMessage (), 1 , result .errorMessage ().length )));
8481 } else {
8582 int amount = recipe .getAmount ();
86- SkyBlockRecipe <?> finalRecipe = recipe ;
87-
8883 layout .slot (RESULT_SLOT , (s , c ) -> {
8984 SkyBlockPlayer p = (SkyBlockPlayer ) c .player ();
90- ItemStack .Builder builder = PlayerItemUpdater .playerUpdate (p , finalRecipe .getResult ().getItemStack ()).amount (amount );
85+ ItemStack .Builder builder = PlayerItemUpdater .playerUpdate (p , recipe .getResult ().getItemStack ()).amount (amount );
9186
9287 ArrayList <String > lore = new ArrayList <>();
9388 var existingLore = builder .build ().get (DataComponents .LORE );
@@ -100,7 +95,7 @@ public void layout(ViewLayout<CraftingState> layout, CraftingState state, ViewCo
10095 .collect (Collectors .toList ()));
10196
10297 return builder ;
103- }, (click , c ) -> handleCraft (click , c , finalRecipe , amount ));
98+ }, (click , c ) -> handleCraft (click , c , recipe , amount ));
10499 }
105100 }
106101
0 commit comments