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 know that when working with blocks I can use an mcmeta file to make the texture "Animate/Change"

 

Is there a way to make the same but when using Models?

 

I would need it to render with a different texture (png) every X seconds.

 

 

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

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

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.

Then you can use custom blockstate for that.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

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; }
		}

  • Author

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 ;)

 

 

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.