#2d in inventory 3d model when held for kubejs blocks

124 messages · Page 1 of 1 (latest)

noble island
#

is this possible if so how please i need it as fast as possible prayge

merry pollenBOT
#

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

noble island
#

2d in inventory 3d model when held for kubejs blocks

snow idol
#

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

noble island
#

only for item

#

i am developing a lantern corps addon of palladium called a new corps

snow idol
#

its the same as like mushroom and lever and stuff like that

#

its virtually the same between block and item

noble island
#

what i want to achieve is for kubejs made battery blocks to have 2d texture in inventory

snow idol
#

i know

#

thats controled by texture pack

noble island
#

but didnt work

#

thats why i wanted to ask here

snow idol
#

lookup how this work

noble island
#

i see thanks ill try and report

#

one of the other developers and i were looking for this but couldnt find how to

snow idol
noble island
#

i already have 2 both in assets

snow idol
#

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

noble island
#

one for blocks itself and one for the 2d texture

snow idol
#

or witchever one u set up

noble island
#

but my kubejs block uses the namespace kubejs: instead of the addon's namespace

#

would that cause any problem?

snow idol
#

maybe

noble island
#

hmm is there anything i can do about it?

snow idol
noble island
#

because i cant change the kubejs namespace due to functions those blocks have

#

in the addon

snow idol
#

if its a kubejs block

noble island
#

oh true

#

i can open kubejs folder

snow idol
#

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

snow idol
#

so its gona change the black bed

noble island
#

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

snow idol
#

u just gota make a normal texture pack

snow idol
#

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

noble island
#

yeah

snow idol
#

but each mod has its own folder

#

so the kubejs mod dosnt look in the Minecraft folder

#

it look in the kubejs folder

noble island
#

im asking this because .model exist in the code

snow idol
#

idk how the hell it work

noble island
#

same

snow idol
#

i think ur better using texture pack only

noble island
#

ill try with removing the .model

snow idol
#

its way more documented and known

noble island
#

thanks

#

ill test and report

snow idol
#

its relly not that complex

#

ull probably need to make a custom block model that just redirect to ur model like in vanila

noble island
snow idol
snow idol
noble island
noble island
#

trial and error is the key SOB

noble island
#

with .model i cant change anything but it has the 3d model on all the places

snow idol
#

did u not setup a texture

#

thats the only issue

noble island
#

i did

snow idol
#

it does seems to take ur model

snow idol
#

add .texture or wtv it is

#

to point to ur texture

noble island
snow idol
#

otherwise u just did it wrongly

noble island
snow idol
snow idol
#

no

#

who tf talked ab .model

#

you not me

noble island
#
{
  "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

snow idol
#

what about the other one

noble island
#

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()
  })```
snow idol
#

no not tha

#

the other json

#

u should have 2

snow idol
noble island
#

OH I FORGOT TO MAKE 2D ONE

#

sorry its 3am 😔

snow idol
#

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

noble island
#

so bluelanternbattery.json is the 2d image's file

#

now i need to do one for the model?

snow idol
#

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

noble island
#

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

noble island
snow idol
#

ok

noble island
#

what will i do now?