Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.19] Make DissolutionChamberRecipe and JEI Category respect NBT on input items #1462

Open
wants to merge 1 commit into
base: 1.19
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;
import org.apache.commons.lang3.tuple.Pair;

import java.awt.*;
Expand Down Expand Up @@ -89,7 +90,9 @@ public IDrawable getIcon() {
public void setRecipe(IRecipeLayoutBuilder builder, DissolutionChamberRecipe recipe, IFocusGroup focuses) {
for (int i = 0; i < 8; i++) {
if (i < recipe.input.length) {
builder.addSlot(RecipeIngredientRole.INPUT, 24 + DissolutionChamberTile.getSlotPos(i).getLeft(), 11 + DissolutionChamberTile.getSlotPos(i).getRight()).addIngredients(VanillaTypes.ITEM_STACK, recipe.input[i].getItems().stream().toList());
ItemStack stack = recipe.input[i].getItems().stream().toList().get(0);
stack.getItem().onCraftedBy(stack, null, null);
builder.addSlot(RecipeIngredientRole.INPUT, 24 + DissolutionChamberTile.getSlotPos(i).getLeft(), 11 + DissolutionChamberTile.getSlotPos(i).getRight()).addIngredients(Ingredient.of(stack));
}
}
if (recipe.inputFluid != null && !recipe.inputFluid.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public boolean matches(IItemHandler handler, FluidTankComponent tank) {
for (ItemStack stack : iItemList.getItems()) {
int i = 0;
for (; i < handlerItems.size(); i++) {
if (handlerItems.get(i).sameItem(stack)) {
if (ItemStack.isSameItemSameTags(handlerItems.get(i), stack)) {
found = true;
break;
}
Expand Down