Immersive Engineering

Immersive Engineering

134M Downloads

[1.15.2] reuse(), transformDamage(), anyDamage() Crafttweaker recipes not working in Assembler

Guinaro opened this issue ยท 0 comments

commented

Description of the issue:

I'm trying to make recipes that reuse an item, or reuse and damage an item work with the Assembler.
But it seems the Assembler does honor the various extra functions that can be used in crafttweaker.
.anyDamage() simply doesn't seem to work, only non damaged items are used.
.reuse() gets ignored and the recipe does working but consumes the item instead of returning it to the inventory to be reused as expected.
.transformDamage() gets applied but in combo with anyDamage() it is still not able to multicraft and reuse the item until broken completely.

Versions & Modlist

Forge: forge-31.2.45
Immersive Engineering: ImmersiveEngineering-1.15.2-4.1.0-122
Crafttweaker: CraftTweaker-1.15.2-6.0.0.44
Jei: jei-1.15.2-6.0.3.15

Example Script used:

import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.item.IIngredientTransformer;

var empty = <item:minecraft:air> as IItemStack;
var stick = <item:minecraft:stick> as IItemStack;
var pickaxe = <item:minecraft:diamond_pickaxe> as IItemStack;
var stairs = <item:minecraft:stone_stairs> as IItemStack;
var stone = <item:minecraft:stone> as IItemStack;

<recipetype:minecraft:crafting>.addShaped("crafttweaker_crafting_stairs", stairs, [[empty, stick.transformReplace(stick)], [stone, empty]], null);
<recipetype:minecraft:crafting>.addShaped("crafttweaker_crafting_stairs2", stairs, [[stick.reuse(), empty], [stone, empty]], null);

<recipetype:minecraft:crafting>.addShaped("crafttweaker_crafting_stairs3", stairs, [[empty, pickaxe.reuse()], [stone, empty]], null);
<recipetype:minecraft:crafting>.addShaped("crafttweaker_crafting_stairs4", stairs, [[pickaxe.anyDamage().reuse(), empty], [stone, empty]], null);
<recipetype:minecraft:crafting>.addShaped("crafttweaker_crafting_stairs5", stairs, [[stone, pickaxe.anyDamage().transformDamage(1)]], null);

All recipes work in a normal crafting table, with the remark that reuse() on stacks with more than a single item (e.g. the sticks) cause item duplication.
All recipes used in the assembler cause the item that should be returned to be actually consumed.
The exception is recipe 5, where an undamage diamond pickaxe gets consumed, and returned with a single damage applied. But will not be reused for further crafting. Which may have to do with nbt tags not validating.

All recipes do validate to an item inside the Assembler. It is just that it result in crafting a single item without reuse of items.