Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@0a1be9a Make loadChunksForMoveAsync use new chunk system load calls
  • Loading branch information
Dreeam-qwq committed Jul 31, 2024
1 parent ed44787 commit 8abe7b6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group=org.galemc.gale
version=1.21-R0.1-SNAPSHOT

mcVersion=1.21
paperRef=58c7ea3193c5c192fb09b0197b86f0ff5dbe2dfd
paperRef=0a1be9ae87416ffca38cf20412e248c78a9d6a3c

org.gradle.caching=false
org.gradle.parallel=true
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0008-Gale-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ index dd56c8e041116ef3602a9f89c998c8208ab89b51..86c615518e315dd4425d17df163e88a1
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
if (this.convertOldUsers()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 2766ec28f028c0bd672009928bf64c1a6e5d07d6..3bdca1658cec40df0c31aa66e5102f2e9ba5de13 100644
index 2fe9d9b38c01d04416843fdd48d3e33899b7de63..108a3edd8dff37c19feac1f247c57a9deae15887 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -546,7 +546,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -503,7 +503,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error

// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
Expand Down
28 changes: 14 additions & 14 deletions patches/server/0011-Remove-vanilla-profiler.patch
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ index dcb5651d1d9b10b40430fb2f713beedf68336704..3b3684d202e460a80b3e6e97afbaa4c8
}

diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac12ab6db6 100644
index 108a3edd8dff37c19feac1f247c57a9deae15887..7aa13de4b3778e6708ed46ddcedde100f585a40f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -80,7 +80,6 @@ import net.minecraft.util.ProgressListener;
Expand All @@ -787,7 +787,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
import net.minecraft.util.valueproviders.IntProvider;
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.DifficultyInstance;
@@ -546,15 +545,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -503,15 +502,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error

// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
Expand All @@ -808,7 +808,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
this.pathTypesByPosCache = new PathTypeCache();
this.navigatingMobs = new ObjectOpenHashSet();
this.blockEvents = new ObjectLinkedOpenHashSet();
@@ -667,16 +668,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -624,16 +625,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
}

public void tick(BooleanSupplier shouldKeepTicking) {
Expand All @@ -825,7 +825,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
this.advanceWeatherCycle();
}

@@ -708,30 +705,23 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -665,30 +662,23 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
this.tickTime();
}

Expand Down Expand Up @@ -856,15 +856,15 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
if (flag) {
this.timings.doSounds.startTiming(); // Spigot
this.runBlockEvents();
@@ -739,7 +729,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -696,7 +686,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
}

this.handlingTick = false;
- gameprofilerfiller.pop();
boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this

if (flag1) {
@@ -747,12 +736,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -704,12 +693,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
}

if (flag1 || this.emptyTime++ < 300) {
Expand All @@ -877,7 +877,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
}

org.spigotmc.ActivationRange.activateEntities(this); // Spigot
@@ -762,9 +748,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -719,9 +705,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
entity.discard();
} else if (!tickratemanager.isEntityFrozen(entity)) {
Expand All @@ -887,7 +887,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - rewrite chunk system
Entity entity1 = entity.getVehicle();

@@ -776,22 +760,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -733,22 +717,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
entity.stopRiding();
}

Expand All @@ -910,7 +910,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
}

@Override
@@ -903,9 +882,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -860,9 +839,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
boolean flag = this.isRaining();
int j = chunkcoordintpair.getMinBlockX();
int k = chunkcoordintpair.getMinBlockZ();
Expand All @@ -920,7 +920,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));

@@ -934,8 +911,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -891,8 +868,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
}
}

Expand All @@ -929,7 +929,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
for (int l = 0; l < randomTickSpeed; ++l) {
if (this.random.nextInt(48) == 0) {
@@ -944,14 +919,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -901,14 +876,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
}
} // Paper - Option to disable ice and snow

Expand All @@ -944,7 +944,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
}

@VisibleForTesting
@@ -1279,19 +1252,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -1236,19 +1209,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
try {
// Paper end - timings
entity.setOldPosAndRot();
Expand All @@ -964,7 +964,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
} finally { timer.stopTiming(); } // Paper - timings
Iterator iterator = entity.getPassengers().iterator();

@@ -1320,12 +1287,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -1277,12 +1244,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
// Paper end
passenger.setOldPosAndRot();
++passenger.tickCount;
Expand All @@ -977,7 +977,7 @@ index 3bdca1658cec40df0c31aa66e5102f2e9ba5de13..e09f09f33c4063bac676b175714a3cac
// Paper start - EAR 2
if (isActive) {
passenger.rideTick();
@@ -1337,7 +1299,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -1294,7 +1256,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
vehicle.positionRider(passenger);
}
// Paper end - EAR 2
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0031-Remove-lambda-from-ticking-guard.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e09f09f33c4063bac676b175714a3cac12ab6db6..5cbf0ec9d106d33556451a96dcc165e693764cde 100644
index 7aa13de4b3778e6708ed46ddcedde100f585a40f..1f2af396b7cddbbbb9a200bc6272309941f10e5b 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -760,7 +760,20 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -717,7 +717,20 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
entity.stopRiding();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)

diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 5cbf0ec9d106d33556451a96dcc165e693764cde..7e94dcbf3adb8954800a6d577b39616638d673e8 100644
index 1f2af396b7cddbbbb9a200bc6272309941f10e5b..b5491374f17c93310cba14a29ade7f416dd68ab4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1619,7 +1619,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -1576,7 +1576,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.

@Override
public void destroyBlockProgress(int entityId, BlockPos pos, int progress) {
Expand All @@ -35,7 +35,7 @@ index 5cbf0ec9d106d33556451a96dcc165e693764cde..7e94dcbf3adb8954800a6d577b396166

// CraftBukkit start
Player entityhuman = null;
@@ -1653,7 +1663,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -1610,7 +1620,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
// CraftBukkit end

if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
Expand Down

0 comments on commit 8abe7b6

Please sign in to comment.