mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +00:00
Avoid MobCategory allocation in chunk access (#517)
This commit is contained in:
@@ -163,14 +163,14 @@ index 102d88fc2989f80a39826e50ee706d853bfb2c5e..838146e997a2033c3d2a96602a252178
|
||||
|
||||
private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel level, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double distance) {
|
||||
diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index 686c031ec73acc80683aaa39a78fe9221f0215a6..7fc5e56586f2fe8ea1a7437b42da893383878880 100644
|
||||
index 686c031ec73acc80683aaa39a78fe9221f0215a6..30e01669f46ea31d580a0f526d7799f3ce10b326 100644
|
||||
--- a/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -92,6 +92,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
|
||||
private boolean slimeChunk;
|
||||
private boolean hasComputedSlimeChunk;
|
||||
// Leaf end - Matter - Secure Seed
|
||||
+ public final long[] failedSpawnAttempts = new long[net.minecraft.world.entity.MobCategory.values().length]; // Paper PR - throttle failed spawn attempts
|
||||
+ public final long[] failedSpawnAttempts = new long[net.minecraft.server.level.ServerPlayer.MOBCATEGORY_TOTAL_ENUMS]; // Paper PR - throttle failed spawn attempts
|
||||
|
||||
// Paper start - rewrite chunk system
|
||||
private volatile ca.spottedleaf.moonrise.patches.starlight.light.SWMRNibbleArray[] blockNibbles;
|
||||
|
||||
Reference in New Issue
Block a user