CraftTweaker

CraftTweaker

151M Downloads

Custom Ingredients do not cast properly to IData

Witixin1512 opened this issue ยท 0 comments

commented

Issue description

IIngredientConditioned and IIngredientTransformed do not properly cast to IData.

https://github.com/CraftTweaker/CraftTweaker/blob/1.19.3/Common/src/main/java/com/blamejared/crafttweaker/api/ingredient/type/IIngredientConditioned.java#L81

Steps to reproduce

val damageIng = <item:minecraft:stone_axe>.anyDamage().reuse();
println((damageIng as IData).getAsString());
{nbt: "{Damage:0}", item: "minecraft:stone_axe", count: 1, type: "crafttweaker:partial_tag"}

val damageIng2 = <item:minecraft:stone_axe>.anyDamage().transformDamage(1);
println((damageIng2 as IData).getAsString());

// Produces:
{nbt: "{Damage:0}", item: "minecraft:stone_axe", count: 1, type: "crafttweaker:partial_tag"}

val damageIng3 = <item:minecraft:stone_axe>.reuse();
println((damageIng3 as IData).getAsString());

// Produces:
{nbt: "{Damage:0}", item: "minecraft:stone_axe", count: 1, type: "crafttweaker:partial_tag"}

Script used

The crafttweaker.log file

Minecraft version

1.20.1

Modloader

Forge

Modloader version

47.1.3

CraftTweaker version

14.0.24

Other relevant information

No response

The latest.log file