Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi,

 

First, sorry if this topic has been already mentioned here, but I couldn't find any solution...

 

I'm making some road blocks with orientations. But only the top face has a different texture with a specific orientation:

gPdzEmi.png

 

I can't find how to rotate the texture on the top without having to make a second texture with the line turned 90°. And I really want to avoid making additional textures just because I can't rotate them in the game... Especially since I have a lot of blocks in this case. I tried some IconFlipped but it can't rotate, it can only mirrors the texture (will be useful for my arrows and corners, but not for my lines).

 

I tried to look at the code for logs or pistons, but I stuck when it goes into the render part.

I found this but I don't understand how to use it (I don't even know if it's still up to date, considering one of the pages shows the old terrain.png):

http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html

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

 

Any ideas how I could achieve this?

 

Thanks.

Why not just rotate the entire block like the furnace, just look at BlockFurnace#onBlockAdded

 

That's not how the furnace works. The furnace doesn't ACTUALLY rotate, it just displays a different texture (the "front") on a different side (NSEW).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Thanks, ISBRH seems to be the good way. I successfully made a block using ISBRH and rotated the texture on the top. Now I just need to adapt the uvRotateTop to the metadata, I hope I'll succeed :)

 

About the furnace: like Draco18s said, the only thing this block does is putting the front texture at the right place. The top texture never rotates (you can verify on the pumpkin block which works exactly the same way, the stem drawn on the texture doesn't rotate).

 

EDIT: Done! Thanks for you help! If you want to check the sources, go ahead: https://github.com/KillerMapper/roadstuff

Note: I just set the git earlier, and I still have lot of test files in. I need to clean the mod. Check TestRotateBlock.class, which uses RenderAsphaltLines.class to see how I did the rotating texture.

 

Thanks for your help!

 

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.