Posted March 3, 201510 yr Hello, I've recently started modding again, and I'm having an issue: I need to create a custom particle with a texture that I can specify via the constructor. So far, I've achieved some different results: I had particles working with floating etc. however only textures with one color were displayed correctly. A texure with a gradient (black to red) was displayed as half-transparent dark gray and a texture with transparency did not display at all. I then looked at how the footstep particle worked and adjusted my code, and voila, all particles were displayed; however only the one with only a single color was displayed without transparency. The one with transpaHello, I've recently started modding again, and I'm having an issue: I need to create a custom particle with a texture that I can specify via the constructor. So far, I've achieved some different results:I had particles working with floating etc. however only textures with one color were displayed correctly. A texure with a gradient (black to red) was displayed as half-transparent dark gray and a texture with transparency did not display at all. I then looked at how the footstep particle worked and adjusted my code, and voila, all particles were displayed; however only the one with only a single color was displayed without transparency. The one with transparency was displayed, but it also was half-transparent (it is not in the original texture). Additionally, the particles displayed like the footstep particle and were flat (they didn't face the player), which was probably a result of modelling my particle after the footstep one. I also have made some research, but most tutorials are outdated (<1.5) or only help with creating a particle with the shape of an existing one. I'd appreciate any help. Regards -Quicksteverency was displayed, but it also was half-transparent (it is not in the original texture). Additionally, the particles displayed like the footstep particle and were flat (they didn't face the player), which was probably a result of modelling my particle after the footstep one. I also have made some research, but the tutorials I found were outdated (<1.5) or only helped with creating a particle with the shape of an existing one (by setting the RGB values). I'd appreciate any help. Regards -Quicksteve
March 31, 201510 yr Since it's been so long without any replies, anything may be useful, so, I don't know if it changed in 1.8, but particle textures are masks, white is fully visible, black is fully transparent, and you apply color via the RGB values in the EntityFX derived class. I don't know about the other stuff though, in 1.7.10 you could just put a ResourceLocation in the constructor arguments. Maybe this will help? 1.7.10 EntityFX
March 31, 201510 yr Since it's been so long without any replies, anything may be useful, so, I don't know if it changed in 1.8. It didn't change much in 1.8. Some methods of Tessellator is moved to WorldRenderer. And GL11.blabla is replaced by GLStateManager.blabla. getFXLayer is the key of custom particles. In order to use custom textures, it should return 3. GLStateManager.enableAlpha makes textures transparent when rendered. Author of Tao Land Mod. http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img] Also, author of RenderTo ---- I'm not an English native speaker. I just try my best.
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.