can't seem to get the model and texture to work, been following a tutorial to add blocks through modding but they didn't use a blockbench model so I couldn't follow the whole way through. I've checked multiple times and everything seems to be in the right place but the model of the block doesn't load
#How to load the block model and texture
42 messages · Page 1 of 1 (latest)
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.
Are there any errors being thrown when you start the mod?
nope, client runs fine, and world loads with no problems but neither model and texture load since it appears as black and purple block in both my hand and when placed
Hmm, there should be at least one error when there is an error cube model 🤔
I found it, it just didn't appear in red text
can items/blocks only be -45/-22.5/0/22.5/45 any of these 4 rotations?
depends on the game version
I assume this is the case for 1.20.1?
yes
model is working now but what do I do about the dead pixels and how do I fix the wallhack thing
also how do I make it face Me when I place it down, currently it only faces north when placed
"dead pixels": it looks like your model does not support transparency so the texture with parts "cut out" of them are just rendering black
Since you are adding this with a mod I assume you can change the render layer of this model from solid to cutout but I'm not sure on how you do it for the method you're using
"wallhack": This is cullfacing, lemme pull up the faq for that
!faq java culling
Java: Culling
Minecraft hides (culls) the faces between solid blocks to improve performance. To avoid this, remodel a non-solid block. For example: Glass, Pressure Plates, Flowers.
Alternatively, display the model by putting it into the head slot of an invisible Armor Stand or inside an invisible Item Frame, or by using the new Item Display entity.
To make it face you: You'll need to add some blockstate values to it that change depending on what direction you face when placed, and specify a different rotation value for the model depending on what blockstate it's using
1.21.6 and newer
You can re-enable the limitations in File > Project by setting it to the correct version
-# only controls whether the limitation is there or not in Blockbench. It doesn't affect anything ingame.
And instead of a new Block() you'd make a new HorizontalBlock() so you don't need to code in the rotation behavior etc. (You'd still need to make the blockstate file for the pack ofc)
-# not 100% sure on the class name. Might be DirectionalBlock or similar.
As for rendering, if I'm not mistaken it would be something like
ItemBlockRenderTypes.setRenderLayer(SEATTLE_PLUSHIE.get(), RenderType.translucent());
in some client setup event function.
thank you, gonna have to start looking into all of this
Alternatively in Forge you can also specify it in the model.
So if you add "render_type": "cutout", to the root of your model it should work too without the client setup event function part there
dead pixel problem has been solved but culling faces is a bit confusing. since culling faces for the model affects my block and not the nearby blocks I can't seem to stop the game from culling the faces of nearby blocks when placed on my block
update, managed to fix the culling by having it share properties with glass
I'm stumped, I can't get the block states working
[17:35:30] [Worker-Main-2/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'warspiteswordmod:blockstates/seattle_plushie.json' in resourcepack: 'mod_resources' for variant: 'facing=east': Unknown blockstate property: 'facing'
[17:35:30] [Worker-Main-2/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'warspiteswordmod:blockstates/seattle_plushie.json' in resourcepack: 'mod_resources' for variant: 'facing:south': Unknown blockstate property: 'facing:south'
[17:35:30] [Worker-Main-2/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'warspiteswordmod:blockstates/seattle_plushie.json' in resourcepack: 'mod_resources' for variant: 'facing:west': Unknown blockstate property: 'facing:west'
[17:35:30] [Worker-Main-2/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'warspiteswordmod:blockstates/seattle_plushie.json' in resourcepack: 'mod_resources' for variant: 'facing=north': Unknown blockstate property: 'facing'
[17:35:30] [Worker-Main-2/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'warspiteswordmod:blockstates/seattle_plushie.json' missing model for variant: 'warspiteswordmod:seattle_plushie#'
it just keeps giving Me these errors
you are adding trying to use blockstates that dont exist for that block
well that's what I don't understand cuz I did make the blockstates, and I think I correctly did the DirectionalBlock Class which I just stole from another mod
show the f3 screen when you are looking at the block in game
that block has no blockstates
if you look at a block that can rotate, you should see it listing the blockstates there
idk, i dont mod