#what is the support for models made by blockbench?

33 messages · Page 1 of 1 (latest)

opal sinew
#

this is the first time ive seen block becnch, i know nothing about it other its a modeling and texturing aplication.

i have a few base line question about how models created can be used in minecraft.

if it were to model something like a 3d flower.

  1. is it possible to use said models in vanilla minecraft? or would you need to install/create your own mod?

  2. if you can use it in vanilla, in what way is it implimentd? do you have to use datapacks? resource packs? does putting it in world require the model to be on something like an entity (invisible armorstand), or can they models be supported as actula placable and mineable blocks.

  3. if they can be placeable and mineable blocks, how would that work from a internal persepective, is it a block with costum data on it? can you add your own names for blocks, or do you have to use an existing block with some special tag attached to it? or would you have to repalce the texture/model for an existing block for it to work?

faint halo
# opal sinew this is the first time ive seen block becnch, i know nothing about it other its ...
  1. and 2.: no mod needed, for blocks/items you can use a normal resource pack
  2. A resource pack is purely client side, so you can't add new items/blocks.
    For items there is a way to give an item an alterantive model (but it will still behave/be useable like the original item, just the visual changes if it has a specific NBT tag).
    For blocks the most you can do is change the model based on the blockstates that block has (so for example for glazed terracotta you could have 4 unique models depending on its orientation instead of 1 model that is just rotates 90 degrees)
#

Here is a tutorial on how to change a block's or item's model:

#

!faq export-vanilla-java-model

pastel wedgeBOT
# faint halo !faq export-vanilla-java-model

(Result for "export-vanilla-java-models")
Disclaimers:
-This is a tutorial to get your item/block models into a normal Java Edition resource pack.
-Any folders that are mentioned need to be created if they aren't there yet!
-Do the steps in that exact order!

Step 0: Setup
In Blockbench:
Your project needs to be in the Java Block/Item format. (Check at File > Project... in Blockbench).
If it's not convert it via File > Convert Project. ATTENTION: This will break the model visually due to format specific restrictions! (see !faq java-rotation and !faq java-sizelimit)

-Your Pack:
Create a folder inside Minecraft's resource pack folder (will be referred to as "YourPack" for the rest of this tutorial). It is usually at C:\Users\INSERT_YOUR_PC_USER_HERE\AppData\Roaming\.minecraft\resourcepacks. Put this file https://cdn.discordapp.com/attachments/883449189533638777/899224109869846558/pack.mcmeta in there.

Step 1: Saving Textures
Save all your textures first.
To do that either:
-press Ctrl+S, or
-click on the save icon next to the texture(s), or
-rightclick the texture(s) and click "Save As"
Make sure to save them directly in any subfolder of YourPack/assets/minecraft/textures.
Reason: If you don't do that or move/rename the files later your model won't find the textures anymore.

