Jump to content

[1.7.2] [Modeling] Create a box that references block for texture


Recommended Posts

Posted

How would one create a box in a 3D model that has a texture of another block? I tried finding the render Tripwirehook class for reference but I couldn't find it. I I want it to be like the base of a tripwire hook or the border of the itemframe. But I don't know how.

  • 2 months later...
Posted

I thought that was how it was until 1.6.

 

It's used in so many block and entities, yet I have no idea on how to do it. Can someone tell me how to put something like the wool texture on to another block. I have seen this on things like the Tripwire, but there is a lack of understandable code explaining how they did this.

 

also, when is 1.8 forge coming out? does it have to do with the Microsoft Buying? the new(ish) EULA?

 

 

Posted

Hi

 

"Copying" a vanilla texture is easy.  Just look at the vanilla block and use the same texture name for your own block.

If you want to use it on a non-block (say - a tileentity or an entity), you can

Bind the block texture sheet,

            this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);

Retrieve the vanilla block's IIcon eg

  Blocks.wool getIcon

Retrieve the texture coordinates from the IIcon get U and get V methods, then

Render the face using the tessellator

http://greyminecraftcoder.blogspot.com.au/2013/08/the-tessellator.html

 

 

Re 1.8:

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

 

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