FastWorkbench

FastWorkbench

70M Downloads

Fairy Lights crafting recipe output does not update

copygirl opened this issue · 4 comments

commented

Versions

  • Minecraft 1.16.5
  • Forge 36.1.2
  • FastWorkbench 4.5.1
  • Fairy Lights 4.0.5

Description

When changing ingredients of a Fairy Lights recipe, the recipe output does not update.

How to Reproduce

  • Place iron, string and iron into crafting grid.
  • Place first Fairy Light ingredient (for example "Lime Fairy Light") into the crafting grid.
  • The output shows the lime Hanging Light correctly.
  • Place any other ingredients into the crafting grid.
  • The output does not update.
  • Optional: Remove and re-add required ingredients (iron or string) to force the output to update.

Screenshots

After placing the second ingredient (red paper lantern) into the crafting grid:
image

Expected:
image

Related Issue

pau101/Fairy-Lights#114

commented

Fixed in 4.6.0 - non-vanilla recipes will now update the client if the resultant stack changes.

commented

That could be it. I will mention your response in the linked issue.

commented

as per the fix for #58 c2a1a64, FB now always pushes a stack update every time the input changes if either the recipe changes, or the recipe is dynamic. Given that this recipe does this, it sounds like it's not properly returning true to IRecipe#isDynamic?

commented

It is not correct to assume a recipe output will not vary for a recipe which isDynamic() (isSpecial) returns false. The base game supports this behavior without issue. My mods utilize to get my recipes in the recipe book with ease.

I recommend extending the condition to also update if the current output stack (per getCraftingResult(CraftingInventory)) is not equal to its getRecipeOutput(), with a dash of vanilla recipe class checks to avoid superfluous stack comparisons.