#Chopping block!

61 messages ยท Page 1 of 1 (latest)

shut atlas
#

Hello everyone.

Even if I'm an experienced developer, I'm scared / negated in 3d modelling. Nonetheless, I wanted to create a custom block for one of my mods, but I have no idea where to start (new to 3d modelling, new to Blockbench).

The idea is to get the stripped spruce log and an iron axe models and... meshup them (with the axe partially inside the block on the upper part, diagonally with the cutting edge looking downside, as... a chopping block, I think you got it).

I saw online that I can load the models via a plugin called CEM template loader, but in the tutorial I saw online, it all ends up in an Optifine texture pack (which is not what I want to do), also I'm not sure whether I can load two different models, or I can load non-mob models, either. Also, I don't know if I can make a more-than-one block sized element. Last but not least... what about the inventory icon?

May you please help me understand how to do this (in theory) easy task?

Thank you very much for the support!

opaque oxideBOT
#
Conflicting tags detected

It looks like you have applied tags to this post that conflict. Please only apply the tags that are relevant to your post. We can only help you if we know the context of your question, and applying incorrect tags makes this confusing.

You can refer to #1029373817119838218 for a description of what each tag is for!

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.

opaque oxideBOT
# craggy pier !faq default-pack
FAQ
Minecraft: Default Pack

Disclaimer: Use these packs as REFERENCE, don't put your models inside them, it just increases your pack needlessly. Also don't put any of the unedited files from it into your own pack. The distributions of default assets in your pack is illegal.

For Java Edition:
(This works the same for all versions, 1.17 is just used as an example here)
Go to .minecraft/versions/1.17 and open the 1.17.jar in there with a zip program. Alternativley you can copy the .jar file and change the file extension to .zip and double click it.
Extract/copy the "assets" folder inside the jar somewhere. It contains all the default models/textures.

For Bedrock Edition:
Go to https://docs.microsoft.com/en-us/minecraft/creator/documents/resourcepack and scroll to "Building the Resource Pack". The download for the vanilla resource pack can be found right above that title.
Alternatively here is the direct download link: https://aka.ms/resourcepacktemplate

craggy pier
#

that's where you can get none-mob assets (models and textures)

#

To combine two different things into one model you'd open both in separate projects, then in one of them use File > Import > Open Project > The Project you wanna import.

#

Since item models are 99% just an extruded image loading the item model will do just that in Blockbench. However Blockbench creates it as mesh element to immitate the ingame behaviour, but doesn't let you edit it (nor can you combine it with other elements/cubes).
To get an editable extruded image you'd use File > Import > Extruded Texture and load the texture you wanna extrude (etrusion = generate model from texture with 1 unit thick cubes)

#

Also, I don't know if I can make a more-than-one block sized element.
1 unit in Blockbench is 1/16 of a block. Cubes can be any size (even decimal values etc.). Block/Item models have the following size restriciton though:

#

!faq java-sizelimit

opaque oxideBOT
# craggy pier !faq java-sizelimit
FAQ
Java: Size Limit

General information: Java block and item models can only contain elements between -16 and 32 in the edit mode (=3 blocks ingame). They are limited to this size by Minecraft itself!

Item models can be displayed larger via display mode (top right option) and using the scale sliders in the relevant displays to resize the model.
Maximum size in ingame blocks for the different slots (when the model is 3x3x3 blocks big in edit mode and scale is set to 4) for a player (or play-like entity):

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.

1.19.4 and newer: Item displays
If you wanna have models that are placed in your world (so not in an entity's hands etc.) you can use item_display entities.
Item_display entities have no scale limit and render even if the entity is not in your POV (unless actively specified otherwise).
/summon item_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,2f,2f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:1}}}
This would summon an item_display entity using the CustomModelData:1 model of a stick, and display it twice as large than it is in Blockbench's Edit Mode.

PS: You don't need to use CustomModelData if you don't want to, this is just an example. There is also a lot more settings this entity can have (render distance, shadow, brightness etc.). More information about the entity can be found in https://minecraft.fandom.com/wiki/Display#Entity_data or in generator websites like https://mcstacker.net/ .

