Posted September 16, 201510 yr 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.
September 16, 201510 yr 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.
September 17, 201510 yr 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.
September 17, 201510 yr 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.
September 17, 201510 yr 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; } }
September 17, 201510 yr 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.