Jump to content

Recommended Posts

Posted

I am making a mod were I have a copy of vanilla cocoa beans and thanks to a person called "VivaDaylight3" I have it working, but I have an issue with the render types method.

 

When I put this into my block class:

public int getRenderType()

    {

        return 28;

    }

 

(28 being the render cocoa render type)

 

 

I get this error:

 

  Reveal hidden contents

 

 

Is there a way to fix this or will I have to make this into a tile entity and then custom render the block like that.

Sorry if I sound stupid or am making this more complicated than it needs to be because I am not the best at modding yet.

I would really appreciate any help anyone can give.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Posted

Hi

 

If you want to use the cocao rendering code to render your new block, you will need to make your new block extend BlockCocao instead of whatever it's currently extending, so that the cocao rendering code can work with it.

 

If that won't work for you, alternatively you could copy the cocao rendering code into your own renderer (eg ISimpleBlockRenderingHandler).  Some more information here-

http://greyminecraftcoder.blogspot.com.au/2013/07/block-rendering.html

and there is also some sample code here

http://greyminecraftcoder.blogspot.com.au/2013/09/sample-code-for-rendering-items.html

(look at the BlockPyramidRenderer section)

 

-TGG

 

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.