9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-21 15:59:28 +00:00
Files
Gale/patches/server/0120-Initialize-line-of-sight-cache-with-low-capacity.patch
Dreeam a4ed88543a Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@681c013 Bundle spark (#11093)
PaperMC/Paper@5fee9c6 Move configuration option to a system property
PaperMC/Paper@aa3b356 Improve server startup logging (#11110)
PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark
PaperMC/Paper@7e91a2c Update the bundled spark version
2024-07-21 07:11:14 +08:00

26 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Wed, 30 Aug 2023 19:01:50 +0200
Subject: [PATCH] Initialize line of sight cache with low capacity
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
index ed440b9a84ac0e4619c075491515fa072d6aebec..57472cb54e9fd83e980e3c57f28d6e6643f422e8 100644
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
@@ -7,8 +7,10 @@ import net.minecraft.world.entity.Mob;
public class Sensing {
private final Mob mob;
- private final IntSet seen = new IntOpenHashSet();
- private final IntSet unseen = new IntOpenHashSet();
+ // Gale start - initialize line of sight cache with low capacity
+ private final IntSet seen = new IntOpenHashSet(2);
+ private final IntSet unseen = new IntOpenHashSet(2);
+ // Gale end - initialize line of sight cache with low capacity
public Sensing(Mob owner) {
this.mob = owner;