Jump to content

Make a TileEntity render with a smaller bounding box?


Busti

Recommended Posts

Hello,

when I render a Block with the TileEntitySpecialRenderer it disappeares when its block bounds are out of my viewport. Can I fix them? I know that the RenderBlocks class has a method to do so but render renderTileEntityAt(); doesn't implement that. How can I fix the block bounds otherwise?

 

Busti

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

Make the block's bounding box bigger.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

What is your goal, here?  What is the problem you are trying to solve?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

This

 

 

 

the bounding box of the pipe is created when you are looking at the pipe and it is stored in the block globally (There is no way to create individual render bounds) but when you looked at another pipe bounding box it may become smaller than some rendered pipe bounding boxes.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

Hello,

 

I had the same problem. Put this in your TileEntity class:

 

@Override
public AxisAlignedBB getRenderBoundingBox()
{
	return AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
}

 

Hope I helped!

 

BTW: When do you write your ForgeMultipart tutorial?

 

ss7

You sir are a god damn hero.

Link to comment
Share on other sites

Thanks that worked.

The FMP Tutorial might take a while because I am waiting for forge 1.7 to come out so I won't have write a new one right after I made the first.

But here is a tip: FMP Parts are not blocks. They are individual types and you don't need a Tileentity or a block. If you want to make parts for a Pipe like I did have a look at the ProjectRed expansion parts. They are recreating pneumatic tubes there. You have to register the Parts you created in your Proxy.

https://github.com/MrTJP/ProjectRed/tree/master/common/mrtjp/projectred/expansion

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

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.



×
×
  • Create New...

Important Information

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