Skip to content

Commit 7ef4d56

Browse files
committed
Fix comparing against components instead of the change from default components
1 parent 8638540 commit 7ef4d56

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

src/api/java/mekanism/api/recipes/ingredients/creator/IItemStackIngredientCreator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ default ItemStackIngredient from(ItemStack stack, int amount) {
3737
stack = stack.copy();
3838
//Support Components that are on the stack in case it matters
3939
// Note: Only bother making it a data component ingredient if the stack has data, otherwise there is no point in doing the extra checks
40-
//TODO - 1.20.5: Do we want to only do this if there are components that are not equal to the default on the item??
41-
if (!stack.getComponents().isEmpty()) {
40+
if (!stack.getComponentsPatch().isEmpty()) {
4241
return from(DataComponentIngredient.of(false, stack), amount);
4342
}
4443
return from(Ingredient.of(stack), amount);

src/main/java/mekanism/client/recipe_viewer/emi/MekanismEmi.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ public void initialize(EmiInitRegistry registry) {
209209
registry.addIngredientSerializer(InfusionEmiStack.class, INFUSION_SERIALIZER);
210210
registry.addIngredientSerializer(PigmentEmiStack.class, PIGMENT_SERIALIZER);
211211
registry.addIngredientSerializer(SlurryEmiStack.class, SLURRY_SERIALIZER);
212-
//TODO - 1.20.5: Test this works properly for getting things to display as tags
213212
registry.addRegistryAdapter(GAS_REGISTRY_ADAPTER);
214213
registry.addRegistryAdapter(INFUSE_TYPE_REGISTRY_ADAPTER);
215214
registry.addRegistryAdapter(PIGMENT_REGISTRY_ADAPTER);

src/main/java/mekanism/common/recipe/ClearConfigurationRecipe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private ItemStack getTargetStack(CraftingContainer container) {
110110
for (int i = 0, slots = container.getContainerSize(); i < slots; ++i) {
111111
ItemStack stackInSlot = container.getItem(i);
112112
if (!stackInSlot.isEmpty()) {
113-
if (stackInSlot.getComponents().isEmpty()) {
113+
if (stackInSlot.getComponentsPatch().isEmpty()) {
114114
//We currently only want to target block items that have at least one component
115115
return ItemStack.EMPTY;
116116
}

src/main/java/mekanism/common/recipe/upgrade/MekanismShapedRecipe.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import mekanism.common.recipe.WrappedShapedRecipe;
1111
import mekanism.common.registries.MekanismRecipeSerializersInternal;
1212
import net.minecraft.core.HolderLookup;
13-
import net.minecraft.core.RegistryAccess;
1413
import net.minecraft.world.inventory.CraftingContainer;
1514
import net.minecraft.world.item.ItemStack;
1615
import net.minecraft.world.item.crafting.RecipeSerializer;
@@ -38,7 +37,7 @@ public ItemStack assemble(CraftingContainer inv, HolderLookup.Provider provider)
3837
List<ItemStack> componentInputs = new ArrayList<>();
3938
for (int i = 0; i < inv.getContainerSize(); i++) {
4039
ItemStack stack = inv.getItem(i);
41-
if (!stack.isEmpty() && !stack.getComponents().isEmpty()) {
40+
if (!stack.isEmpty() && !stack.getComponentsPatch().isEmpty()) {
4241
componentInputs.add(stack);
4342
}
4443
}

0 commit comments

Comments
 (0)