craggy pier
#

Last but not least... what about the inventory icon?
The item can be a separate model (which can be an icon or the block model). If you want only the icon in your inventory etc. to be an icon, but the thing in your hand still be 3D then you will need to check how mods do that (not familiar with mods myself, but I know they can do it)

shut atlas
#

Thanks! So... afaik I need to create an item_display entity, isn't it?

craggy pier
#

if you make a mod you can just add more blocks
if you don't make a mod then you have to fake blocks by summoning an item_display entity that displays the model (or replace an existing block's model)

shut atlas
#

ah ok, understood ๐Ÿ™‚ thanks!

#

Hmmm, that's the stripped_spruce_log.png, can it be that it is a "multi texture object"?

#

Ok, something like this?

#

I copied the faces and ensured they're within 16x16, then added the iron axe

strong creek
#

why does the block look like that, did you extrude the cube sides too

shut atlas
#

Good question, I have no idea :D:D:D

#

I think I did

#

Should I create a cube and apply the textures? I imported the 3 textures via File > Import > Extruded Texture

strong creek
#

yeah make a cube and apply the textures.

it's better for performance and you won't get z-fighting

#

if you wanted to keep it like this you could resize each side to be 0 blocks thin

shut atlas
#

@strong creek something like this? (I need to delete the hidden objects yet)

craggy pier
#

yes

#

less cubes (and faces) = better performance

strong creek
#

yuh

shut atlas
#

now AFAIK I need to export it, I see in some tutorials that I need a json file, correct?

craggy pier
#

File > Export > Java Block/Item model will give you a .json, yes

#

if those textures were loaded from a copy of the default pack into Blockbench (and not as single files that are located on your Desktop for example) you don't need to do anything with the textures

shut atlas
#

Awesome ๐Ÿ™‚ it was the next question ๐Ÿ˜„

craggy pier
#

asuming you are using the downloaded version of Blockbench at least

#

cause the web version can't automatically read folder paths to generate the (relative) texture path in the model itself

shut atlas
#

Hmmm, I don't have that export option though

#

(desktop edition)

#

Should I need a plugin perhaps?

craggy pier
#

you can try File > Convert Project, but things might break (rotations reset etc.)

shut atlas
#

Yes they did ๐Ÿ˜„ I had to replace the axe

#

At that point it normally saves as JSON file directly

#

Hmmm, I need to take a screenshot of the model to make the item's inventory icon

#

I tried to import to Windows 3D Viewer, but it blurs the texture... is there any other way I could make the screenshot?

opaque oxideBOT
# craggy pier !faq screenshot
FAQ
Blockbench: Screenshot

To get a screenshot with a transparent background and without Blockbench's UI either :
-Ctrl+P or
-Rightclick the background > Screenshot Model or
-View > Screenshot (this one also has options for gif recordings and timelapses)

craggy pier
#

but if you want the model as icon you can just use it as the item's model, no?

#

no need to make a screenshot

shut atlas
#

That's what I'm getting

#

Though this is my texture

#

which is under assets/my-mod-id/textures/items/chop_block.png

#

And the item's identifier is chop_block

craggy pier
#

alternatively if yo uawnt it to be exactly like a normal block you can also just go to File > Project and set (exactly) block/block in the parent field and then export the model again (you won't see that change in the Display mode, only ingame)

shut atlas
#

Awesome, so the icon essentially is not necessary, correct?

craggy pier
shut atlas
#

Hey, hello! Returning on this one to complete and close ๐Ÿ˜„

I've noticed that the model's hitbox seems to have a problem: I can pass through half of the box. Is there anything I can do to fix this? Thank you very much ๐Ÿ™‚

craggy pier
shut atlas
#

It is a modded block

#

Maybe it has something to do with getOutlineShape?

shut atlas
#

Yup, I copy/pasted an example which was explaining a half-block sized object. Fixed by setting the value to 1.0f ๐Ÿ˜„ thanks!