Ensure we load chunks for Entity getCubes
Was some other code paths missing the set for loading chunks Fixes #3582 Fixes #3368 Probably helps with "falling through world" issues too.
This commit is contained in:
@@ -32,17 +32,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@@ -0,0 +0,0 @@ public interface ICollisionAccess extends IBlockAccess {
|
||||
}
|
||||
|
||||
default boolean getCubes(Entity entity, AxisAlignedBB axisalignedbb) {
|
||||
- return this.a(entity, axisalignedbb, Collections.emptySet());
|
||||
+ // Paper start - load chunks for getCubes
|
||||
+ entity.collisionLoadChunks = true;
|
||||
+ boolean result = this.a(entity, axisalignedbb, Collections.emptySet());
|
||||
+ entity.collisionLoadChunks = false;
|
||||
+ return result;
|
||||
+ // Paper end
|
||||
default boolean a(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set<Entity> set) {
|
||||
+ try { if (entity != null) entity.collisionLoadChunks = true; // Paper
|
||||
return this.c(entity, axisalignedbb, set).allMatch(VoxelShape::isEmpty);
|
||||
+ } finally { if (entity != null) entity.collisionLoadChunks = false; } // Paper
|
||||
}
|
||||
|
||||
default boolean a(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set<Entity> set) {
|
||||
default Stream<VoxelShape> b(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set<Entity> set) {
|
||||
@@ -0,0 +0,0 @@ public interface ICollisionAccess extends IBlockAccess {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user