Applied Energistics 2

Applied Energistics 2

160M Downloads

Transfering recipes to crafting terminal fails

Mari023 opened this issue ยท 0 comments

commented

Describe the bug

trying to transfer a recipe to the crafting terminal using emi fails

How to reproduce the bug

  1. open crafting terminal
  2. open a recipe
  3. press the transfer button
  4. the recipe gets replaced with an error

Expected behavior

the recipe gets transfered

Additional details

tested in 1.20.4

looking at the code, this is because

public FillCraftingGridFromRecipePacket(@Nullable ResourceLocation recipeId,
NonNullList<ItemStack> ingredientTemplates,
boolean craftMissing) {
this.recipeId = recipeId;
this.ingredientTemplates = NonNullList.copyOf(ingredientTemplates);
this.ingredientTemplates.replaceAll(ItemStack::copy);
this.craftMissing = craftMissing;
}

NonNullList.copyOf() returns an immutable list, which means List#replaceAll fails

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Forge

Crash log