CraftTweaker

CraftTweaker

151M Downloads

TagIngredients no longer accept enchanted items

jaredlll08 opened this issue ยท 1 comments

commented

Issue description

Due to how the new item component system works, items by default have an empty enchantments data component, meaning when we try and match an enchanted item to a normal item, it sees the empty enchantments and a non empty enchantments and returns false.

One idea is adding a new condition called ignoring, like so:

<tag:item:minecraft:axes>.asIIngredient().ignoring(<componenttype:minecraft:enchantments>, <componenttype:minecraft:damage>)

that would remove the component before comparing the components (a system we already have in place)

Steps to reproduce

craftingTable.addShapeless("waxed_oxidized_copper_deoxidize", <item:minecraft:oxidized_copper>,
    [<item:minecraft:waxed_oxidized_copper>, <tag:item:minecraft:axes>.asIIngredient().anyDamage().transformDamage()]);

Script used

n/a

The crafttweaker.log file

n/a

Minecraft version

1.21

Modloader

All

Modloader version

n/a

CraftTweaker version

n/a

Other relevant information

No response

The latest.log file

n/a