mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 07:49:29 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@c0a3d51 Start update, apply API patches PaperMC/Paper@172c7dc Work PaperMC/Paper@ab9a3db More work PaperMC/Paper@c60e47f More more work PaperMC/Paper@bd55e32 More more more work PaperMC/Paper@5265287 More more more more work PaperMC/Paper@4601dc9 Some fixes, start updating CustomModelData API PaperMC/Paper@2331dad Even more work PaperMC/Paper@dc74c6f moonrise PaperMC/Paper@d7d2f88 Apply remaining patches, fix API PaperMC/Paper@f863bb7 Update generated classes PaperMC/Paper@71a4ef8 Set java launcher for api generate task PaperMC/Paper@b8aeecb Compilation fixes PaperMC/Paper@6c35392 Tests succeed (by removing one) PaperMC/Paper@b0603da Fix jd gson version, move back mc util diff PaperMC/Paper@e2dd1d5 Add back post_teleport chunk ticket PaperMC/Paper@7045b2a Update DataConverter PaperMC/Paper@65633e3 Update Moonrise
43 lines
2.0 KiB
Diff
43 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
|
Date: Thu, 3 Aug 2023 13:48:27 +0100
|
|
Subject: [PATCH] Add utility methods to EntitySlices
|
|
|
|
|
|
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
|
index 1fad004f07270e8a27a85557de6fcf5e693751db..39148fe540d616cdd4d63c4d1a02b422cab0f6eb 100644
|
|
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
|
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
|
@@ -297,6 +297,12 @@ public final class ChunkEntitySlices {
|
|
return true;
|
|
}
|
|
|
|
+ // Sakura start - add utility methods to entity slices
|
|
+ public Entity[] getSectionEntities(int sectionY) {
|
|
+ return this.allEntities.getSectionEntities(sectionY);
|
|
+ }
|
|
+ // Sakura end - add utility methods to entity slices
|
|
+
|
|
public void getHardCollidingEntities(final Entity except, final AABB box, final List<Entity> into, final Predicate<? super Entity> predicate) {
|
|
this.hardCollidingEntities.getEntities(except, box, into, predicate);
|
|
}
|
|
@@ -512,6 +518,18 @@ public final class ChunkEntitySlices {
|
|
}
|
|
}
|
|
|
|
+ // Sakura start - add utility methods to entity slices
|
|
+ public Entity[] getSectionEntities(int sectionY) {
|
|
+ BasicEntityList<Entity> list = this.entitiesBySection[sectionY - this.slices.minSection];
|
|
+
|
|
+ if (list != null) {
|
|
+ return list.storage;
|
|
+ }
|
|
+
|
|
+ return new Entity[0];
|
|
+ }
|
|
+ // Sakura end - add utility methods to entity slices
|
|
+
|
|
public void getEntities(final Entity except, final AABB box, final List<Entity> into, final Predicate<? super Entity> predicate) {
|
|
if (this.count == 0) {
|
|
return;
|