-
-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix various issues with the formulaic assemblicator:
- Remove no longer needed brute force repair item recipe variant as the RepairItemRecipe matches just fine and ensures that curses don't get removed - Fix formulas for fireworks or other special recipes not properly working depending on how the matches is implemented on the recipe #7262 - Fix the slot targets we define for transferring recipes in the formulaic assemblicator from JEI not working properly/lining up - Fix using passing the wrong dummy inventory to recipes when crafting in auto mode on the formulaic assemblicator #7022
- Loading branch information
1 parent
2baa56f
commit 9fe5371
Showing
6 changed files
with
79 additions
and
58 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
src/main/java/mekanism/client/jei/FormulaicRecipeTransferInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package mekanism.client.jei; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import mekanism.common.inventory.container.slot.InventoryContainerSlot; | ||
import mekanism.common.inventory.container.tile.FormulaicAssemblicatorContainer; | ||
import mekanism.common.inventory.slot.FormulaicCraftingSlot; | ||
import mekanism.common.inventory.slot.InputInventorySlot; | ||
import mezz.jei.api.constants.VanillaRecipeCategoryUid; | ||
import mezz.jei.api.recipe.transfer.IRecipeTransferInfo; | ||
import net.minecraft.inventory.container.Slot; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
public class FormulaicRecipeTransferInfo implements IRecipeTransferInfo<FormulaicAssemblicatorContainer> { | ||
|
||
@Override | ||
public Class<FormulaicAssemblicatorContainer> getContainerClass() { | ||
return FormulaicAssemblicatorContainer.class; | ||
} | ||
|
||
@Override | ||
public ResourceLocation getRecipeCategoryUid() { | ||
return VanillaRecipeCategoryUid.CRAFTING; | ||
} | ||
|
||
@Override | ||
public boolean canHandle(FormulaicAssemblicatorContainer container) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public List<Slot> getRecipeSlots(FormulaicAssemblicatorContainer container) { | ||
List<Slot> slots = new ArrayList<>(); | ||
for (InventoryContainerSlot slot : container.getInventoryContainerSlots()) { | ||
if (slot.getInventorySlot() instanceof FormulaicCraftingSlot) { | ||
slots.add(slot); | ||
} | ||
} | ||
return slots; | ||
} | ||
|
||
@Override | ||
public List<Slot> getInventorySlots(FormulaicAssemblicatorContainer container) { | ||
List<Slot> slots = new ArrayList<>(); | ||
slots.addAll(container.getMainInventorySlots()); | ||
slots.addAll(container.getHotBarSlots()); | ||
for (InventoryContainerSlot slot : container.getInventoryContainerSlots()) { | ||
if (slot.getInventorySlot() instanceof InputInventorySlot) { | ||
slots.add(slot); | ||
} | ||
} | ||
return slots; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters