#Custom block with block states

44 messages · Page 1 of 1 (latest)

prisma flicker
#

I need help to create one custom block using note block. Idk where to start, is there any tutorial?

stable gulchBOT
#
Welcome to the help forum!

Please make sure to read #1029373817119838218 as it may answer your question!

Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.

hearty comet
prisma flicker
hearty comet
hearty comet
#

ok good start, what kinds of things have you done
any custom block models?

#

I'm wondering if you need help on the model itself or just making it be used for certain noteblock blockstates

prisma flicker
#

I made hats, custom chest and items (2D)

hearty comet
#

were those models or textures?

prisma flicker
#

both

hearty comet
#

ok so making block models is basically the same as item models

#

they use the same format and everything

prisma flicker
#

Okay, how can I get my custom block in the game?

hearty comet
#

what blockstates of the note block do you want this model to appear for?

#

well no matter the case you are going to need to create a blockstates file for it
a json file in "minecraft/blockstates" that sorta tells the game which models to use for a block

#

For example, this is the note block blockstates file in vanilla

  "variants": {
    "": {
      "model": "minecraft:block/note_block"
    }
  }
}```
#

there is only a single model it uses by default

#

but you can change this

prisma flicker
#

I need to make 2 blocks. So I need to change the block with some note?

hearty comet
#

ok, when do you want these blocks to appear?
like, on a certain pitch, a certain instrument?

#

or a combination of those

#

you have a lot of options to work with for note blocks, and any is fine

prisma flicker
#

I think anyone serves ... as long as it works xd

hearty comet
#

ok, I can make it change models when tuned to different notes

#
  "variants": {
    "note=1": {
      "model": "minecraft:block/your_custom_block1"
    },
    "note=2": {
      "model": "minecraft:block/your_custom_block2"
    },
    "": {
      "model": "minecraft:block/note_block"
    }
  }
}```
here, you can change the "your_custom_block1" and 2 to whatever your models are named
#

(and if your models are not in minecraft/models/block then this file will have to be changed to reflect that file structure)

hearty comet
#

wait one sec the file I sent actually isn't correct

#

I'll fix it up rq

prisma flicker
#

And that folder we have the block states, where should this note block be?

hearty comet
#

the file I sent should be directly in there

prisma flicker
#

here?

hearty comet
#

yup, that's right

#
  "variants": {
    "note=1": {
      "model": "minecraft:block/your_custom_block1"
    },
    "note=2": {
      "model": "minecraft:block/your_custom_block2"
    },
    "note=0|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24": {
      "model": "minecraft:block/note_block"
    }
  }
}```
here, this one's fixed
turns out I have to be more verbose in my definitions or Minecraft doesn't like it
#

wait no way I can make it do the same thing with fewer characters
I learn something new every day

#
  "variants": {
    "note=1": {
      "model": "minecraft:block/your_custom_block1"
    },
    "note=2": {
      "model": "minecraft:block/your_custom_block2"
    },
    "note=!1|!2": {
      "model": "minecraft:block/note_block"
    }
  }
}```
prisma flicker
#

i think i understand

#

sorry for the long time to send any question, i playing lol right now

#

i need some minutes

#

xd