Posted January 21, 201312 yr So, I'm playing around with this newer thing to me, and I've managed to figure out three of the variables, but the one that requires a BufferedImage eludes me. How am I supposed to implement an image for that? Can anyone post an example of the constructor with the 4 variables? That way, I can get to understand it much better. EDIT: Also, am I supposed to put this in the java file for the block itself, or inside the main mod file?
January 21, 201312 yr Actually, tickCount is how slow you want it to rotate. That's the amount of ticks (1/20th of a second) between each rotation. So the fastest setting would be 1, while 20 would result in a rotation / second. Note that the texture width must be a multiple of 16, and the height must be a multiple of the width. Frames are stacked vertically, so the image should always be taller than it is wide. Did I help? Hitting 'Thank You' would be appreciated. Soon, the lost city will rise from the bottom of the ocean, and spread it's technology across Minecraft.
January 21, 201312 yr Author Thank you for the help so far, I'm getting it pretty well. One question, however, I'm still not entirely sure what to do with the BufferedImage. I've constructed most of the parameters, but it's asking me for a RenderEngine, and that's not something that I've looked into, so what am I supposed to be using for it? EDIT: Here is what I have so far pertaining to this particular subject. The only error I'm getting is from the RenderEngine thing. package eli.CiTS.client; import cpw.mods.fml.client.TextureFXManager; import net.minecraft.client.Minecraft; import net.minecraft.src.ModTextureAnimation; import net.minecraftforge.client.MinecraftForgeClient; import eli.CiTS.CommonProxy; public class ClientProxy extends CommonProxy { @Override public void registerRenderers() { MinecraftForgeClient.preloadTexture(ITEMS_PNG); MinecraftForgeClient.preloadTexture(BLOCK_PNG); ModTextureAnimation hCanim = new ModTextureAnimation(0, 1, "Minecraft/common/eli/CiTS/WeightAnim", TextureFXManager.instance().loadImageFromTexturePack(.registerRenderers(), CUBE_PNG), 2); hCanim.setup(); hCanim.bindImage(Minecraft.getMinecraft().renderEngine); TextureFXManager.instance().addAnimation(hCanim); } }
January 21, 201312 yr Author All right, the only error I'm getting now is with that method, LoadImageFromTexturePack. Any pointers there?
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.