Skip to content

Salt tablet recipe (bug? intended?) #190

@EricLease

Description

@EricLease

I just installed Better MC a couple days ago, came across the Beserker, which as I found out is from Galosphere, and found out about the salt tablet (I was excited to make one, seems pretty cool). I tried the recipe and it showed what I hoped was a visual bug - the preserved flesh as the output, not the salt tablet. Repro: add preserved_template, preserved_flesh, pink_salt_shard to smithing table, it shows preserved_flesh as output. I tried it, and indeed it gave me preserved_flesh, consuming the template. I ate the [preserved?] preserved_flesh , reducing the durability from 100%, and tried again (had gotten 2 tablets as the drop from Beserker, or maybe in a 2nd in a chest?). I don't think it actually had anything to do with the durability, but the 2nd time it showed the correct preview (salt_tablet) and worked when I picked up the resulting item (it is very cool!). I don't work with java, MC modding, or anything like that, but I am a software developer, so I did some research and dug in a bit. I think you have two conflicting Smithing transform recipes. One is defined in the GRecipeProvider.java (line 52), to create the salt tablet), and one is defined somewhere else... config or data I think, a json file, which is to upgrade items to add "preserved" attribute. I believe what happened is the preserved_flesh doesn't have the preserved attribute, so it passes the boolean check for "is not preserved" for the recipe that adds the preserved attribute, and that first time I actually got a perserved_flesh that was preserved. So the second time I put it in the smithing table it failed that check and fell back to the salt tablet recipe. I'm not sure what the most elegant solution is for this, but it seems to be deterministic, not a race condition, which recipe is tried in which order, so it can probably be resolved relatively easily. Maybe it's intentional?

Additionally when I was digging around I noticed the unlock for that recipe transform on line 52 is the smithing template, whereas it should be the template and the other component it consumes, likewise you unlock NETHERITE_INGOT (the base MC advancement) when it should probably be derived from the ingot param passed to that method... but maybe that's because you would have to create a new set of advancements, maybe just a shortcut/hack? idk, like I said I don't work in this space at all, just seemed like a bit of a smell.

p.s. Sorry, that seemed like just criticism. Love the features of the mod!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions