#First time making a block!

39 messages · Page 1 of 1 (latest)

rapid tusk
#

Hi, It's my first time using KubeJS, I've been going through some tutorials trying to figure out why it isnt working but as far as i can see i have everything typed correct? But something must be wrong, None of my text is colored like i see in everyone else's. Any ideas?

cobalt orbitBOT
#

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

potent gladeBOT
#

Paste version of Presolarite.txt from @rapid tusk

stoic elk
#

is the code not working or the color of the codeblock you sent?

rapid tusk
#

both

#

I did give the block a texture of the same name too

potent gladeBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
somber steppe
#

event.create("Presolarite") make the p lowercase

#

.unbreakable should be .unbreakable()

#

why is it unbreakable but also can be mined with a pickaxe

rapid tusk
#

I thought that the unbreakable only apied to the blast breaking

#

oops

somber steppe
#

.tagBlock("minecraft:mineable/pickage") pickage?

rapid tusk
#

yeah... did i mention its my first time

stoic elk
#

its all good

#

also what's the file path of the script?

rapid tusk
#

Minecraft Server > kubejs > startup_scripts

stoic elk
#

is the script in a .txt or .js file?

rapid tusk
#

.txt

somber steppe
#

it needs to be .js

stoic elk
#

i'd recommend making it a .js file

rapid tusk
#

how do i go about changing that?

somber steppe
#

it's a requirement isnt it lol

stoic elk
#

rename the file to presolarite.js

rapid tusk
#

ive renamed it, however now its official name in the properties is presolarite.js.txt lol so i dont think that fixed it

somber steppe
#

you didn't rename it then

#

well

#

i mean you did

#

but you didnt change the file type

rapid tusk
#

correct

somber steppe
#

while the file type is visible (which you do by doing what my screenshots say) rename it INCLUDING the file type

rapid tusk
#

you right

#

now i have colors!

somber steppe
#

woop

rapid tusk
#

Thanks so much!

#

😭

#

ill probably be back

potent gladeBOT
#

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.