Blood Magic

Blood Magic

90M Downloads

AreaDescriptor flawed logic

keraldi opened this issue ยท 1 comments

commented

Probably rewrite to inclusive (to make RitualReader/Ritual Tinkerer area setting sane to use).

Investigate broken constructors; everything that does not use the AreaDescriptor.Rectangle(BlockPos minOffset, int size) constructor doesn't work properly, BlockPos minOffset, BlockPos maxOffset constructor only goes into +x+z coords.

Rewrite Rituals to use the aformentioned minOffset + size constructor only as a temporary measure.

Fix Rituals having the wrong AreaDescriptors set.

commented

Another example of the current implementation being irritating to use is that (example) setMaximumVolumeAndDistanceOfRange(WATER_RANGE, 9, 3, 3); has an inclusive volume (9), which means up to 9 blocks of volume could be selected, however the distances of the AreaDescriptor (3, 3) are not inclusive, which means that the maximum selectable area is 2x2 (either square or cube).