Jump to content

Recommended Posts

Posted

Hi again!

I'm trying to add combustablePropsByType part into trunk.json via a patch. It works properly, but all 4 types of trunks use the same code despite having different parameters. I assume this is because trunks are differentiated by "type" instead of "variant". In short, I can't figure out how to format the code for it to properly identify the different types. If anyone knows how or has an idea of where I can start please let me know.

Here's the patch so far:

Spoiler

[
    {
        "op": "remove",
        "path": "/combustibleProps",
        "file": "game:blocktypes/wood/chest-trunk.json",
            "side": "Server"
    },
    {
        "op": "addmerge",
        "path": "/combustiblePropsByType",
        "value": {
            "trunk-east": {
            burnTemperature: 600,
            burnDuration: 35,
            meltingPoint: 100,
            meltingDuration: 36,
            smeltedRatio: 1,
            requiresContainer: false,
            smeltedStack: { type: "item", code: "charredslag", stacksize: 1 }
        },
            "*": {
            burnTemperature: 600,
            burnDuration: 35,
        }
            },
        "file": "game:blocktypes/wood/chest-trunk.json",
            "side": "Server"
    }
]

 

Posted (edited)

I know it's been a while since you posted this but just in case you still need help.

My guess is the reason that it is not working is because in the second patch in "value" you named your field "trunk-east" and it should instead be "*-trunk-east" or "chest-trunk-east".
Adding the wildcard ("*-") or specifying the first part of the code is important because the game looks for the code "trunk-east" which does not exist and should instead be looking for "chest-trunk-east".

Another thing I'd like to point out is in the second patch you set the operation to "addmerge" which is only needed if the path already exist and you want to append values to it. You can use "add" instead.

Also (i might be wrong on that) i think you should remove both "side" fields because the client also needs to know what are the combustibleProps in order to be properly displayed in the item info. But again, i might be wrong. I was wrong never mind that.

Hope this helps!

Edited by Wondiws98
i was wrong
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.