CraftTweaker

CraftTweaker

151M Downloads

skip silk touch in block / blockstate loot expansion

friendlyhj opened this issue ยท 0 comments

commented

Describe the feature you'd like

An optional parameter to skip silk touch in block / blockstate loot expansion.

Describe alternatives you've considered

loot.modifiers.register(
    "drop_iron_ingot",
    LootConditionBuilder.create()
        .add<BlockStateProperty>(condition => {
            condition.withBlock(<block:minecraft:iron_ore>);
        })
        .add<Not>(not => {
            not.withCondition<MatchTool>(condition => {
                condition.withPredicate(predicate => {
                    predicate.withEnchantmentPredicate(<enchantment:minecraft:silk_touch>, it => {});
                });
            });
        }),
    CommonLootModifiers.replaceWith(<tag:items:forge:ores/iron>, <item:minecraft:iron_ingot>)
);

It is too long!

Additional context

No response

Minecraft version

1.16