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

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?

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.

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

 

}

}

 

  • 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.

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.