Skip to content

Commit

Permalink
:(
Browse files Browse the repository at this point in the history
  • Loading branch information
UselessBullets committed Dec 25, 2023
1 parent 671c691 commit a9368d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import useless.legacyui.Sorting.Recipe.RecipeCost;
import useless.legacyui.Sorting.Recipe.RecipeGroup;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -211,6 +212,7 @@ public boolean craft(Minecraft mc, int windowId){
RecipeCost recipeCost = new RecipeCost(recipe);

RecipeSymbol[] recipeInput = InventoryHelper.getRecipeInput(recipe);
System.out.println(Arrays.toString(recipeInput));
if (canCraft(mc.thePlayer, recipeCost)){
for (int i = 0; i < recipeInput.length; i++){
int slotId = InventoryHelper.findStackIndex(mc.thePlayer.inventory.mainInventory, recipeInput[i]); // Finds Slot index of an inventory Slot with a desired item
Expand Down
1 change: 0 additions & 1 deletion src/main/java/useless/legacyui/Helper/InventoryHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public static boolean inInventory(ItemStack[] stacks, ItemStack item){
return false;
}
public static RecipeSymbol[] getRecipeInput(RecipeEntryCrafting<?, ?> recipe){
RecipeSymbol[] recipeInput;
if (recipe instanceof RecipeEntryCraftingShaped){
return ((RecipeEntryCraftingShaped)recipe).getInput();
}
Expand Down

0 comments on commit a9368d4

Please # to comment.