Cannons

Cannons

117k Downloads

Setting up multiple projectiles with the same loading item

Pvprod34 opened this issue ยท 2 comments

commented

I'm Trying to setup two different shots for two different cannons with the same loading item. Although it doesn't seem to work with how i've set it up.
https://pastebin.com/ffUsKzn1
The second variation has projectileName: cannonball2

I've added the individual names to the two different cannons but only one of them shoots a 'cannonball' aka projectile loaded with cobblestone. Is there any setting i've missed to accomplish this?

commented

The projectile name seems to be correct. However the cannon will always pick the first in the list of allowed projectiles when you have the same loading item. Therefore, you have to choose either cannonball1 or cannonball2 per cannon design.

Did you set the projectileName in "allowedProjectiles" in the first cannon design to "cannonball1" and in the second one to "cannonball2"

`allowedProjectiles:
#these are the list of projectiles a cannon can fire. The projectiles are taken from the config files in the projectiles folder.
#they do not have to be named after an in-game item and can be named anything.
#make sure the name matches the name of the config file of the projectile you want this cannon to be able to fire. the .yml part does not need to be included

  • cobblestone
  • diamond
  • canistershot
  • enderpearl
  • tnt
  • firework1`
commented

Ah thanks for that! I realised the issue was that the .yml wasn't allined with the projectile name and thus the allowed projectiles name. that threw it off!
One thing i also noticed is spawn fireworks doesnt seem to want to work on explosion? Is anything else required to get these to work?
spawnFireworks:
#if true fireworks will be spawned on projectile explosion
enabled: false
#if the firework flickers or not
flicker: false
#if the firework has a trail
trail: true
#effect type of the fireworks: BALL, BALL_LARGE, BURST, CREEPER, STAR,
type: BALL
#main colors (RGB in hex notation)
#if there are no color, than there will be no fireworks
colors:
#fade colors in RGB hex notation
fadeColors:
#white
- 'FFFFFF'