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

Hi, guys

I follow this tutorial:

[flash=200,200]

It's working fine!

But i want to use this effect in onItemUse event or atfer i throw my custom item. How to do it?

  • Author

Explain in text or images what you want.

ok, i want to spawn custom direction moving colored particles by onItemUse or when i throwing my item.

if i use code

    public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
    {
    	for (int i=0; i<4; i++){
	float mx = 0;
	float my = 1;
	float mz = 0;

	Minecraft.getMinecraft().effectRenderer.addEffect(new FX1(world,x,y+1,z,mx,my,mz));

    	}
        return true;
    }

i don't see any particles and game  crashes after 4-10 uses.

  • Author

Like any other method. MyMod.proxy.whatever()

Seriously, this is basic java.

I mean, if i put this code in my proxy class, i will get many compiller errors. E.g. "world" will be undeclarated variable, e.t.c. What to do?

 

edit:

Now i comment this line in my FX1.class:

	//this.particleIcon = ItemFramework.sparkIcon;

and all working fine without editing my ClientProxy class. Now i can see spawned particles. But they are has square shape. How to bind custom texture for particle?

  • Author

For custom textures you have to first draw the tessellator, then bind your texture, then draw your stuff, then bind the vanilla texture again and start drawing with the tessellator again.

i need tutorial.

 

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.