Artisan Worktables 1.12

Artisan Worktables 1.12

3M Downloads

Tables adding removed recipes with copyByRecipe

Shane371 opened this issue ยท 5 comments

commented

Issue Description

using removeByRecipeName in craft tweaker to remove recipe, and using copyByRecipe to add the remaining recipes to artisans tables

What Happens

Recipe is removed from vanilla crafting tables, but is still added to artisans.

What You Expect to Happen

For artisans table to not add a removed recipe

Script

snippet of a larger file. left out rest of the array

https://pastebin.com/gqePvhTs

Affected Versions

  • Minecraft: 1.12
  • Forge: 14.23.3.2677
  • CraftTweaker: 2-1.12-4.1.8
  • Artisan Worktables:1.12.2-1.18.3
  • Athenaeum:1.12.2-1.14.0
commented

When you call recipes.getRecipesFor(item) all recipes are returned, even the recipes you have marked for removal because, at the time the method is called, CrT hasn't removed them yet. This is how CrT behaves; it aggregates recipes to remove into a list, and when all scripts are done executing, iterates the list and performs the removals at that time.

commented

anyway around it short of manually adding the ones i want?

commented

You could make a list of recipe names to remove, then, when iterating the returned recipes you could check that the name of the recipe you're adding to the tables isn't in the list of recipes to remove.

commented

You might be able to get more help on the CrT discord: http://crafttweaker.readthedocs.io/en/latest/#Vanilla/Commands/#discord

commented

thanks for the reply. will do