Artisan Worktables 1.12

Artisan Worktables 1.12

3M Downloads

AW couldn't compatible with item.withtag

VVVHY opened this issue ยท 2 comments

commented

Expected Behavior

Add a recipe which would carve "Animania's beef to steak by carving knife in Chef Worktable while installing FoodFunk.

Current Behavior

While Foodfunk installing, animania:raw_prime_beef would become animania:raw_prime_beef.withTag({Rot: {start: 0 as long, time: 0 as long}}).
The recipe didn't work in AW worktable, but work in Vanilla worktable.
The rot tag would be changing by time so hard to write it in the recipe.

Steps to Reproduce (for bugs)

1.Install Food Funk
2.animania:raw_prime_beef become animania:raw_prime_beef.withTag({Rot: {start: 0 as long, time: 0 as long}})
3.The recipe don't work

Script

https://paste.ubuntu.com/p/rmh8V8KS8q/

Your Environment

  • Minecraft:
  • Forge:14.23.5.2854
  • CraftTweaker:1.12.2-8.1.9
  • Artisan Worktables:1.12.2-1.23.6
  • Athenaeum:1.12.2-1.19.1
commented

I can't reproduce this in a minimal testing environment.

AW will ignore NBT data on an ingredient if the ingredient in the recipe has no NBT data, otherwise it will match NBT.

This is illustrated with the following script:

import mods.artisanworktables.builder.RecipeBuilder;

// produces item with NBT
RecipeBuilder.get("basic")
  .setShapeless([<minecraft:beef>])
  .addTool(<minecraft:stone_axe>, 1)
  .addOutput(<minecraft:diamond>.withTag({Rot: {start: 234545 as long, time: 345656 as long}}))
  .create();

// consumes item regardless of NBT
RecipeBuilder.get("basic")
  .setShapeless([<minecraft:diamond>])
  .addTool(<minecraft:stone_axe>, 1)
  .addOutput(<minecraft:string>)
  .create();

// consumes only item with specific NBT
RecipeBuilder.get("basic")
  .setShapeless([<minecraft:gravel>, <minecraft:diamond>.withTag({Rot: {start: 234545 as long, time: 345656 as long}})])
  .addTool(<minecraft:stone_axe>, 1)
  .addOutput(<minecraft:emerald>)
  .create();
commented

Tested with Food Funk mod installed.

Used <minecraft:beef>.withTag({Rot: {start: 21840 as long, time: 168000 as long}}) as the ingredient and the recipe below behaves as expected.

import mods.artisanworktables.builder.RecipeBuilder;

RecipeBuilder.get("basic")
  .setShapeless([<minecraft:beef>])
  .addTool(<minecraft:stone_axe>, 1)
  .addOutput(<minecraft:diamond>)
  .create();