Jump to content

Help with ISBRH!


DuzyMods

Recommended Posts

Hello, I'm relatively new to modding but I'm catching on quick. I'm modding with 1.7.10, my mod currently has a custom mob, a guinea pig  ;D, and I've been attempting at doing what I imagined would be intermediate task, but turned out to be a very advanced one:

 

Creating a cage-block with a base and four walls that when placed next to other cage-blocks changes the render for all blocks, removing the walls in-between the blocks. http://postimg.org/image/gmsz8n711/

 

I understand the basic algorithm for placing a block and looking to the blocks around it to decide which render to use, what i don't understand is how to use ISimpleBlockRenderingHandler to change the render. My questions are...How does ISBRH work? What class and method do I put my algorithm in?

 

Also... I'm currently using TileEntity to get my cage to render correctly in game and I've heard its problematic, is there a better way to render my block?

Link to comment
Share on other sites

I'm not verry familar with the ISBRH but what I know of it is, that it doesnt need an tileEntity. If you want to use a tileEntity for renderering, you couod use tileEntitySpecialRenderer instead.

 

Anyway, on to your question. what you basically need to do is check wich sidewall of the cage needs to be rendered, and than call the responsible methodes to render these.

the algorithm should be placed in the ISBRH class, since there is only one instance of your block class.(the one you registered). Keep in mind that the ISBRH class is ClientSide only! So if its not possible to run a neighbor check from there, you need to use the tileEntity (and put the algorithm there).

 

Hope this helped you out

N247S

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

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.