feat: ProxySpell - #1100
Conversation
…ell.java Co-authored-by: JasperLorelai <contact@jasperlorelai.eu>
…ell.java Co-authored-by: JasperLorelai <contact@jasperlorelai.eu>
…ell.java Co-authored-by: JasperLorelai <contact@jasperlorelai.eu>
…ell.java Co-authored-by: JasperLorelai <contact@jasperlorelai.eu>
…ell.java Co-authored-by: JasperLorelai <contact@jasperlorelai.eu>
d2d9528 to
d0c638e
Compare
|
I actually ended up removing the |
| } | ||
|
|
||
| @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) | ||
| public void onEntityDamage(EntityDamageByEntityEvent event) { |
There was a problem hiding this comment.
Should the proxy receive damage from events not dealt by another entity?
There was a problem hiding this comment.
Feel like it should be a config option
There was a problem hiding this comment.
Well, idk. The only purpose the damager has in this handler atm is that it's used for the spell effects. So imo, if a proxy receives any damage, it should be relayed, even if it wasn't caused by a third entity.
|
|
||
| event.setCancelled(true); | ||
| try { | ||
| proxyTarget.damage(event.getDamage(), event.getDamageSource()); |
There was a problem hiding this comment.
I'm not actually sure if the causing/direct entity should be swapped here as well.
There was a problem hiding this comment.
Your PR description says:
Allows the caster to designate an entity as a "proxy". Any spell / damage will be redirected to the caster treating that entity as if it were the caster themself.
If the ending bit is a typo, meant to be "target", then this can be left alone.
Otherwise, if you implied that the proxy should become the caster of these spells, the original caster forgotten, then the causing entity should be swapped, but the SpellTargetEvent is missing the caster swap too. Imo, the original caster/damager should remain.
…ell.java Co-authored-by: JasperLorelai <contact@jasperlorelai.eu>
Allows the caster to designate an entity as a "proxy". Any spell / damage will be redirected to the caster treating that entity as if it were the caster themself.