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 would like to know if it is possible to change a block's textures on each side from a tile entity. What I would like to do, if it's possible, is change the textures of the sides of some blocks around a tile entity when certain blocks are present. If that makes sense.

Now that I read that, it makes no sense. ;) I have a tile entity. It checks if certain blocks are around it, sort of like a multi-block structure. If those blocks are there, how would I change the textures of multi-texture blocks?

 

Why I want to do do this is if there is a certain structure built by the player I want it to be connected textures, to look more complete.

Use:

public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {}

 

and use block states to change the texture

Ok, thanks, I'll try that.

public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {}

 

Oh ya, and did I mention I'm in 1.7.10 and don't have BlockPos or IBlockState. :) I know what method you mean, I'll use the 1.7 equivalent.

 

Edit: Wait, in the 1.7 equivalent, there is only World, x, y, z, and Block. No equivalent to IBlockState. What do I do?

No need for what?

No need for what?

 

Here try this.

Don't use IBlockState, as there are no block states in 1.8 (I think)

Look at how wheat changes its textures, and make your block's texture change just like that, when a neighboring block changes

Lol, I just got carried away with coding (happens sometimes) and forgot to reply. ;) I figured it out. Crops change their metadata and change the icons accordingly. Thanks for the advice.

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.