Jump to content

Recommended Posts

Posted

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.

Posted

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?

Posted

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

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