I am currently running
Issue Description
When creating a Schematic, we need a world.createArchetypeVolume(min, max, origin). The issue is that this method on DefaultedExtend calls volume.getIntersectingEntities with max added by one (here), which checks the bounds and always throws the PositionOutOfBoundsException. So, no matter which max position we use, we'll always end up with this error.
Stack trace? Don't really want to play guessing games with _where_ it's occurring.
I suspect it's a problem with confusiung block co-ordinates and real space co-ordinates, not directly what you said. That said, I did test that change extensively when I implemented it, so I'm curious to see what was missed.
Oh, forgot to include it in the ticket: https://pastebin.com/XUtN0vtf
Okay, it's an off by one error and is an easy fix. I will sort it out tonight (UK time).
To explain, I introduced this change in this commit. There seems to be some confusion across the codebase as to whether something is in real space co-ordinates, or block co-ordinates. When writing the implementation, it's clear that someone assumed that AABBs were block space co-ordinates, when actually, AABBs work in real-space. So, the adding by one is correct in that method (as explained by the comment above it!), as I was converting a block co-ordinate to two corners in real space co-ordinates.
That check method that throws that error assumes block space co-ordinates - which for that scenario is wrong. There needs to be an equivalent for real-space.
Why has this occurred? Turns out that this error will only occur when entities exist within the AABB in question. I suspect all my testing was done without entities in the AABB!
@Hiroku I know you were having this issue too - figured you'd like to be pinged to know why!
Thansk for clarifying! 馃憤
Most helpful comment
Okay, it's an off by one error and is an easy fix. I will sort it out tonight (UK time).
To explain, I introduced this change in this commit. There seems to be some confusion across the codebase as to whether something is in real space co-ordinates, or block co-ordinates. When writing the implementation, it's clear that someone assumed that AABBs were block space co-ordinates, when actually, AABBs work in real-space. So, the adding by one is correct in that method (as explained by the comment above it!), as I was converting a block co-ordinate to two corners in real space co-ordinates.
That check method that throws that error assumes block space co-ordinates - which for that scenario is wrong. There needs to be an equivalent for real-space.
Why has this occurred? Turns out that this error will only occur when entities exist within the AABB in question. I suspect all my testing was done without entities in the AABB!
@Hiroku I know you were having this issue too - figured you'd like to be pinged to know why!