mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2026-01-06 15:41:56 +00:00
[ci skip] cleanup work finished
This commit is contained in:
@@ -3,6 +3,8 @@ From: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
Date: Thu, 22 Dec 2022 15:47:39 +0100
|
||||
Subject: [PATCH] Server thread priority environment variable
|
||||
|
||||
Removed since Gale 1.21.4, this patch is the part of Gale 1.19 threading system
|
||||
|
||||
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
@@ -7,7 +7,7 @@ License: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
This patch is based on the following mixin:
|
||||
"net/caffeinemc/mods/lithium/mixin/collections/entity_by_type/TypeFilterableListMixin.java"
|
||||
"net/caffeinemc/mods/lithium/mixin/collections/entity_by_type/ClassInstanceMultiMapMixin.java"
|
||||
By: 2No2Name <2No2Name@web.de>
|
||||
As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
@@ -6,14 +6,19 @@ Subject: [PATCH] Avoid Class#isAssignableFrom call in ClassInstanceMultiMap
|
||||
License: MIT (https://opensource.org/licenses/MIT)
|
||||
Gale - https://galemc.org
|
||||
|
||||
This patch is based on the following mixin:
|
||||
This patch is based on the following mixins:
|
||||
"com/ishland/vmp/mixins/general/collections/MixinTypeFilterableList.java"
|
||||
By: ishland <ishlandmc@yeah.net>
|
||||
As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
"net/caffeinemc/mods/lithium/mixin/collections/entity_filtering/ClassInstanceMultiMapMixin.java"
|
||||
By: Angeline <jellysquid3@users.noreply.github.com>
|
||||
As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/util/ClassInstanceMultiMap.java b/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
index 4cd1b8ce60f7befca63a5b6396c0781ae3583dcd..c7420c599aea9d79927419e881aaca8aae11461b 100644
|
||||
index 4cd1b8ce60f7befca63a5b6396c0781ae3583dcd..c79aaf21566fe84fd45c8666230c6c5f4fe1db27 100644
|
||||
--- a/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
+++ b/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
@@ -56,18 +56,41 @@ public class ClassInstanceMultiMap<T> extends AbstractCollection<T> {
|
||||
@@ -26,7 +31,7 @@ index 4cd1b8ce60f7befca63a5b6396c0781ae3583dcd..c7420c599aea9d79927419e881aaca8a
|
||||
- List<? extends T> list = this.byClass
|
||||
- .computeIfAbsent(type, clazz -> this.allInstances.stream().filter(clazz::isInstance).collect(Util.toMutableList()));
|
||||
- return (Collection<S>)Collections.unmodifiableCollection(list);
|
||||
+ // Gale start - VMP - avoid Class#isAssignableFrom call in ClassInstanceMultiMap
|
||||
+ // Gale start - Lithium/VMP - avoid Class#isAssignableFrom call in ClassInstanceMultiMap
|
||||
+ /*
|
||||
+ Only perform the slow Class#isAssignableFrom(Class) if a list doesn't exist for the type, otherwise
|
||||
+ we can assume it's already valid. The slow-path code is moved to a separate method to help the JVM inline this.
|
||||
@@ -55,7 +60,7 @@ index 4cd1b8ce60f7befca63a5b6396c0781ae3583dcd..c7420c599aea9d79927419e881aaca8a
|
||||
+ return ts;
|
||||
+ }
|
||||
+ );
|
||||
+ // Gale end - VMP - avoid Class#isAssignableFrom call in ClassInstanceMultiMap
|
||||
+ // Gale end - Lithium/VMP - avoid Class#isAssignableFrom call in ClassInstanceMultiMap
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,7 +9,7 @@ Gale - https://galemc.org
|
||||
This patch is based on the following mixins and classes:
|
||||
* "net/caffeinemc/mods/lithium/common/world/chunk/CompactingPackedIntegerArray.java"
|
||||
* "net/caffeinemc/mods/lithium/common/world/chunk/LithiumHashPalette.java"
|
||||
* "net/caffeinemc/mods/lithium/mixin/chunk/serialization/PackedIntegerArrayMixin.java"
|
||||
* "net/caffeinemc/mods/lithium/mixin/chunk/serialization/SimpleBitStorageMixin.java"
|
||||
* "net/caffeinemc/mods/lithium/mixin/chunk/serialization/PalettedContainerMixin.java"
|
||||
By: Angeline <jellysquid3@users.noreply.github.com>
|
||||
As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
|
||||
@@ -183,7 +183,7 @@ index fb11a2eea540d55e50eab59f9857ca5d99f556f8..dcc1a3f8b611c9f103b848db90b077b9
|
||||
|
||||
private double sampleWithDerivative(int gridX, int gridY, int gridZ, double deltaX, double deltaY, double deltaZ, double[] noiseValues) {
|
||||
diff --git a/net/minecraft/world/level/levelgen/synth/PerlinNoise.java b/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||
index da3c26fbad32d75d71f7e59c8c3341316a754756..2c28bb2fed04542a2ee126fe0c1c1f0253a3e2eb 100644
|
||||
index da3c26fbad32d75d71f7e59c8c3341316a754756..797368070540d78981cfeef82f9820ae6ef4b676 100644
|
||||
--- a/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||
+++ b/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||
@@ -26,6 +26,10 @@ public class PerlinNoise {
|
||||
@@ -237,3 +237,12 @@ index da3c26fbad32d75d71f7e59c8c3341316a754756..2c28bb2fed04542a2ee126fe0c1c1f02
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -187,7 +215,7 @@ public class PerlinNoise {
|
||||
}
|
||||
|
||||
public static double wrap(double value) {
|
||||
- return value - Mth.lfloor(value / 3.3554432E7 + 0.5) * 3.3554432E7;
|
||||
+ return value - Math.floor(value / 3.3554432E7 + 0.5) * 3.3554432E7; // Gale - C2ME - optimize noise generation
|
||||
}
|
||||
|
||||
protected int firstOctave() {
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 5c8d76b80c6cefd87088282e59f5f0f72a4f1611..0e298479c91a2789b3d808d512ec5210dabcbb06 100644
|
||||
index 5c8d76b80c6cefd87088282e59f5f0f72a4f1611..7a18b11782b2524280fddf20e6b1cabdddf07c49 100644
|
||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -550,9 +550,15 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -50,7 +50,13 @@ index 5c8d76b80c6cefd87088282e59f5f0f72a4f1611..0e298479c91a2789b3d808d512ec5210
|
||||
// Paper start - PlayerNaturallySpawnCreaturesEvent
|
||||
for (ServerPlayer entityPlayer : this.level.players()) {
|
||||
int chunkRange = Math.min(level.spigotConfig.mobSpawnRange, entityPlayer.getBukkitEntity().getViewDistance());
|
||||
@@ -609,6 +619,20 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -604,11 +614,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
}
|
||||
|
||||
- if (_boolean) {
|
||||
+ if (flagAndHasNaturalSpawn) { // Gale - MultiPaper - skip unnecessary mob spawning computations
|
||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user