The correct logic to implement NOT_SAME with Shapes#block()
is to test whether any shape data exists outside of [0.0, 1.0]
and to test whether the shape is completely filled from 0.0 to 1.0
on all axis. This can be implemented by checking whether the
bounds represent the full block and whether everything within
the bounds is filled.
The mixin targetted the getSourceContainer invocation, which failed
when the method was overwritten. Move the optimisations to use
one redirect and one inject, which don't appear to affect the
performance.
The implementation of FlatBitsetUtil#clearRange was
incorrect, as it did not properly clear long values
inbetween the range and the bitmasks for keeping the first
and last bits were off by one.
The implementation of forAllBoxes did not properly account
for multiple ranges of bits to be set on the Z direction
for a given X and Y, as it would only use the first range.
This patch optimises property updating optimisations for StateHolder
operations.
98ae59d859
Additionally, implement some basic optimisations to some BlockPos
operations.
9c4490bda4
This allows us to assume that the getChunkForCollisions
method routes to getChunk(x, z, FULL, false) which allows
us to avoid the indirection caused by different implementations
of that method on different implementations of CollisionGetter.
Ghasts teleporting can perform many voxelshape operations.
We can reduce the number of voxelshape operations and use
more efficient ones at the same time.
Need to add a hook to the section read function that only
the client calls to actually count, as the client does not
invoke recalcBlockCounts on its own.
Can't be bothered to document the other changes in this commit.