mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-13 21:24:00 +01:00
Update to 1.18.1 (#7076)
This commit is contained in:
parent
cad32bf4c1
commit
0e985b7b3b
18 changed files with 43 additions and 63 deletions
|
@ -46,7 +46,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
paramMappings("net.fabricmc:yarn:1.18+build.1:mergedv2")
|
||||
paramMappings("net.fabricmc:yarn:1.18.1+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.7.0:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:1.5.498.22")
|
||||
paperclip("io.papermc:paperclip:3.0.2")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
group=io.papermc.paper
|
||||
version=1.18-R0.1-SNAPSHOT
|
||||
version=1.18.1-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.18
|
||||
mcVersion=1.18.1
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
|
|
@ -110,7 +110,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
-
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
- <version>1.18-R0.1-SNAPSHOT</version>
|
||||
- <version>1.18.1-R0.1-SNAPSHOT</version>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
- <name>Spigot-API</name>
|
||||
|
|
|
@ -21,6 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.beaconData.set(2, event.getSecondary() == null ? 0 : event.getSecondary().getId());
|
||||
+ if (!event.willConsumeItem()) return;
|
||||
this.paymentSlot.remove(1);
|
||||
this.access.execute(Level::blockEntityChanged);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
|
@ -1895,9 +1895,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.setProperty("log4j2.formatMsgNoLookups", "true");
|
||||
public static boolean useConsole = true;
|
||||
|
||||
public static void main(String[] args) {
|
||||
+ // Paper start
|
||||
+ final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
|
||||
+ if (false && System.getProperty(warnWhenLegacyFormattingDetected) == null) {
|
||||
|
|
|
@ -1146,7 +1146,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ MutableObject<java.util.Map<Object, ClientboundLevelChunkWithLightPacket>> mutableobject = new MutableObject<>(); // Paper - Anti-Xray - Bypass
|
||||
|
||||
this.getPlayers(chunkcoordintpair, false).forEach((entityplayer) -> {
|
||||
boolean flag = ChunkMap.isChunkInEuclideanRange(chunkcoordintpair, entityplayer, true, k);
|
||||
SectionPos sectionposition = entityplayer.getLastSectionPos();
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
this.viewDistance = j;
|
||||
this.distanceManager.updatePlayerTickets(this.viewDistance);
|
||||
this.distanceManager.updatePlayerTickets(this.viewDistance + 1);
|
||||
- ObjectIterator objectiterator = this.updatingChunkMap.values().iterator();
|
||||
+ Iterator objectiterator = this.updatingChunks.getVisibleValuesCopy().iterator(); // Paper
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nassim Jahnke <nassim@njahnke.dev>
|
||||
Date: Thu, 9 Dec 2021 21:59:08 +0100
|
||||
Subject: [PATCH] Don't disable log4j lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
public static boolean useConsole = true;
|
||||
|
||||
public static void main(String[] args) {
|
||||
- System.setProperty("log4j2.formatMsgNoLookups", "true");
|
||||
+ //System.setProperty("log4j2.formatMsgNoLookups", "true"); // Paper - no...
|
||||
|
||||
// Paper start
|
||||
final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
|
|
@ -25,14 +25,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
import it.unimi.dsi.fastutil.longs.LongSets;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
-import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
++TimingHistory.entityTicks; // Paper - timings
|
||||
// Spigot start
|
||||
|
|
|
@ -5434,7 +5434,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.removePlayerFromDistanceMaps(player); // Paper - distance maps
|
||||
}
|
||||
|
||||
for (int k = i - this.viewDistance; k <= i + this.viewDistance; ++k) {
|
||||
for (int k = i - this.viewDistance - 1; k <= i + this.viewDistance + 1; ++k) {
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
@ -5878,14 +5878,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/mai
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
import it.unimi.dsi.fastutil.longs.LongSets;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
+import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.server.MapInitializeEvent;
|
||||
import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
import org.bukkit.event.world.TimeSkipEvent;
|
||||
|
|
|
@ -122,9 +122,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
if (currentlyTickingEntity.get() == null) {
|
||||
currentlyTickingEntity.lazySet(entity);
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
|
||||
|
||||
if (Shapes.joinIsNotEmpty(voxelshape, voxelshape1, BooleanOp.NOT_SAME)) {
|
||||
List<PathNavigation> list = new ObjectArrayList();
|
||||
- Iterator iterator = this.navigatingMobs.iterator();
|
||||
+ // Paper start - optimise notify()
|
||||
+ io.papermc.paper.chunk.SingleThreadChunkRegionManager.Region region = this.getChunkSource().chunkMap.dataRegionManager.getRegion(pos.getX() >> 4, pos.getZ() >> 4);
|
||||
|
@ -138,14 +138,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Mob> iterator = navigatorsFromRegion.iterator();
|
||||
|
||||
- while (iterator.hasNext()) {
|
||||
+
|
||||
+ try { while (iterator.hasNext()) { // Paper end - optimise notify()
|
||||
// CraftBukkit start - fix SPIGOT-6362
|
||||
Mob entityinsentient;
|
||||
try {
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
navigationabstract.recomputePath(pos);
|
||||
|
||||
try {
|
||||
this.isUpdatingNavigations = true;
|
||||
- iterator = list.iterator();
|
||||
+ // Paper start - optimise notify()
|
||||
+ Iterator<PathNavigation> navigationIterator = list.iterator();
|
||||
|
||||
- while (iterator.hasNext()) {
|
||||
- PathNavigation navigationabstract1 = (PathNavigation) iterator.next();
|
||||
+ while (navigationIterator.hasNext()) {
|
||||
+ PathNavigation navigationabstract1 = navigationIterator.next();
|
||||
+ // Paper end - optimise notify()
|
||||
|
||||
navigationabstract1.recomputePath();
|
||||
}
|
||||
} finally {
|
||||
this.isUpdatingNavigations = false;
|
||||
}
|
||||
+ // Paper start - optimise notify()
|
||||
+ } finally {
|
||||
|
@ -205,14 +219,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.mob = mob;
|
||||
this.level = world;
|
||||
@@ -0,0 +0,0 @@ public abstract class PathNavigation {
|
||||
}
|
||||
|
||||
public void recomputePath(BlockPos pos) {
|
||||
- if (this.path != null && !this.path.isDone() && this.path.getNodeCount() != 0) {
|
||||
+ if (this.path != null && !this.path.isDone() && this.path.getNodeCount() != 0) { // Paper - diff on change - needed for isViableForPathRecalculationChecking()
|
||||
public boolean shouldRecomputePath(BlockPos pos) {
|
||||
if (this.hasDelayedRecomputation) {
|
||||
return false;
|
||||
- } else if (this.path != null && !this.path.isDone() && this.path.getNodeCount() != 0) {
|
||||
+ } else if (this.path != null && !this.path.isDone() && this.path.getNodeCount() != 0) { // Paper - diff on change - needed for isViableForPathRecalculationChecking()
|
||||
Node node = this.path.getEndNode();
|
||||
Vec3 vec3 = new Vec3(((double)node.x + this.mob.getX()) / 2.0D, ((double)node.y + this.mob.getY()) / 2.0D, ((double)node.z + this.mob.getZ()) / 2.0D);
|
||||
if (pos.closerThan(vec3, (double)(this.path.getNodeCount() - this.path.getNextNodeIndex()))) {
|
||||
return pos.closerThan(vec3, (double)(this.path.getNodeCount() - this.path.getNextNodeIndex()));
|
||||
diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
|
||||
|
|
|
@ -36,8 +36,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- ServerLevel.this.getChunkSource().addEntity(entity);
|
||||
+ // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - moved down below valid=true
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerLevel.this.players.add((ServerPlayer) entity);
|
||||
ServerLevel.this.updateSleepingPlayerList();
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot</artifactId>
|
||||
- <packaging>jar</packaging>
|
||||
- <version>1.18-R0.1-SNAPSHOT</version>
|
||||
- <version>1.18.1-R0.1-SNAPSHOT</version>
|
||||
- <name>Spigot</name>
|
||||
- <url>https://www.spigotmc.org/</url>
|
||||
-
|
||||
|
|
|
@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ if (json != null && json.contains("\u00A7")) {
|
||||
+ try {
|
||||
+ display.put("Name", convert(json));
|
||||
+ } catch (JsonParseException jsonparseexception) {
|
||||
+ } catch (com.google.gson.JsonParseException jsonparseexception) {
|
||||
+ display.remove("Name");
|
||||
+ }
|
||||
+ }
|
||||
|
@ -33,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ if (json != null && json.contains("\u00A7")) { // Only try if it has legacy in the unparsed json
|
||||
+ try {
|
||||
+ list.set(index, convert(json));
|
||||
+ } catch (JsonParseException e) {
|
||||
+ } catch (com.google.gson.JsonParseException e) {
|
||||
+ list.set(index, net.minecraft.nbt.StringTag.valueOf(org.bukkit.craftbukkit.util.CraftChatMessage.toJSON(new TextComponent(""))));
|
||||
+ }
|
||||
+ }
|
||||
|
|
|
@ -25,8 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Override
|
||||
public void sendBlockUpdated(BlockPos pos, BlockState oldState, BlockState newState, int flags) {
|
||||
}
|
||||
|
||||
this.getChunkSource().blockChanged(pos);
|
||||
+ if(this.paperConfig.updatePathfindingOnBlockUpdate) { // Paper - option to disable pathfinding updates
|
||||
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ffd8b28939b4ec84855f8a10c93463ec113def13
|
||||
Subproject commit 5906bed05d29c64af69983e2521cc3e9060d95ec
|
|
@ -1 +1 @@
|
|||
Subproject commit 35d3986e9ec4ffba0f025897ae87cd5991b9fa9a
|
||||
Subproject commit c2e0bbda4ee13ec92c603a7bfe9bd8e5575a2993
|
|
@ -1 +1 @@
|
|||
Subproject commit dbf493829eb4bf37ff6492e725058424138cc651
|
||||
Subproject commit f65de01fa82909bd90444c24e49436771663e9c3
|
Loading…
Reference in a new issue