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

I have a wall that I've made and I want the texture on top to rotate base on the direction the wall is facing. I also want to change the texture if the wall is a post rather than a connector. How would I do this?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

You will need a custom block renderer (using ISimpleBlockRenderingHandler).

Then before you draw your Block (possibly using renderBlockWall in the RenderBlocks instance you get) you set uvRotateTop in that same RenderBlocks to a value 0-3 to rotate the top texture. Set it to 0 again afterwards.

Do you know a tutorial? If not where do I register the renderer and what vanilla class could I reference?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

I don't know of a tutorial, but all your renderWorldBlock method needs to do is set the rotation and then call the original renderBlockWall method.

You register your ISBRH with FMLs RenderingRegistry class.

 

OK, I'm not that familiar with ISBRH so how do I detect what direction the block is facing? And how would I rotate the texture after that?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

OK, I'm not that familiar with ISBRH so how do I detect what direction the block is facing? And how would I rotate the texture after that?

 

world#getBlockMetadata?

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

Well the wall I have already has other walls with metadata. And the world param isn't actually world. It can't detect that stuff.

OK, I'm not that familiar with ISBRH so how do I detect what direction the block is facing? And how would I rotate the texture after that?

 

world#getBlockMetadata?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

IBlockAccess still has getBlock and getBlockMetadata.

 

Point is:

If you want to change the rotation to a specific direction, you're going to need to figure out what defines that specific direction yourself.  No one else can say "oh just do X" because you're the one who wants something specific based on parameters only you know.

 

If its based on which direction the player was facing when they placed it down you're either going to have to save it in the metadata or use a TileEntity.  There are no ifs, ands, or buts about it.  The game isn't magic and can't interpret what you say into what you mean unless you are clear and unambiguous.

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

IBlockAccess still has getBlock and getBlockMetadata.

 

Point is:

If you want to change the rotation to a specific direction, you're going to need to figure out what defines that specific direction yourself.  No one else can say "oh just do X" because you're the one who wants something specific based on parameters only you know.

 

If its based on which direction the player was facing when they placed it down you're either going to have to save it in the metadata or use a TileEntity.  There are no ifs, ands, or buts about it.  The game isn't magic and can't interpret what you say into what you mean unless you are clear and unambiguous.

I don't want it to be determined by the way the player was facing, I want the way the wall is connected to adjacent walls to determine the rotation of the texture.

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Then you're going to need to know if there's a wall at XPos, ZPos, XNeg, or ZNeg.  world#getBlock

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

Then how do I re-set the the texture of a block after i check that?

 

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

You will need a custom block renderer (using ISimpleBlockRenderingHandler).

Then before you draw your Block (possibly using renderBlockWall in the RenderBlocks instance you get) you set uvRotateTop in that same RenderBlocks to a value 0-3 to rotate the top texture. Set it to 0 again afterwards.

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

No I want to change the texture when I check it.

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

This is really pointless. Nothing works and I'm not getting anywhere

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

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.