Jipthechip Posted April 14, 2020 Posted April 14, 2020 (edited) My custom blocks are rendering like they are completely solid, how do I change this? (image link below because uploading it as an attachment and "Insert Image from URL" failed) https://ibb.co/nLpgwxz EDIT: I also noticed that the bounding boxes fill the entire block. How do I define these? Is a VoxelShape required for this? Edited April 14, 2020 by Jipthechip Quote
Animefan8888 Posted April 14, 2020 Posted April 14, 2020 29 minutes ago, Jipthechip said: My custom blocks are rendering like they are completely solid, how do I change this? (image link below because uploading it as an attachment and "Insert Image from URL" failed) https://ibb.co/nLpgwxz I believe you do this via Block.Properties::notSolid or something similar. 1 Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Jipthechip Posted April 14, 2020 Author Posted April 14, 2020 37 minutes ago, Animefan8888 said: I believe you do this via Block.Properties::notSolid or something similar. I tried changing the isSolid and blocksMovement properties of the Material to false, but that didn't work. Is that what you're talking about? Quote
Animefan8888 Posted April 14, 2020 Posted April 14, 2020 1 hour ago, Jipthechip said: EDIT: I also noticed that the bounding boxes fill the entire block. How do I define these? Is a VoxelShape required for this? Yes the VoxelShape methods are what you use for this. 3 minutes ago, Jipthechip said: I tried changing the isSolid and blocksMovement properties of the Material to false, but that didn't work. Is that what you're talking about? I just checked in my version it is. Quote Block.Properties.create(...).notSolid() 1 Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
TheGreyGhost Posted April 14, 2020 Posted April 14, 2020 (edited) Howdy This example project might be helpful https://github.com/TheGreyGhost/MinecraftByExample see mbe02 The blue patch is caused by incorrect VoxelShape (default is full cube), if you set that correctly the problem will be be fixed -TGG Edited April 14, 2020 by TheGreyGhost 1 Quote
Jipthechip Posted April 14, 2020 Author Posted April 14, 2020 (edited) 21 hours ago, Animefan8888 said: Yes the VoxelShape methods are what you use for this. I just checked in my version it is. Ah sorry, at first I misread what you said. Calling notSolid() on the Properties of the Block fixed the transparent face under the block, but the collision boxes and shadow rendering are still the same. 15 hours ago, TheGreyGhost said: Howdy This example project might be helpful https://github.com/TheGreyGhost/MinecraftByExample see mbe02 The blue patch is caused by incorrect VoxelShape (default is full cube), if you set that correctly the problem will be be fixed -TGG I didn't use a VoxelShape at all, just a blockmodel json. The only methods that use it (getShape(), getCollisionShape(), etc.) are all deprecated in my version, probably because all the same things are handled by the block model json and the block state. Are there any special things that VoxelShapes can do that block states and block models can't? Edited April 15, 2020 by Jipthechip Quote
TheGreyGhost Posted April 14, 2020 Posted April 14, 2020 Hi This link might help with some background information on VoxelShapes and why you might need them. https://greyminecraftcoder.blogspot.com/2020/02/block-shapes-voxelshapes-1144.html -TGG 1 Quote
poopoodice Posted April 15, 2020 Posted April 15, 2020 16 hours ago, Jipthechip said: Ah sorry, at first I misread what you said. Calling notSolid() on the Properties of the Block fixed the transparent face under the block, but the collision boxes and shadow rendering are still the same. I didn't use a VoxelShape at all, just a blockmodel json. The only methods that use it (getShape(), getCollisionShape(), etc.) are all deprecated in my version, probably because all the same things are handled by the block model json and the block state. Are there any special things that VoxelShapes can do that block states and block models can't? Block model only gives what the blocks looks like, you will need to create shapes yourself. You can still use the deprecated methods, you can see people discuss with them in lots of past posts, check this: And through voxelshapes you can use them to declare the bounding box of the block, and the box showed to player when player is looking at it also. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.