mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
Update to 1.18.1 (#7076)
This commit is contained in:
@@ -46,7 +46,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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")
|
remapper("net.fabricmc:tiny-remapper:0.7.0:fat")
|
||||||
decompiler("net.minecraftforge:forgeflower:1.5.498.22")
|
decompiler("net.minecraftforge:forgeflower:1.5.498.22")
|
||||||
paperclip("io.papermc:paperclip:3.0.2")
|
paperclip("io.papermc:paperclip:3.0.2")
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
group=io.papermc.paper
|
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.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@@ -110,7 +110,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
-
|
-
|
||||||
- <groupId>org.spigotmc</groupId>
|
- <groupId>org.spigotmc</groupId>
|
||||||
- <artifactId>spigot-api</artifactId>
|
- <artifactId>spigot-api</artifactId>
|
||||||
- <version>1.18-R0.1-SNAPSHOT</version>
|
- <version>1.18.1-R0.1-SNAPSHOT</version>
|
||||||
- <packaging>jar</packaging>
|
- <packaging>jar</packaging>
|
||||||
-
|
-
|
||||||
- <name>Spigot-API</name>
|
- <name>Spigot-API</name>
|
||||||
|
@@ -21,6 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ this.beaconData.set(2, event.getSecondary() == null ? 0 : event.getSecondary().getId());
|
+ this.beaconData.set(2, event.getSecondary() == null ? 0 : event.getSecondary().getId());
|
||||||
+ if (!event.willConsumeItem()) return;
|
+ if (!event.willConsumeItem()) return;
|
||||||
this.paymentSlot.remove(1);
|
this.paymentSlot.remove(1);
|
||||||
|
this.access.execute(Level::blockEntityChanged);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
@@ -1895,9 +1895,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -0,0 +0,0 @@ public class Main {
|
@@ -0,0 +0,0 @@ public class Main {
|
||||||
public static void main(String[] args) {
|
public static boolean useConsole = true;
|
||||||
System.setProperty("log4j2.formatMsgNoLookups", "true");
|
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
|
+ final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
|
||||||
+ if (false && System.getProperty(warnWhenLegacyFormattingDetected) == null) {
|
+ 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
|
+ MutableObject<java.util.Map<Object, ClientboundLevelChunkWithLightPacket>> mutableobject = new MutableObject<>(); // Paper - Anti-Xray - Bypass
|
||||||
|
|
||||||
this.getPlayers(chunkcoordintpair, false).forEach((entityplayer) -> {
|
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
|
@@ -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
|
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
|
||||||
this.viewDistance = j;
|
this.viewDistance = j;
|
||||||
this.distanceManager.updatePlayerTickets(this.viewDistance);
|
this.distanceManager.updatePlayerTickets(this.viewDistance + 1);
|
||||||
- ObjectIterator objectiterator = this.updatingChunkMap.values().iterator();
|
- ObjectIterator objectiterator = this.updatingChunkMap.values().iterator();
|
||||||
+ Iterator objectiterator = this.updatingChunks.getVisibleValuesCopy().iterator(); // Paper
|
+ 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.google.common.collect.Lists;
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
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 {
|
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
++TimingHistory.entityTicks; // Paper - timings
|
++TimingHistory.entityTicks; // Paper - timings
|
||||||
// Spigot start
|
// Spigot start
|
||||||
|
@@ -5434,7 +5434,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ this.removePlayerFromDistanceMaps(player); // Paper - distance maps
|
+ 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
|
@@ -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
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/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;
|
@@ -0,0 +0,0 @@ import org.bukkit.event.server.MapInitializeEvent;
|
||||||
import org.bukkit.event.weather.LightningStrikeEvent;
|
import org.bukkit.event.weather.LightningStrikeEvent;
|
||||||
import org.bukkit.event.world.TimeSkipEvent;
|
import org.bukkit.event.world.TimeSkipEvent;
|
||||||
|
@@ -122,9 +122,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (currentlyTickingEntity.get() == null) {
|
if (currentlyTickingEntity.get() == null) {
|
||||||
currentlyTickingEntity.lazySet(entity);
|
currentlyTickingEntity.lazySet(entity);
|
||||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -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)) {
|
if (Shapes.joinIsNotEmpty(voxelshape, voxelshape1, BooleanOp.NOT_SAME)) {
|
||||||
|
List<PathNavigation> list = new ObjectArrayList();
|
||||||
- Iterator iterator = this.navigatingMobs.iterator();
|
- Iterator iterator = this.navigatingMobs.iterator();
|
||||||
+ // Paper start - optimise notify()
|
+ // Paper start - optimise notify()
|
||||||
+ io.papermc.paper.chunk.SingleThreadChunkRegionManager.Region region = this.getChunkSource().chunkMap.dataRegionManager.getRegion(pos.getX() >> 4, pos.getZ() >> 4);
|
+ 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();
|
+ io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Mob> iterator = navigatorsFromRegion.iterator();
|
||||||
|
|
||||||
- while (iterator.hasNext()) {
|
- while (iterator.hasNext()) {
|
||||||
+
|
|
||||||
+ try { while (iterator.hasNext()) { // Paper end - optimise notify()
|
+ try { while (iterator.hasNext()) { // Paper end - optimise notify()
|
||||||
// CraftBukkit start - fix SPIGOT-6362
|
// CraftBukkit start - fix SPIGOT-6362
|
||||||
Mob entityinsentient;
|
Mob entityinsentient;
|
||||||
try {
|
try {
|
||||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -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()
|
+ // Paper start - optimise notify()
|
||||||
+ } finally {
|
+ } finally {
|
||||||
@@ -205,14 +219,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.mob = mob;
|
this.mob = mob;
|
||||||
this.level = world;
|
this.level = world;
|
||||||
@@ -0,0 +0,0 @@ public abstract class PathNavigation {
|
@@ -0,0 +0,0 @@ public abstract class PathNavigation {
|
||||||
}
|
public boolean shouldRecomputePath(BlockPos pos) {
|
||||||
|
if (this.hasDelayedRecomputation) {
|
||||||
public void recomputePath(BlockPos pos) {
|
return false;
|
||||||
- if (this.path != null && !this.path.isDone() && this.path.getNodeCount() != 0) {
|
- } else 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()
|
+ } else if (this.path != null && !this.path.isDone() && this.path.getNodeCount() != 0) { // Paper - diff on change - needed for isViableForPathRecalculationChecking()
|
||||||
Node node = this.path.getEndNode();
|
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);
|
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
|
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
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
|
--- 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);
|
||||||
+ // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - moved down below valid=true
|
+ // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - moved down below valid=true
|
||||||
if (entity instanceof ServerPlayer) {
|
if (entity instanceof ServerPlayer) {
|
||||||
ServerLevel.this.players.add((ServerPlayer) entity);
|
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||||
ServerLevel.this.updateSleepingPlayerList();
|
|
||||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -185,7 +185,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
- <groupId>org.spigotmc</groupId>
|
- <groupId>org.spigotmc</groupId>
|
||||||
- <artifactId>spigot</artifactId>
|
- <artifactId>spigot</artifactId>
|
||||||
- <packaging>jar</packaging>
|
- <packaging>jar</packaging>
|
||||||
- <version>1.18-R0.1-SNAPSHOT</version>
|
- <version>1.18.1-R0.1-SNAPSHOT</version>
|
||||||
- <name>Spigot</name>
|
- <name>Spigot</name>
|
||||||
- <url>https://www.spigotmc.org/</url>
|
- <url>https://www.spigotmc.org/</url>
|
||||||
-
|
-
|
||||||
|
@@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ if (json != null && json.contains("\u00A7")) {
|
+ if (json != null && json.contains("\u00A7")) {
|
||||||
+ try {
|
+ try {
|
||||||
+ display.put("Name", convert(json));
|
+ display.put("Name", convert(json));
|
||||||
+ } catch (JsonParseException jsonparseexception) {
|
+ } catch (com.google.gson.JsonParseException jsonparseexception) {
|
||||||
+ display.remove("Name");
|
+ 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
|
+ if (json != null && json.contains("\u00A7")) { // Only try if it has legacy in the unparsed json
|
||||||
+ try {
|
+ try {
|
||||||
+ list.set(index, convert(json));
|
+ 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(""))));
|
+ 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
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/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 {
|
@@ -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);
|
this.getChunkSource().blockChanged(pos);
|
||||||
+ if(this.paperConfig.updatePathfindingOnBlockUpdate) { // Paper - option to disable pathfinding updates
|
+ if(this.paperConfig.updatePathfindingOnBlockUpdate) { // Paper - option to disable pathfinding updates
|
||||||
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
||||||
|
Submodule work/Bukkit updated: ffd8b28939...5906bed05d
Submodule work/CraftBukkit updated: 35d3986e9e...c2e0bbda4e
Submodule work/Spigot updated: dbf493829e...f65de01fa8
Reference in New Issue
Block a user