#Changing an items burn time by ID

87 messages · Page 1 of 1 (latest)

velvet tulip
#

I have gone through so. many. threads. trying to find guidance on changing an items burn time as fuel in a furnace but I can't seem to ever get it working. I have tried many different ways - but must recently:

event.modify('geolosys:bituminous_coal', i => {
        i.burnTime = 6400
    })

and

event.modify('geolosys:bituminous_coal', item => {
        item.burnTime = 6400
    }),

Neither worked and I'm at a loss, could someone lend a hand?

worn mothBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

fluid blade
#

I don't see a difference between the two attempts

#

Did you restart the game after writing the script?

velvet tulip
#

I restarted & reloaded to no avail

velvet tulip
random valve
#

this code works for me:

  event.modify('cyclic:peat_fuel', item => {
      item.burnTime = 16000;
  });
  event.modify('cyclic:peat_fuel_enriched', item => {
      item.burnTime = 64000;
  });
  event.modify('railcraft:charcoal_dust', item => {
    item.burnTime = 400;
  });
});```
#

on startup_scripts folder

fluid blade
#

That's the same script

random valve
#

ya but idk, maybe his header was wrong? or on the wrong folder

velvet tulip
fluid blade
#

And also

strong moatBOT
#

You can find your KubeJS startup log in /minecraft/logs/kubejs/startup.log.
If you are on 1.18 or 1.16 it will be called startup.txt.
Please send it if asked, as it contains helpful information.

velvet tulip
# fluid blade What's your full script?
ItemEvents.modification(event => {
    event.modify('geolosys:peat_coal', item => {
        item.burnTime = 2400
    }),
    event.modify('geolosys:lignite_coal', item => {
        item.burnTime = 3200
    }),
    event.modify('geolosys:bituminous_coal', item => {
        item.burnTime = 6400
    }),
    event.modify('geolosys:anthracite_coal', item => {
        item.burnTime = 8000
    })
    event.modify('geolosys:bituminous_coal', item => {
        item.burnTime = 6400
    })
})

I was running this

random valve
#

you're missing a comma on the penultimate one

#

also I believe the separator is ; rather than ,

fluid blade
#

No

#

Remove the commas

#

And ; is not needed in js unless you have multiple instructions on the same line

random valve
#

oh, good. sorry, mb

fluid blade
#

No worries SCpatpat

velvet tulip
#

Testing now

velvet tulip
# fluid blade No worries <a:SCpatpat:791350568571371590>
ItemEvents.modification(event => {
    event.modify('geolosys:peat_coal', item => {
        item.burnTime = 2400
    })
    event.modify('geolosys:lignite_coal', item => {
        item.burnTime = 3200
    })
    event.modify('geolosys:bituminous_coal', item => {
        item.burnTime = 6400
    })
    event.modify('geolosys:anthracite_coal', item => {
        item.burnTime = 8000
    })
    event.modify('geolosys:bituminous_coal', item => {
        item.burnTime = 6400
    })
})

Remove the commas like this?

velvet tulip
velvet tulip
strong moatBOT
#

Paste version of latest.log from @rocky bane

fluid blade
#

That's the latest log

#

It's not what I need

velvet tulip
#

I'm goofy

#

lmao

#

you need startup as this is a startup event?

fluid blade
#

Yes

velvet tulip
strong moatBOT
#

Paste version of startup.log from @rocky bane

fluid blade
velvet tulip
#

I maybe should note, I wanted to add these to items that are broken in a mod.
In 1.19.2 version of the mod, all the coals worked fine. In 1.20.1 ver the coals seem to have no BurnTime so I wanted to fix with KJS

random valve
#

try it with one that is not broken? like, dirt

#

maybe it's because they're broken that they don't work

velvet tulip
random valve
#

can relate lmao

fluid blade
#

what i used to do when working on ATM6 was have a separate instance with just vanilla + KJS and test everything there with random vanilla items

velvet tulip
#

It seemingly is just that the items are broken

random valve
#

so one worked, the other didn't?

velvet tulip
#

Yeah, cobblstone smelts 1280 items

#

lol

fluid blade
#

thats what i found weird, cuz the script looks right on its own

random valve
#

lmao, have you tried removing then adding the burntime?

velvet tulip
#

I'm not too sure how I'd go about removing burntime

#

I am shocked and upset

#

this mod has not wanted to work with me since I downloaded it lol

#

I had to write a KJS script to fix every item having a stacksize of 1

velvet tulip
fluid blade
#

nah

#

same topic

#

should be able to remove by setting it to 0

velvet tulip
#

Wow, so literally just one line setting it to 0, followed by one adding burntime?

random valve
#

maybe

fluid blade
#

not sure what they meant by that

#

that wont really do anything different from just setting it

velvet tulip
#

No point in removing and readding burntime maybe then

random valve
#

workaround could be registering a new item, replacing the broken one and adding burn time to that

velvet tulip
#

I'm just going to add a new item that is crafted from the broken item and use the new item as the base for fuel burntime

#

Yeah

#

Literally

random valve
#

issue is that you would have to swap manually the drops

#

and tags

velvet tulip
#

It is a tedious extra step

#

No idea why the mod got so broken

random valve
velvet tulip
#

If you have them already, I'd absolutely love that

random valve
strong moatBOT
#

Paste version of loot.js, mod_recipes.js, tags.js from @random valve

random valve
#

for loot you'll need lootjs tho

#

also disregard the function called copyTagsFromTo(), it's broken as of now and i dunno how to fix it

velvet tulip
#

Thank you so kindly sir 🙏

worn mothBOT
#

Ticket closed!

random valve
fluid blade
#

gotta close it again :P

worn mothBOT
#

Ticket closed!

velvet tulip
fluid blade
#

server scripts

velvet tulip
#

Perfect, thanks lexxie :)

worn mothBOT
#

Ticket closed!