#2d in inventory 3d model when held for kubejs blocks
124 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
2d in inventory 3d model when held for kubejs blocks
yes u can
its not even related to kubejs
item display is soly controled by texture pack
so just make a texture pack as normal to change this
i dont know how to do it for a block
only for item
i am developing a lantern corps addon of palladium called a new corps
its the same as like mushroom and lever and stuff like that
its virtually the same between block and item
what i want to achieve is for kubejs made battery blocks to have 2d texture in inventory
i couldnt find much video about it i tried the same thing that happend with item
but didnt work
thats why i wanted to ask here
lookup how this work
i see thanks ill try and report
one of the other developers and i were looking for this but couldnt find how to

u gota create a model file then link it to a item file
i already have 2 both in assets
u can copy paste those file as is and just change the texture routing make sure your file is located in the kubejs folder insted of Minecraft tho
one for blocks itself and one for the 2d texture
or witchever one u set up
but my kubejs block uses the namespace kubejs: instead of the addon's namespace
would that cause any problem?
maybe
hmm is there anything i can do about it?
because i cant change the kubejs namespace due to functions those blocks have
in the addon
just make ur texture in the kubejs folder
if its a kubejs block
asset kubejs model item
asset kubejs item
are where you would probably want the to be located
the file in asset kubejs model item file.json
must be name as the id of the block
i see the block is set like this in assets folder
event.create('bluelanternbattery') // Create a new block
.displayName('§9Hope Lantern Battery') // Set a custom name
.soundType('small_amethyst_bud') // Set a material (affects the sounds and some properties)
.hardness(1.0) // Set hardness (affects mining time)
.resistance(1.0) // Set resistance (to explosions, etc)
.requiresTool(false) // Requires a tool or it won't drop (see tags below)
.tagBlock('minecraft:mineable/axe') //can be mined faster with an axe
.tagBlock('minecraft:mineable/pickaxe') // or a pickaxe
.tagBlock('minecraft:needs_iron_tool') // the tool tier must be at least iron
.lightLevel(0.4)
.model('a_new_corps:block/bluelanternbattery')
.box(4, 0, 5, 12, 14, 11, true)
.defaultCutout()
})```
so i dont need to change anything in here
but make a thing in kubejs assets
u just gota make a normal texture pack
it dosnt have to be theire
but ye that would be preferable
but this is not the kubejs i talk about
when u make a texture pack you have a "Minecraft" folder right
yeah
thats where Minecraft look for its texture
but each mod has its own folder
so the kubejs mod dosnt look in the Minecraft folder
it look in the kubejs folder
the part i dont understand is this, i dont need to touch the block code in the addon folder which is this and do it like how i do texturepack
im asking this because .model exist in the code
yeah ive never ised it
idk how the hell it work
same
i think ur better using texture pack only
ill try with removing the .model
its way more documented and known
its relly not that complex
ull probably need to make a custom block model that just redirect to ur model like in vanila

do u know how to make texture pack in general
tbh i think it would work even when theire
si
ill try like usual
trial and error is the key 
without .model it looks like this
with .model i cant change anything but it has the 3d model on all the places
i made mine work
did u not setup a texture
thats the only issue
i did
it does seems to take ur model
i dont see one
add .texture or wtv it is
to point to ur texture
otherwise u just did it wrongly
it works if i put the .model but with that i cant change the gui texture
show me ur json file
is that what i said to do
no
who tf talked ab .model
you not me
{
"credit": "Made by PeterCoffe",
"parent": "kubejs:item/bluelanternbattery",
"display": {
"gui": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 0.625, 0.625, 0.625 ]
},
"thirdperson_righthand": {
"rotation": [0, 90, 45],
"translation": [0, 7.5, 1],
"scale": [1.5, 1.5, 1.5]
},
"thirdperson_lefthand": {
"rotation": [0, 90, -45],
"translation": [0, 7.5, 1],
"scale": [1.5, 1.5, 1.5]
},
"firstperson_righthand": {
"rotation": [0, 90, 30],
"translation": [0, 2, 0],
"scale": [1.5, 1.5, 1.5]
},
"firstperson_lefthand": {
"rotation": [0, 90, -60],
"translation": [0, 2, 0],
"scale": [1.5, 1.5, 1.5]
},
"ground": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 3, 0 ],
"scale": [ 0.5, 0.5, 0.5 ]
}
}
}```
this is the json file
of the kubejs bluelanternbattery.json
what about the other one
the kubejs block?
event.create('bluelanternbattery') // Create a new block
.displayName('§9Hope Lantern Battery') // Set a custom name
.soundType('small_amethyst_bud') // Set a material (affects the sounds and some properties)
.hardness(1.0) // Set hardness (affects mining time)
.resistance(1.0) // Set resistance (to explosions, etc)
.requiresTool(false) // Requires a tool or it won't drop (see tags below)
.tagBlock('minecraft:mineable/axe') //can be mined faster with an axe
.tagBlock('minecraft:mineable/pickaxe') // or a pickaxe
.tagBlock('minecraft:needs_iron_tool') // the tool tier must be at least iron
.lightLevel(0.4)
.box(4, 0, 5, 12, 14, 11, true)
.defaultCutout()
})```
i mean this has no textire
no not tha
the other json
u should have 2
this has no texture directory
u need a 3d one too
thats not the one ur missing
u need 4 json in total
2 for the 2d textre and 2 for the block model
so bluelanternbattery.json is the 2d image's file
now i need to do one for the model?
yeah well this has 0 texture call in your code
no wonder its untextured
u need one for the block to pick its model
so one for the block model and one for it to tell witch model is his
so
{
"credit": "Made by PeterCoffe",
"parent": "kubejs:item/bluelanternbattery",
"textures": {
"layer0": "kubejs:item/bluelanternbattery"
},
"display": {
"gui": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 0.625, 0.625, 0.625 ]
},
"thirdperson_righthand": {
"rotation": [0, 90, 45],
"translation": [0, 7.5, 1],
"scale": [1.5, 1.5, 1.5]
},
"thirdperson_lefthand": {
"rotation": [0, 90, -45],
"translation": [0, 7.5, 1],
"scale": [1.5, 1.5, 1.5]
},
"firstperson_righthand": {
"rotation": [0, 90, 30],
"translation": [0, 2, 0],
"scale": [1.5, 1.5, 1.5]
},
"firstperson_lefthand": {
"rotation": [0, 90, -60],
"translation": [0, 2, 0],
"scale": [1.5, 1.5, 1.5]
},
"ground": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 3, 0 ],
"scale": [ 0.5, 0.5, 0.5 ]
}
}
}``` for the 2d block
i made the 3d variant too now
still not working damn
did a 3 different file like how it did before one for 2d gui one for 3d model and one for main
ok
what will i do now?
