Skip to content

Commit

Permalink
Remove DimensionId from getIntersecting calls, update vscore
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePlasticPotato committed Jun 30, 2024
1 parent 2e6723d commit c06ad13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.valkyrienskies.core.api.ships.properties.ShipTransform;
import org.valkyrienskies.mod.client.IVSCamera;
import org.valkyrienskies.mod.common.world.RaycastUtilsKt;
import org.joml.Vector3f;

@Mixin(Camera.class)
public abstract class MixinCamera implements IVSCamera {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.util.List;
import java.util.Set;
import java.util.function.Supplier;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ChunkMap;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import org.valkyrienskies.core.api.ships.ServerShip
import org.valkyrienskies.core.api.ships.Ship
import org.valkyrienskies.core.api.util.functions.DoubleTernaryConsumer
import org.valkyrienskies.core.api.world.LevelYRange
import org.valkyrienskies.core.api.world.properties.DimensionId
import org.valkyrienskies.core.apigame.world.IPlayer
import org.valkyrienskies.core.apigame.world.ServerShipWorldCore
import org.valkyrienskies.core.apigame.world.ShipWorldCore
import org.valkyrienskies.core.apigame.world.chunks.TerrainUpdate
import org.valkyrienskies.core.apigame.world.properties.DimensionId
import org.valkyrienskies.core.game.ships.ShipObjectServer
import org.valkyrienskies.core.impl.hooks.VSEvents.TickEndEvent
import org.valkyrienskies.core.util.expand
Expand Down Expand Up @@ -212,7 +212,7 @@ inline fun Level.transformToNearbyShipsAndWorld(
cb(posInWorld.x(), posInWorld.y(), posInWorld.z())
}

for (nearbyShip in shipObjectWorld.allShips.getIntersecting(aabb, dimensionId)) {
for (nearbyShip in shipObjectWorld.allShips.getIntersecting(aabb)) {
if (nearbyShip == currentShip) continue
val posInShip = nearbyShip.worldToShip.transformPosition(posInWorld, temp0)
cb(posInShip.x(), posInShip.y(), posInShip.z())
Expand Down Expand Up @@ -392,7 +392,7 @@ fun Level?.getWorldCoordinates(blockPos: BlockPos, pos: Vector3d): Vector3d {
}

fun Level.getShipsIntersecting(aabb: AABB): Iterable<Ship> = getShipsIntersecting(aabb.toJOML())
fun Level.getShipsIntersecting(aabb: AABBdc): Iterable<Ship> = allShips.getIntersecting(aabb, dimensionId)
fun Level.getShipsIntersecting(aabb: AABBdc): Iterable<Ship> = allShips.getIntersecting(aabb)

fun Level?.transformAabbToWorld(aabb: AABB): AABB = transformAabbToWorld(aabb.toJOML()).toMinecraft()
fun Level?.transformAabbToWorld(aabb: AABBd) = this?.transformAabbToWorld(aabb, aabb) ?: aabb
Expand Down

0 comments on commit c06ad13

Please sign in to comment.