Jump to content

[SOLVED][1.7.10] TileEntity under water is surrounded by a bubble?!


Frag

Recommended Posts

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.)

 

skeleton.jpg

 

 

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.

 

 

Link to comment
Share on other sites

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.

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

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

.

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.

Link to comment
Share on other sites

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.