Hex Casting

Hex Casting

6M Downloads

Environment specific mishaps + make sure caster api is Good and Safe

SamsTheNerd opened this issue ยท 2 comments

commented

Prompted by a suggestion from walksanator to move gloop's environment specific mishap into base hex. I haven't looked at the relevant 1.20 code yet so idk if there's something already for it or what, but having a standard mishap to say "no you need to cast this from something else" would be good. Especially making a distinction between wisps and other packaged hexes. Again, need to look at 1.20 code changes again to see how much of this is covered by other stuff already.

Other part is making sure spells (and addon spells) have an easy way to get the caster if it exists, ideally without just null checking, since it's very easy to miss those especially in porting when you made assumptions in the older code that it wouldn't be null.

Some of this may already be covered by the rework, this issue is more of a "let's check on that" than a "these changes need to happen"

commented

When you say "get the caster if it exists without null checking", do you mean something like an Optional<Player>?

commented

personally I find null-checks easier then optional checks in kotlin