Jump to content

[1.7.10] Custom Model to render with different texture [Solved]


American2050

Recommended Posts

If you do not use metadata or TileEntity, every block would have same texture. Is that okay?

 

Well I do have a TileEntity for my block right now yes. I guess I wont need metadata, as the idea is to have all the blocks changing, I dont won't it to change if it X block, just have all the blocks changing the texture every X time.

Link to comment
Share on other sites

Ok, I got it working, but from the Render itself and not from the TileEntity, so the block also changes its texture while on inventory.

 

Is it ok to do it this way, or it's a bad idea?

 

			if (counter <=500)
		{
			this.bindTexture(texture01);
			counter++;
		}

		else if (counter >=501 && counter <=1000)
		{
			this.bindTexture(texture02);
			counter++;
		}

		else
		{
			this.bindTexture(texture03);
			counter++;

			if(counter==1500){ counter=0; }
		}

Link to comment
Share on other sites

Actually, no that's not fine. Since it will change texture faster the more TileEntities / instances of your Block are around.

You need to make the counter a static field and increment it from ClientTickEvent (check event.phase, too, otherwise you run twice per tick).

 

Ohh so you mean, the more blocks of this I place, the counter will go up faster for all of them? I see  :-\

 

What I have to do is on my EventHandler have that counter going up on the Render?

 

Gonna give that a try, thanks ;)

 

 

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.