mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-19 14:59:29 +00:00
Updated Upstream (Paper)
This commit is contained in:
@@ -2,7 +2,7 @@ group=org.galemc.gale
|
||||
version=1.20.1-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.20.1
|
||||
paperRef=3716832282a136dbbd29ab04d1a37ae88ac3726e
|
||||
paperRef=a751001ed1649860794a57ab818a5e51793aafe6
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
@@ -29,7 +29,7 @@ index 2868dab7b100d9c325b0e5056f86660d631dec4b..2acad4c3fd58178b0f8b22bdb04eeeeb
|
||||
}
|
||||
diff --git a/src/main/java/org/galemc/gale/version/GaleSemanticVersion.java b/src/main/java/org/galemc/gale/version/GaleSemanticVersion.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..97fd440ec0f9389a6886f2a1b71ae380bbb85575
|
||||
index 0000000000000000000000000000000000000000..4d3bfdbf81daada0859cc70e3c23a90e04e4521d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/galemc/gale/version/GaleSemanticVersion.java
|
||||
@@ -0,0 +1,37 @@
|
||||
@@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..97fd440ec0f9389a6886f2a1b71ae380
|
||||
+ * The <code>patch</code> version is incremented for small changes that do not affect the goal of any feature,
|
||||
+ * such as bug fixes, performance improvements or changes in wording.
|
||||
+ */
|
||||
+ public static final @NotNull String version = "0.6.2";
|
||||
+ public static final @NotNull String version = "0.6.3";
|
||||
+
|
||||
+ /**
|
||||
+ * The "<code>major.minor</code>" portion of the {@link #version}.
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
Date: Mon, 21 Aug 2023 21:05:09 +0200
|
||||
Subject: [PATCH] Optimize nearest structure border iteration
|
||||
|
||||
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
Getting the nearest generated structure contains a nested set of loops that
|
||||
iterates over all chunks at a specific chessboard distance. It does this by
|
||||
iterating over the entire square of chunks within that distance, and checking
|
||||
if the coordinates are at exactly the right distance to be on the border.
|
||||
|
||||
This patch optimizes the iteration by only iterating over the border chunks.
|
||||
This evaluated chunks are the same, and in the same order, as before, to
|
||||
ensure that the returned found structure (which may for example be a buried
|
||||
treasure that will be marked on a treasure map) is the same as in vanilla.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index 8bab3fcfc6aa6c0b37621474a69f15e94bda2113..fa4960b9dac289a83273d8f87d069e2833eb9fc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -262,10 +262,8 @@ public abstract class ChunkGenerator {
|
||||
for (int j1 = -radius; j1 <= radius; ++j1) {
|
||||
boolean flag1 = j1 == -radius || j1 == radius;
|
||||
|
||||
- for (int k1 = -radius; k1 <= radius; ++k1) {
|
||||
- boolean flag2 = k1 == -radius || k1 == radius;
|
||||
+ for (int k1 = -radius; k1 <= radius; k1 += flag1 ? 1 : radius * 2) { // Gale - iterate over border chunks instead of entire square chunk area
|
||||
|
||||
- if (flag1 || flag2) {
|
||||
int l1 = centerChunkX + i1 * j1;
|
||||
int i2 = centerChunkZ + i1 * k1;
|
||||
ChunkPos chunkcoordintpair = placement.getPotentialStructureChunk(seed, l1, i2);
|
||||
@@ -274,7 +272,6 @@ public abstract class ChunkGenerator {
|
||||
if (pair != null) {
|
||||
return pair;
|
||||
}
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user