Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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

 

}

}

 

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.