DerPavlov / Cannons

Fire block based Cannons in Minecraft
http://dev.bukkit.org/bukkit-plugins/cannons/
8 stars 35 forks source link

Some tags are missing from AREA_EFFECT_CLOUDS spawned by projectiles. #44

Open justaureus opened 3 years ago

justaureus commented 3 years ago

Hello! I'm attempting to spawn an area effect cloud where the projectile hits, but it seems amplifier and show particles aren't supported with cannons. (I could live without show particles, but amplifier is required for having potion effects)

Console "error"(?): image

My effect cloud:

    - 'AREA_EFFECT_CLOUD 1-1 {Particle:"entity_effect",Radius:5f,Duration:300,Color:16711680,Effects:[{Id:2b,Amplifier:3b,Duration:300,ShowParticles:0b},{Id:7b,Amplifier:1b,Duration:20,ShowParticles:0b},{Id:9b,Amplifier:2b,Duration:300,ShowParticles:0b},{Id:19b,Amplifier:2b,Duration:300,ShowParticles:0b}]}'

Having the ability to set potion effects through the Effects tag of Area Effect Clouds is very handy for setting per-potion effect amplifiers and duration, as well as utilizing effects that aren't in potion form.

DerPavlov commented 3 years ago

That is a little bit more complicated than I had expected. I think my parser will not be able to parse the nested effects, I need to read more about the options in the effects.

EDIT: do you have a tutorial or more examples?

justaureus commented 3 years ago

Hmm.. I'm not entirely sure about a tutorial but there is this very intuitive website for generating area effect clouds: https://mcstacker.net/

Navigate to the /summon page of the website (see image for location). image

From there you can generate an area effect cloud and see all of the different options, including Effects: image

wolfebersahd commented 3 years ago

McStacker is great for generating commandblock effects, but it doesn't quite work the same way internally within the API. Especially across multiple versions.

This is a list of things the API can get. https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/AreaEffectCloud.html

DerPavlov commented 3 years ago

I will add the effects to the entities and a the support for potion effects

DerPavlov commented 3 years ago

Pushed a new version with support for effects to github