Jump to content

Recommended Posts

Posted (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 by Jipthechip
Posted
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.

  • Thanks 1

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.

Posted
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?

Posted
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()

 

  • Thanks 1

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.

Posted (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 by Jipthechip
Posted
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.

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.