add {CookedTime:150s} to ntb of event-block error

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

OnOpVallend

New Member
Dec 20, 2019
5
0
0
34
Skript Version: Skript 2.2 (dev36)
Skript Author: Bensku
Minecraft Version: 1.12

Code:

Code:
on smelt:
    if event-item is iron ore:
        add "{CookTime:150s}" to nbt of event-block


Errors:
[Server] ERROR event-block is not a world

My Addons: SkStuff, SkRayfall, TuSKe, SKQuery

I can't find a good answer with a solution on this forum.

I am trying to change the CookTime of items in the furnace for example:

A iron ore smelt in 10 seconds,
A gold ore smelt in 25 seconds,
And a diamond in 5 minutes.

Does someone know the solution to fix my error? I will really appriciate it.
Thanks for your time!
 
Looking at the error, it shows that it is looking for a world named event-block, but there is no world but it is odd because it shouldn't be looking for a world. I'll take a wild guess here.

Code:
on smelt:
    if event-item is iron ore:
        add "{CookTime:150s}" to nbt of event-item

The error I see is that it looks for an event-item, and then you tried to add an nbt value to an event-block
 
  • Like
Reactions: OnOpVallend
Thanks this sounds very logical. That I didn't think about that before reee
No problem, if you need any more help you can contact me with a conversation on here or add me on Discord (but I would just do a conversation on SkForums because I am more active here
 
I changed it to this:
Code:
on smelt:
    if event-item is iron ore:
        add "{CookTime:150s}" to nbt of event-item
 
The issue might be that Minecraft NBT might not use time units like seconds, but more ticks. There are 20 ticks in a second, so just do "insert number here" times 20 (150 seconds x 20 ticks = 3000 ticks)
 
Status
Not open for further replies.