TeamWizardry / LibrarianLib

A library for the TeamWizardry mods
GNU Lesser General Public License v3.0
26 stars 21 forks source link

Make RayWorldCollider more general-purpose #141

Closed thecodewarrior closed 4 years ago

thecodewarrior commented 4 years ago

Currently, RayWorldCollider in Etcetera has a number of optimizations that are specifically tuned for the "close enough" approach required by Glitter. However, these optimizations make it almost unusable for other purposes. We need to move the current "close enough" implementation into Glitter and replace the version in Etcetera with a more precise version.

One decision that needs to be made before implementing the precise version is how much caching should be done. Out of anything, the VoxelShape -> List<AxisAlignedBB> cache is the most likely to stay, though I'll have to check whether things like EnderIO pipes are using "mutable" VoxelShapes (in that the returned AABBs can vary).