Guest Posted April 21, 2019 Share Posted April 21, 2019 Hello, I was wondering if there was a way to spawn particles with modified colors. Specifically, I'd like to spawn EnumParticleTypes.DRIP_WATER but orange. (It's supposed to be like tree sap dripping from the tree.) Does anyone know how to accomplish this? Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted April 22, 2019 Share Posted April 22, 2019 You would either need to create your own particle class or use WorldRenderer#addParticleUnchecked(it's private so you need reflection) that gets you the reference to the added particle so you can manually change it's colour fields. That is assuming 1.13.2. In 1.12 the method you need is RenderGlobal#spawnParticle0. You could also use ParticleManager#spawnEffectParticle(1.12) or ParticleManager#addParticle(1.13) but you would need to replicate some checks WorldRenderer does. You could also iterate the particle list(it is also private), find your particle there and change it's colour fields. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 22, 2019 Share Posted April 22, 2019 11 hours ago, V0idWa1k3r said: You could also iterate the particle list(it is also private), find your particle there and change it's colour fields. How would I go about doing that? I'm in 1.12, so would I end up using RenderGlobal#spawnParticle() or something else? Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted April 23, 2019 Share Posted April 23, 2019 14 hours ago, Wolftopia said: How would I go about doing that? I just told you. Use reflection to access the list, iterate it, find your particle in it(likely based on it's position) and change the colour fields. I wouldn't recommend this way though. 14 hours ago, Wolftopia said: would I end up using RenderGlobal#spawnParticle() Sure, you can do that, that's one of the ways I've suggested. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.