11package cam72cam .mod .mixin .feat .large_entity_collision ;
22
33import cam72cam .mod .entity .ModdedEntity ;
4- import cam72cam .mod .math .Vec3d ;
54import cam72cam .mod .world .ChunkPos ;
6- import com .google .common .base .Predicate ;
75import net .minecraft .command .IEntitySelector ;
86import net .minecraft .entity .Entity ;
97import net .minecraft .util .AxisAlignedBB ;
108import net .minecraft .world .World ;
11- import net .minecraft .world .chunk .Chunk ;
129import org .spongepowered .asm .mixin .Mixin ;
1310import org .spongepowered .asm .mixin .Shadow ;
1411import org .spongepowered .asm .mixin .injection .At ;
@@ -33,8 +30,7 @@ public void injectEntitySearch0(Entity entityIn, AxisAlignedBB aabb, IEntitySele
3330 List <Entity > result = cir .getReturnValue ();
3431 cam72cam .mod .world .World world = cam72cam .mod .world .World .get ((World ) (Object ) this );
3532 //We don't handle Y coordinate in 1.16-
36- Set <Long > collection = world .tracker .queryPotentialPackedChunkPos (
37- ChunkPos .asLongExcludeY (new Vec3d ((aabb .minX + aabb .maxX ) / 2 , (aabb .minY + aabb .maxY ) / 2 , (aabb .minZ + aabb .maxZ ) / 2 )));
33+ Set <Long > collection = world .tracker .queryPotentialPackedChunkPos (ChunkPos .asLongExcludeY (aabb ));
3834 if (!collection .isEmpty ()) {
3935 for (long packed : collection ) {
4036 int x = ChunkPos .x (packed );
@@ -64,8 +60,7 @@ public void injectEntitySearch1(Class<? extends Entity> clazz, AxisAlignedBB aab
6460 List <Entity > result = cir .getReturnValue ();
6561 cam72cam .mod .world .World world = cam72cam .mod .world .World .get ((World ) (Object ) this );
6662 //We don't handle Y coordinate in 1.16-
67- Set <Long > collection = world .tracker .queryPotentialPackedChunkPos (
68- ChunkPos .asLongExcludeY (new Vec3d ((aabb .minX + aabb .maxX ) / 2 , (aabb .minY + aabb .maxY ) / 2 , (aabb .minZ + aabb .maxZ ) / 2 )));
63+ Set <Long > collection = world .tracker .queryPotentialPackedChunkPos (ChunkPos .asLongExcludeY (aabb ));
6964 if (!collection .isEmpty ()) {
7065 for (long packed : collection ) {
7166 int x = ChunkPos .x (packed );
0 commit comments