Jump to content

[1.8] how to use worldRendering to render an item.


karelmikie3

Recommended Posts

As of 1.8 IItemRenderer has been deprecated and EntityItem is always rendered the same (using .json model).

 

To "override" it you would need to make custom EntityItem (extension) with custom renderer registered (like for any other entity).

Then operate on your custom renderer.

 

That's what I did ;p

 

P.S - I might not understood your problem - you could be more precise :)

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Are you talking about placed block or block as an item?

 

Block as an item (in inventory) are represented by ItemBlock (or BlockItem, i don't remember) and when dropped into world they are still treated as EntityItem.

 

If you are referring to placed-blocks then there are several ways.

If you are looking for simple, yet not cubic shape:

Have look at how .json models work (Blocks section):

http://greyminecraftcoder.blogspot.co.at/p/list-of-topics.html

Code examples:

http://www.minecraftforge.net/forum/index.php/topic,26267.0.html

 

For more advanced stuff (custom models) you will need TileEntitySpecialRenderer or ISmartBlockModel, depends on what you want to render. All those classes are either in minecraft.client package or minecraftforge.client.model

 

I don't have much experience here aside from very simple renderer for my crystals xD Ask TGG (GreyGhost), he's probably dealing with those lately.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Well, the examples I linked tell how to add renderer to block when it's in inventory.

 

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe01_block_simple/StartupClientOnly.java

 

This is ofc. based on .json model.

 

If you ought to use other renderer then I can't help you - each works differently, there is no universal answer here.

Post some code and what you are trying / tried.

1.7.10 is no longer supported by forge, you are on your own.

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.