Jump to content

[1.7.10] [Solved] Changing a block's texture?


Recommended Posts

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.

Posted

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.

Posted

Use:

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

 

and use block states to change the texture

Posted

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?

Posted

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

Posted

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

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