Posted May 25, 201411 yr 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?
May 25, 201411 yr 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.
May 25, 201411 yr Author I don't know... the code you posted maybe?!? and how to call it when i use an item?
May 26, 201411 yr 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?
May 26, 201411 yr 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.