Do not use any capital letters or spaces in file or folder names or they will be invalid for a vanilla client! (except for the pack's main folder).

Step 2: Exporting the Model
After saving the textures use File > Export > Block/Item and save the json file in YourPack/assets/minecraft/models/item (or /block, depending whether you replace an item in your inventory etc. or a placed block.).
Name the file based on the id of the thing you wanna replace (totem_of_undying for a Totem of Undying for example). Check the default pack if you are not sure what the exact name is (see !faq default-pack for more information)

opal sinew
#

alright good to know

opal sinew
# faint halo 1. and 2.: no mod needed, for blocks/items you can use a normal resource pack 3....

you said said that you can change item models based on a nbt tag, is this a specific already existing nbt tag, or are you somehow changing the model/texture based on a arbitary nbt you chose?

like is there some model nbt tag on items in the base game

or do you somehow assign an arbitrary costom nbt and then with some system you change the model based upon the arbitrary tag you assigned.

faint halo
#

!faq custom_model_data

pastel wedgeBOT
# faint halo !faq custom_model_data

Disclaimer: This only works for items (not placed blocks!) and only if you are in Java Edition 1.14 or later!

Example to give a stick 4 new models:
You'd place this file in YourResourcePack/assets/minecraft/models/item and call it stick.json.

stick.json

{
    "parent": "item/generated",
    "textures": {
        "layer0": "item/stick"
    },
    "overrides": [
        { "predicate": {"custom_model_data": 1}, "model": "item/custom_stick"},
        { "predicate": {"custom_model_data": 2}, "model": "custom/branch"},
        { "predicate": {"custom_model_data": 3}, "model": "block/stone"},
        { "predicate": {"custom_model_data": 4}, "model": "item/more_sticks"}
    ]
}```
Ingame you can give yourself one of the custom sticks by doing `/give <player> stick{CustomModelData:X}` (X being replaced by the number you want)

*PS: The model path is **always** relative to the models folder of your pack.*
*So `"item/custom_stick"` will load the model in `YourPack/assets/minecraft/models/item` called custom_stick.json.*
*For `"custom/branch"` it would be the model in `YourPack/assets/minecraft/models/custom` called branch.json and so on.*
opal sinew
#

thanks

faint halo
#

for context, the

"parent": "item/generated",
"textures": {
    "layer0": "item/stick"
},

part is the default model of a stick (basically tells the game "generate an item model from this texture). For other stuff you might need to change that part.
The section after that is what defines which model the item swaps to when the criteria are met.

opal sinew
#

alright so in the resourse pack you define a json that references an int to a specific model/texture file.

and then in game on the relelvant item type you assign a nbt tag CustomModelData:int and it will used the relevant model/texture for the from the item based file defined in the resourse pack?

#

just making sure im understanding it correctly

faint halo
#

that references an int to a specific model/texture file.
only model, never texture

#

but otherwise yes

opal sinew
#

is it possible to change the texture?

#

or is the texture included in the model itslef

faint halo
#

Each model's texture is defined in the model.
It does not matter which textures the base item uses by default.

opal sinew
#

okay, in some games the model is jst the poisitonal data of the mesh, so i was wondering

faint halo
#
{
    "parent": "item/generated",
    "textures": {
        "layer0": "item/stick"
    }
}```
A model can be just this for example, or it can be a custom made model in BB for example
opal sinew
#

would it be possible to assign a custom model data to a block item (like cobblestone) and have it show that model when its held

(it of corse wont carry over when the block is placed) or is custom model data restricted to only specific items when held?

#

and i assume the nbt data would be lost upon placing, and mining it back up after would yeild normal cobblestone

mental coral
#

Custom model data only apply to most non-hardcoded items. Block in inventory is still item til they're placed.

faint halo
opal sinew
#

Do you know if armor stands use the blovk model or the hand model when a block is placed on there head?

faint halo
#

item

#

everything uses item model (unless you actually place it or display it in a minecart)

opal sinew
#

Aslo when making a model can it be scaled, to be scaled bigger? Is ther a limmit to how large a model can be?

#

Can you have a model thats mulipul block big if you wish?

faint halo
#

!faq java-sizelimit

pastel wedgeBOT
# faint halo !faq java-sizelimit

Java block and item models can only contain elements between -16 and 32 in the edit mode (which is the equivalent of 3 blocks ingame). They are limited to this size by the format, not just by Blockbench.

Item models can be displayed larger ingame by going to the display mode (top right) and using the scale slider to resize the model.
Maximum size in blocks for the different slots (when the model is 3x3x3 blocks big in edit mode and scale is set to 4):

Slot | Size | Base Size Multiplier
Head | 7.5 | 0.625
Hand | 12.0 | 1.000
Item frame | 6.0 | 0.500
(Formula = 3 x 4 x base_size_multiplier)

Keep in mind that a model stops rendering with the entity holding/wearing it. An entity stops rendering once its hitbox is not in your point of view anymore.

opal sinew
#

allright thanks, i think that all i need to know.

opal sinew
#

!close