Interactio - In-World Crafting with Datapacks!

Interactio - In-World Crafting with Datapacks!

3M Downloads

Anvil not be damaged

CornWorld opened this issue · 9 comments

commented

I saw a damage key in Github Wiki and I thought that must be used for updating anvil‘s damage value after do sth
Here is the screenshot of that wiki page
image

And it doesn't work, even the anvil do not be damaged at all.
So I read the code and think the function named damageAnvil do the work I just wanna get.
But I found it do nothing after operating.

I'm curious whether it a bug or not

commented

I'm sorry, I broke the promise because of some unexpected situation.
And I will put out my json just now.

{
    "type":"interactio:item_anvil_smashing",
    "inputs":[
        {"item":"minecraft:obsidian","count":1}
    ],
    "output":{
        "type":"item",
        "entries": [
            {
                "result":{"item":"create:powdered_obsidian"},
                "count":4,
                "return_chance":75,
                "weight":1
            }
        ],
    },
    "damage":1
}
{
    "type":"interactio:block_anvil_smashing",
    "input":{
        "block":"minecraft:netherrack",
    },
    "output":{
        "type":"item",
        "entries": [
            {
                "result":{"item":"create:cinder_flour"},
                "count":4,
                "return_chance":75,
                "weight":1
            }
        ],
    },
    "damage":1
}
commented

Looks like the wiki's not quite updated - I think it should be something like

"onCraftEnd": [
    {
        "type": "damage_anvil",
        "chance": 1
    }
]

instead of "damage": 1

commented

Okay, I will try it and reply soon(about some hours)

commented

Ah no scratch that, my work went in 4 months after the last version on curseforge

commented

Ah no scratch that, my work went in 4 months after the last version on curseforge

God, yeah, I'm sorry for not making an actual release since, I've been struggling with this mod a lot recently (JEI rework, event system cleanup, etc.) so I haven't done much work on it publicly, though I've tried some other concepts to get events working that don't involve saving the event's entire json because I think that's something that could definitely be improved upon

commented

As for the actual issue, could you maybe give me your json file?

commented

Emm, I don't really think my usage is right, let me try the usage which murapix said.
If it doesn't work, then I will ask you for help.

BTW, wondering to see the already updated wiki, Thanks!

commented

let me try the usage which murapix said

That update hasn't been released to the public yet as he said previously, so the old syntax should still just work

commented

Oh, in this way...
Well, I'll upload my file after some hours
because it's midnight in my timezone and I am going to sleep, :D