diff --git a/.github/workflows/upstream-watch.yml b/.github/workflows/upstream-watch.yml index c96165a0..27265c0d 100644 --- a/.github/workflows/upstream-watch.yml +++ b/.github/workflows/upstream-watch.yml @@ -46,7 +46,7 @@ jobs: commit=$(gh api "repos/$REPO/commits/$BRANCH") sha=$(jq -r '.sha' <<<"$commit") short=${sha:0:7} - msg=$(jq -r '.commit.message' <<<"$commit" | head -1) + msg=$(jq -r '.commit.message | split("\n")[0]' <<<"$commit") titlemsg=$(printf '%s' "$msg" | cut -c1-60) author=$(jq -r '.commit.author.name' <<<"$commit") date=$(jq -r '.commit.author.date' <<<"$commit") @@ -79,7 +79,7 @@ jobs: del=$(jq -r '[.files[]?.deletions] | add // 0' <<<"$cmp") nfiles=$(jq -r '[.files[]?] | length' <<<"$cmp") stats="**$ncommits** commit(s) · **$nfiles** file(s) · **+$add / -$del**" - filelist=$(jq -r '.files[]? | "- `\(.status)` `\(.filename)` (+\(.additions)/-\(.deletions))"' <<<"$cmp" | head -30) + filelist=$(jq -r '[.files[]? | "- `\(.status)` `\(.filename)` (+\(.additions)/-\(.deletions))"] | .[:30] | join("\n")' <<<"$cmp") fi # Build the issue body diff --git a/leaf-server/src/main/java/dev/tr7zw/entityculling/CullTask.java b/leaf-server/src/main/java/dev/tr7zw/entityculling/CullTask.java index ddda0828..c502e0e4 100644 --- a/leaf-server/src/main/java/dev/tr7zw/entityculling/CullTask.java +++ b/leaf-server/src/main/java/dev/tr7zw/entityculling/CullTask.java @@ -3,6 +3,8 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.logisticscraft.occlusionculling.OcclusionCullingInstance; import com.logisticscraft.occlusionculling.util.Vec3d; +import ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel; +import ca.spottedleaf.moonrise.patches.chunk_system.level.entity.EntityLookup; import dev.tr7zw.entityculling.versionless.access.Cullable; import it.unimi.dsi.fastutil.ints.IntOpenHashSet; import it.unimi.dsi.fastutil.ints.IntSets; @@ -126,7 +128,8 @@ public synchronized void run() { } private void cullEntities(Vec3 cameraMC, Vec3d camera) { - for (Entity entity : this.checkTarget.level().getEntities().getAll()) { // This one's safe here; moonrise returns an array for us to iterate + EntityLookup entityLookup = ((ChunkSystemLevel) this.checkTarget.level()).moonrise$getEntityLookup(); + for (Entity entity : entityLookup.getAll()) { if (!(entity instanceof Cullable cullable) || entity == this.checkTarget) { continue; }