Frag Posted September 30, 2015 Posted September 30, 2015 Hi guys, I am trying to render an object underwater, but it end up always having an air bubble around it, which completely kill the project if I can't find a resolution. Take a look at this skeleton ... which inherit from the blockcontainer at this point (will be changed depending of the answers here.) Two questions. 1. Ay idea how to get rid of that bubble? 2. Does a TileEntity should always inherit from a BlockContainer? As funny as it sounds, all the examples I found were inheriting from that. Quote
MCRaichu Posted September 30, 2015 Posted September 30, 2015 Second question first: simply do myBlock extends TileEntity. no need to always extend BlockContainer. First question: Block has following methods public boolean isSolidFullCube() { return this.blockMaterial.blocksMovement() && this.isFullCube(); } public boolean isNormalCube() { return this.blockMaterial.isOpaque() && this.isFullCube() && !this.canProvidePower(); } public boolean isVisuallyOpaque() { return this.blockMaterial.blocksMovement() && this.isFullCube(); } public boolean isFullCube() { return true; } public boolean isPassable(IBlockAccess worldIn, BlockPos pos) { return !this.blockMaterial.blocksMovement(); } I think the passable is check inside water. try making you own material and override isSolid() and blocksMovement(), both returning false; This is just an idea and I'm using 1.8. Quote It doesn't work, I don't know why. It works, I don't know why.
Choonster Posted September 30, 2015 Posted September 30, 2015 For a standard Block , using Material.water as the block's material will make it render with water around it while in water. I can't find the part of the rendering engine that handles this, so I'm not sure if it still applies to models rendered using TESR . You don't need to extend BlockContainer to have a TileEntity , just override Block#hasTileEntity and Block#createTileEntity . Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Frag Posted September 30, 2015 Author Posted September 30, 2015 BOOM and BOOM ... you guys rock!!! Both issues are solved! Thanks to you both 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.