#Custom Block via Kubejs

27 messages · Page 1 of 1 (latest)

pure verge
#

for some reason it didnt keep the Forge tag when i posted this before, so here I go again:

Hello. I am trying to add a block via Kubejs, but due to the fact it has a custom texture and model I have been running into a snag, one I have not seen any solutions to in here, as everyone else who seemed to have the same issue just closed their ticket, and I didnt see the solution. here is the code I have:

StartupEvents.registry('block', event => {
      event.create('incomplete_quantiscope')
      .displayName('Incomplete Quantiscope')
      .model('tardis:block/incompete_quantiscope')
      .soundType('nether_bricks')
      .hardness(2)
      .resistance(0.5)
      .texture('particle', 'tardis:block/incompete_quantiscope')
      .tagBlock('minecraft:mineable/pickaxe')
      .requiresTool(true)
})

I have also included the texture file and the design as I had it in blockbench.

cold carbonBOT
#

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

pure verge
#

@last island I saw you were doing the same thing as this; how did you get the model of yours to load? I cannot get the model or texture of my block to load.

last island
#

ok so you need to put the model in its own unqie directory outside of textures named "models", then you need to put the texture in the normal texture folder, then you need to open the model and format the textures like how I did here to get it to load it

tight shuttleBOT
#

Paste version of scale_of_a_tyrant.json from @last island

pure verge
last island
pure verge
last island
# pure verge What code would I enter into startup scripts?

StartupEvents.registry('block', event => {
event.create('scale_of_a_tyrant','cardinal')
.displayName('§5Scale Of A Tyrant')
.hardness(0.8)
.defaultTranslucent()
.resistance(1.5)
.tagBlock('minecraft:mineable/shovel')
.tagBlock('minecraft:wool')
.requiresTool(false)
})

this is how I ran mine

pure verge
#

huh

pure verge
queen girder
# pure verge for some dang reason it still aint workin

It’s important to always provide logs and be verbose when things don’t work.
What exactly isn’t working?
Is the block not registered in game?
Is the block texture missing?
Is the model missing?
Does the game crash on startup?

The more detail, the easier it will be for people to help you rule out possible issues.

pure verge
#

the block as an item/placeable block is being created, but it is with the black and purple checkerboard, and not the model nor the texture I tried to define

#

here is the startupscripts code, the log, and the model png+json

StartupEvents.registry('block', event => {
    event.create('incomplete_quantiscope','cardinal')
    .displayName('§1 Incomplete Quantiscope')
    .hardness(2)
    .resistance(3.5)
    .tagBlock('minecraft:mineable/pickaxe')
    .requiresTool(true)
   });

the two "incomplete_multi_quantiscope" files are under "Instance/kubejs/assets/kubejs/models/block"

tight shuttleBOT
#

Paste version of startup.log, incomplete_muti_quantiscope.json from @pure verge

pure verge
queen girder
#

What about your normal latest.log?
That log issuable has texture/model related messages

pure verge
tight shuttleBOT
#

Paste version of latest.log from @pure verge

queen girder
#

It is looking for the texture under the Minecraft namespace

#

I don’t 100% know how to put it under the kubejs namespace without looking at a reference, but at the very least that is the problem

pure verge
#

I see, thank you.

midnight yoke
#

Shouldn’t all of the namings match up?
In the event you create incomplete_quantiscope
The model file is incomplete_muti_quantiscope
And the texture file is
incomplete_quantiscope
Try making sure they all have the exact same name, I think the model is looking for a texture with a name the same as itself, so removing the ‘muti’ might help

midnight yoke
pure verge
#

also look! I did some extra work and now I can also place it facing in different directions!