HexMod
HexMod copied to clipboard
Clean up OpErase implementation
This feels like a really scuffed way of checking if you can erase something, especially since "contains NULL" and "empty" are distinct states, so "can write NULL" doesn't necessarily imply "can make empty".
https://github.com/FallingColors/HexMod/blob/74bafe20156d68628e21175289f68aaf05707ee3/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt#L23-L25
hmm, I think "write null" (as in java null, not a NullIota()) is how the API currently implements erasing, so it makes sense that checking whether that's possible is how that currently works? but it would be very reasonable to consider "write null to erase" as not great practice