Posted March 15, 201312 yr Hi guys, Anyone knows if it is still possible to use "calculated" textures for items in 1.5? Like you could in 1.4 by extending TextureFX and filling imageData[] manually? I saw that Mojang has switched to pre-calculated sprites for the clock and compass textures. It would be great if it was still possible... K. http://www.millenaire.org/img/dynamicsig.png[/img]
March 15, 201312 yr Its possible, but the downsides arr enormks, and 99% of the time the modder does it wrong causing massive performance issues on the clients and pains cor texture pack makers, so i advise you think of following mojangs lead and making animation files instead of runtime generation. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
March 15, 201312 yr Author Well, mine worked fine in MC 1.4, with no significant CPU issue But switching to pre-generated sprites is also possible and if that's the recommended way it works for me too. However, how do I declare my animation now? There are no addAnimation methods anymore. (I can't just use a text file - I need custom logic to select the proper frame to use, like the compass and the watch do. For instance one my texture changes depending on the proximity of mobs). http://www.millenaire.org/img/dynamicsig.png[/img]
March 16, 201312 yr https://github.com/MinecraftForge/MinecraftForge/blob/master/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch#L66 In your compass's texture register callback, create your TextureStitched and register it using setTextureEntry See TextureClock/TextureCompass for examples on how to pragmatically choose the animation frame. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
March 16, 201312 yr Author Thanks, I hadn't seen that setTextureEntity. I got it working. Just one thing, I'm expected to get the TextureMap by doing a cast on IconRegister, right? Just asking if there isn't an other way because I really don't like casts http://www.millenaire.org/img/dynamicsig.png[/img]
March 16, 201312 yr Sadly no, you'd have tio make sure its a safe cast and cast it. However the only thing that implements IconRegister is TextureMap so you should be good. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
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.