runescapejon / CrazyFeet-Sponge

Port of CrazyFeet to Sponge by me <3 hope you guys enjoy a particle plugin for sponge, great with EULA!
GNU General Public License v2.0
4 stars 8 forks source link

Change note colors. #11

Closed Cybermaxke closed 7 years ago

Cybermaxke commented 7 years ago

I noticed that you had issues with coloring notes in this plugin: https://github.com/runescapejon/CrazyFeet-Sponge/blob/master/src/main/java/me/runescapejon/CrazyFeet/Listeners/CrazyFeetListener.java#L41 It is true that you cannot change the color with the COLOR option, but you can use the NOTE option instead. Just use the NotePitch that matches the color that you want: https://minecraft.gamepedia.com/Note_Block

runescapejon commented 7 years ago

it's really sponge issue look here https://gyazo.com/269beb199cfce0f2e31fa5fbd7d3828c and as you see here https://jd.spongepowered.org/6.0.0/org/spongepowered/api/effect/particle/ParticleTypes.html there is no NotePitch for particletypes just NOTE nothing else

Cybermaxke commented 7 years ago

There is a NOTE ParticleType and a NOTE ParticleOption which requires a NotePitch: https://github.com/SpongePowered/SpongeAPI/blob/bleeding/src/main/java/org/spongepowered/api/effect/particle/ParticleOptions.java#L109

runescapejon commented 7 years ago

I'm not sure how do change it using NotePitch when sponge does not allow it to be the colors to be change

Cybermaxke commented 7 years ago

Here is an example: (This should give blue, I hope so)

ParticleEffect effect = ParticleEffect.builder().type(ParticleTypes.NOTE)
        .option(ParticleOptions.NOTE, NotePitches.A_SHARP2)
        .build();
runescapejon commented 7 years ago

ooooooh! thanks <3 I'll make improvement with your example thanks you very much

runescapejon commented 7 years ago

Thanks again :D