Jump to content

[SOLVED] Rotate an Icon


Sag73

Recommended Posts

I am trying to rotate the top texture of a block base on its metadata.  I have looked everywhere and I have had no luck.  I have looked at other blocks such as the piston and wooden logs but they have been no help because the deobfuscation is quite poor (no offence to the MCP team they do a great job but deobfuscation is normally pretty bad whoever is doing it and I don't get why Mojang obfuscate their code if they are meant to be so supportive of modding but that is another subject).  I have also tried IconFlipped and it has been no use.

 

The source for my block is at https://github.com/Sag73/Omnitech-mcmod/blob/master/omnitech_common/sag73/omnitech/block/BlockConveyor.java.

If you guys dont get it.. then well ya.. try harder...

 

Source of all my public mods are available on my Github.  Go there and look for a snippet if you're stuck with something.

Link to comment
Share on other sites

if you're using ISimpleBlockRenderingHandler ... you can still use glPushMatrix and popmatrix

and if he doesnt change the meta when rendering (which obviously he shouldnt ) there shouldn be any "reseting"

 

OR

 

im high

 

 

you chose

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

  • 2 months later...

You need to make an ISimpleBlockRenderingHandler for your block. Then you can use the fields uvRotate[East|West|North|South|Top|Bottom] in the RenderBlocks instance you're provided with to specify how often the specific side should be rotated. Be sure to reset them to 0 afterwards or other blocks might get screwed.

 

Thanks!  I know it's been some time since your post but how do I reset it to 0 afterwards?  GL11 push and pop matrix don't seem to work with ISBRH.

 

Here is the source so far.

If you guys dont get it.. then well ya.. try harder...

 

Source of all my public mods are available on my Github.  Go there and look for a snippet if you're stuck with something.

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.

Announcements



×
×
  • Create New...

Important Information

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