#Custom block model not working at all

48 messages · Page 1 of 1 (latest)

proud grove
#

I'm trying to make a block model work, but nothing i've tried is working. The .json fire attatched is the block model, and it's stored in kubejs\assets\kubejs\models\block
The 4 textures that are referenced in the file are stored at kubejs\assets\kubejs\textures\block and their names are exactly the same as in the .json file.
The code used to create the block is

StartupEvents.registry("block", (event) => {
    event.create("hardened_machine_frame") // Create a new block with ID "kubejs:example_block"
    .displayName("Hardened Machine Frame") // Set a custom name
    .soundType('metal')
    .hardness(5)
    .resistance(5)
    .requiresTool(true)
    .tagBlock('minecraft:mineable/pickaxe')
    .tagBlock('minecraft:needs_iron_tool')
    .defaultCutout()
  })

Thanks for any help!

median pebbleBOT
#

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

pastel pollenBOT
#

Paste version of hardened_machine_frame.json from @proud grove

#

You can write your code in a codeblock by typing it between the codeblock delimiters:

```js :arrow_left:

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

``` :arrow_left:

As an example, :arrow_up: will look like this:

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

thanks i forgot about that lol

delicate hull
#

also the name of your item is "test_block" but the json file is called "hardened_machine_frame"

#

and since you arent using a .model() method it doesnt know where to look for the model file

proud grove
delicate hull
#

oh yea mb haha

proud grove
delicate hull
#

no it would be ```js
.model('kubejs:block/hardened_machine_frame')

proud grove
#

thanks so much!

delicate hull
#

if its in your model/block folder

proud grove
#

yep it is

delicate hull
#

lmk if it still shows the block as a purple and black cube cos all my custom blocks have broken for some reason

proud grove
#

yeah it does

pastel pollenBOT
#

Got a missing texture?

They are big, ugly and waaay too pink (like, seriously, who thought pink was a good color choice??).

Minecraft knows this and will report any missing textures and models in the latest.log and debug.log files, including where it's looking!
Always check your logs.
Always.

proud grove
#

i dont know where that is

#

i found it i think

#

i have no idea what i'm looking for

delicate hull
#

something like this

#

all the ones with kubejs at the start are my broken ones, no idea why they are like that, they used to work

proud grove
#

here all all the warnings with kubejs in the line i found
anything else was just info

#

none of these seem texture related, could it be an issue with the blockbench json?

#

this is from latest.lob because i cant find debug.log

delicate hull
#

trying using ctrl + f while at the top of the file and search for 'texture reference'

#

itll show all the parts where that shows up in the file

proud grove
#

i think i found the issue

delicate hull
#

yep, thats probably it, open up your json file and instead of "5": "hardened_machine_frame_top", change it to "5": "kubejs:block/hardened_machine_frame_top",

#

do that for all of them

proud grove
#

thanks

delicate hull
#

and so long as you texture files are in the kubejs/blocks/textures folder it SHOULD work

proud grove
#

The model works, but when holding it in my hand it's really big and blown up, plus its a flat image in my hotbar/inventory, do you have a fix for this?

delicate hull
#

yes!

#

open up your model in blockbench go to display in the top right corner

proud grove
#

alright, im in there

delicate hull
#

if its a block choose default block, for item choose item

#

do that for all the slots

#

in the top left

proud grove
#

Thanks so much!

delicate hull
#

all good :)

proud grove
#

i had only gotten to the display part, and i thought i would haveto fiddle with the numbers for eternity

delicate hull
#

same haha

#

someone else pointed me towards that

#

i gotta try and fix all my models now :c

#

i think my json files are broken

proud grove
#

oof

#

good luck