OtherDrops

226k Downloads

Projectiles accepting data values

charlie1990 opened this issue · 5 comments

commented

Allow the use of data values in PROJECTILE_ tools. This would allow use to create unique effects and drops for arrows, snowballs, eggs, enderpearls, etc by using different data values in the tool parameter. If this ends up not being possible(and you figure out a way to add lore data in OtherDrops) many plugins that add new projectile types do so by identifying the projectile by its lore text instead of the ID/DV.

Example:
ANY_CREATURE:
- tool: PROJECTILE_SNOW_BALL@5
potioneffect.victim: SLOW@200@3
- tool: PROJECTILE_SNOW_BALL@10
potioneffect.victim: CONFUSION@200@1

commented

I suspect this is impossible. I believe both lore and data value is lost when the projectile leaves your hand (or bow). There may be a workaround involving checking the projectile-shooter and seeing what's in their hand, but it won't work for bow+arrows (because it's the bow, not the arrows, that are in the hand) and it would likely also fail if you threw the last projectile in a stack.

commented

Actually did a bit more testing and figured out this is already possible in a different way with OtherDrops at least in the case of eggs and snowballs(don't know why I didn't try this before).

ANY_CREATURE:
    - action: HIT
      tool: PROJECTILE_SNOW_BALL
      lorename: Iceball
      damage.victim: 6
    - action: HIT
      tool: PROJECTILE_SNOW_BALL
      damage.victim: 2
commented

Hmm... except the second section will run for both those with and without
the lorename. I might look into making lorename take a list and allow
exceptions (eg. lorename: [-Iceball])

On Sun, Mar 3, 2013 at 4:33 PM, charlie1990 [email protected]:

Actually did a bit more testing and figured out this is already possible
in a different way with OtherDrops(don't know why I didn't try this before).

ANY_CREATURE:
- action: HIT
tool: PROJECTILE_SNOW_BALL
lorename: Iceball
damage.victim: 6
- action: HIT
tool: PROJECTILE_SNOW_BALL
damage.victim: 2


Reply to this email directly or view it on GitHubhttps://github.com//issues/140#issuecomment-14342881
.

commented

Are you positive about that? When I tested it the normal snowball did 2 damage and the iceball did 6(tested it on a player)

commented

Also, does it work if you have a single iceball (rather than a stack)?