Posted November 27, 20196 yr I am building a utility that will allow me to generate the code for my configs more easily, but I need to figure out how the Note Particle's color is generated as the particle will be a possible option in my configs. The code I have found in the NoteParticle.class (featured below) will only generate gray particles, even though there are numerous colors you can get. When doing the particle command only 1 value controls the color ranging from 0.0(green) up to 1.0(also green). Because of this I know a simple rgb to hex and hex to rgb coverter in my utility will not be enough without some other step that I cannot figure out. Anyone have any ideas on where to look or what is going on? private NoteParticle(World p_i51018_1_, double p_i51018_2_, double p_i51018_4_, double p_i51018_6_, double p_i51018_8_) { super(p_i51018_1_, p_i51018_2_, p_i51018_4_, p_i51018_6_, 0.0D, 0.0D, 0.0D); this.particleRed = Math.max(0.0F, MathHelper.sin(((float)p_i51018_8_ + 0.0F) * ((float)Math.PI * 2F)) * 0.65F + 0.35F); this.particleGreen = Math.max(0.0F, MathHelper.sin(((float)p_i51018_8_ + 0.33333334F) * ((float)Math.PI * 2F)) * 0.65F + 0.35F); this.particleBlue = Math.max(0.0F, MathHelper.sin(((float)p_i51018_8_ + 0.6666667F) * ((float)Math.PI * 2F)) * 0.65F + 0.35F); } (Not the full constructor, but the relevant code for what I have found) Edited November 27, 20196 yr by saxon564
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.