Compare commits
18 commits
master
...
ver/1.17.1
Author | SHA1 | Date | |
---|---|---|---|
|
6625db387e | ||
|
0954966638 | ||
|
2c0515f6aa | ||
|
c53577e3c0 | ||
|
cc43ba70ff | ||
|
bf23668bc5 | ||
|
b1af5ea79f | ||
|
2a827e31ab | ||
|
25133734ac | ||
|
ed8c5122d5 | ||
|
1bc077b7f4 | ||
|
5bd2611b3a | ||
|
4ac995a418 | ||
|
d4318a6ebc | ||
|
244b392f39 | ||
|
1a83e90c23 | ||
|
005d7b6c75 | ||
|
3e73355e2e |
171 changed files with 570 additions and 369 deletions
|
@ -10,11 +10,6 @@ java {
|
|||
withJavadocJar()
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://libraries.minecraft.net")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":Paper-API"))
|
||||
api("com.mojang:brigadier:1.0.18")
|
||||
|
|
|
@ -16,6 +16,8 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
val paperMavenPublicUrl = "https://papermc.io/repo/repository/maven-public/"
|
||||
|
||||
subprojects {
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
|
@ -28,27 +30,31 @@ subprojects {
|
|||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
if (name == "Paper-MojangAPI") {
|
||||
return@subprojects
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven(paperMavenPublicUrl)
|
||||
}
|
||||
}
|
||||
|
||||
val spigotDecompiler: Configuration by configurations.creating
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/") {
|
||||
content { onlyForConfigurations("paperclip") }
|
||||
maven(paperMavenPublicUrl) {
|
||||
content {
|
||||
onlyForConfigurations(
|
||||
configurations.paperclip.name,
|
||||
spigotDecompiler.name,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paramMappings("org.quiltmc:yarn:1.17.1+build.1:mergedv2")
|
||||
paramMappings("net.fabricmc:yarn:1.17.1+build.65:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.6.0:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:1.5.498.12")
|
||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.4")
|
||||
paperclip("io.papermc:paperclip:2.0.1")
|
||||
}
|
||||
|
||||
|
@ -56,9 +62,13 @@ paperweight {
|
|||
minecraftVersion.set(providers.gradleProperty("mcVersion"))
|
||||
serverProject.set(project(":Paper-Server"))
|
||||
|
||||
paramMappingsRepo.set("https://maven.quiltmc.org/repository/release/")
|
||||
remapRepo.set("https://maven.fabricmc.net/")
|
||||
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
||||
paramMappingsRepo.set(paperMavenPublicUrl)
|
||||
remapRepo.set(paperMavenPublicUrl)
|
||||
decompileRepo.set(paperMavenPublicUrl)
|
||||
|
||||
craftBukkit {
|
||||
fernFlowerJar.set(layout.file(spigotDecompiler.elements.map { it.single().asFile }))
|
||||
}
|
||||
|
||||
paper {
|
||||
spigotApiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||
|
@ -88,8 +98,7 @@ tasks.generateDevelopmentBundle {
|
|||
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
||||
libraryRepositories.addAll(
|
||||
"https://repo.maven.apache.org/maven2/",
|
||||
"https://libraries.minecraft.net/",
|
||||
"https://papermc.io/repo/repository/maven-public/",
|
||||
paperMavenPublicUrl,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ index 67fb370cad6924895a6b27052dbd5c1767e3f0c9..bb338269c9e3bef4c274157c490d8b8f
|
|||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b64b0200a6b19f93ba0592ecc6f29b4534df4812
|
||||
index 0000000000000000000000000000000000000000..0179e2ebaa655611328d9d7a9f86955b5bbf7cb6
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,170 @@
|
||||
@@ -0,0 +1,166 @@
|
||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
|
||||
+import io.papermc.paperweight.util.*
|
||||
|
@ -44,10 +44,6 @@ index 0000000000000000000000000000000000000000..b64b0200a6b19f93ba0592ecc6f29b45
|
|||
+ id("com.github.johnrengelman.shadow")
|
||||
+}
|
||||
+
|
||||
+repositories {
|
||||
+ maven("https://libraries.minecraft.net/")
|
||||
+}
|
||||
+
|
||||
+dependencies {
|
||||
+ implementation(project(":Paper-API"))
|
||||
+ implementation("jline:jline:2.12.1")
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Build system changes
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b64b0200a6b19f93ba0592ecc6f29b4534df4812..c462f9fc70ef2286da21d7c5b96ac68ff602a310 100644
|
||||
index 0179e2ebaa655611328d9d7a9f86955b5bbf7cb6..4bec3711869a1f0cfb324aabcd950cf0d9cce64b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -17,21 +17,23 @@ repositories {
|
||||
@@ -13,21 +13,23 @@ plugins {
|
||||
dependencies {
|
||||
implementation(project(":Paper-API"))
|
||||
implementation("jline:jline:2.12.1")
|
||||
|
@ -36,7 +36,7 @@ index b64b0200a6b19f93ba0592ecc6f29b4534df4812..c462f9fc70ef2286da21d7c5b96ac68f
|
|||
testImplementation("junit:junit:4.13.1")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
}
|
||||
@@ -52,6 +54,7 @@ tasks.jar {
|
||||
@@ -48,6 +50,7 @@ tasks.jar {
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
"Specification-Vendor" to "Bukkit Team",
|
||||
|
@ -44,7 +44,7 @@ index b64b0200a6b19f93ba0592ecc6f29b4534df4812..c462f9fc70ef2286da21d7c5b96ac68f
|
|||
)
|
||||
for (tld in setOf("net", "com", "org")) {
|
||||
attributes("$tld/bukkit", "Sealed" to true)
|
||||
@@ -82,7 +85,7 @@ relocation {
|
||||
@@ -78,7 +81,7 @@ relocation {
|
||||
sequenceOf(
|
||||
"commons-codec:commons-codec" to "org.apache.commons.codec",
|
||||
"commons-io:commons-io" to "org.apache.commons.io",
|
||||
|
@ -53,7 +53,7 @@ index b64b0200a6b19f93ba0592ecc6f29b4534df4812..c462f9fc70ef2286da21d7c5b96ac68f
|
|||
"org.apache.commons:commons-lang3" to "org.apache.commons.lang3",
|
||||
"org.ow2.asm:asm" to "org.objectweb.asm"
|
||||
).forEach { (owner, pack) ->
|
||||
@@ -102,9 +105,17 @@ relocation {
|
||||
@@ -98,9 +101,17 @@ relocation {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ index 3db1f50262df75dc99fd5a1224985cd9f5f14c9f..6611aebafb14b83bce3eeb87701e2edc
|
|||
private static final int MIN_PROTOCOL_ID = -1;
|
||||
private static final int MAX_PROTOCOL_ID = 2;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 53db2468b3bde473fd90a218047db8149c4e7755..8be15a63be90720ce34a7c0cb696a59d864396f8 100644
|
||||
index 9cd9889992c6954f30decf0c308456aa2cca2cc2..4aa6bccf74770cc49e1bb9071f0a5c17043ef50b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1784,7 +1784,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -208,19 +208,6 @@ index d0f6eb3981a171c0f34870cb0472599d6cca9642..d1b2ba24ef54e01c6249c3b2ca16e80f
|
|||
}
|
||||
|
||||
public static <T> SortedArraySet<T> create(Comparator<T> comparator) {
|
||||
diff --git a/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java b/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java
|
||||
index a2bab5980a8fd6d98c20aa601ba0ce97044ce996..d7cc7e12d265a47564c3f1d4af27a3ec8cba284a 100644
|
||||
--- a/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java
|
||||
+++ b/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java
|
||||
@@ -93,7 +93,7 @@ public class ProcessorMailbox<T> implements ProfilerMeasured, ProcessorHandle<T>
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
- this.pollUntil((i) -> {
|
||||
+ this.pollUntil((int i) -> { // Paper - decompile fix
|
||||
return i == 0;
|
||||
});
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
index 75c1c4671fedb425dea20dc4fb0c6cb2304dee83..5a86bc6f552913e2978c61233148db22e3a240f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
|
@ -235,7 +222,7 @@ index 75c1c4671fedb425dea20dc4fb0c6cb2304dee83..5a86bc6f552913e2978c61233148db22
|
|||
return poiSet.isValid;
|
||||
}), PoiRecord.codec(updateListener).listOf().fieldOf("Records").forGetter((poiSet) -> {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
index 38dd114fbfa07a18987cd774ae05060d723247e4..057b92a2948543644618c63abd3f61d1120db4dd 100644
|
||||
index 2e2bc7213b7e19e945eba885ff5614f809c81db0..5705fd14e53aea2fb14785277494b69d36cdfcb4 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
@@ -75,7 +75,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
||||
|
|
|
@ -4987,7 +4987,7 @@ index 0000000000000000000000000000000000000000..850caa39d4875620b05c9a3cc27c65ef
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8be15a63be90720ce34a7c0cb696a59d864396f8..2c2c70e784e9c7bebc6bca1ef48e6992b12b82d5 100644
|
||||
index 4aa6bccf74770cc49e1bb9071f0a5c17043ef50b..cd6e03ea9c7347f52bb4163c1eb03b67c3af1f6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -5037,7 +5037,7 @@ index 8be15a63be90720ce34a7c0cb696a59d864396f8..2c2c70e784e9c7bebc6bca1ef48e6992
|
|||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 6fa6fb852cd5af2009008ac6158251ba5e8cf6fb..bbf2dee8cdd2d8239d9230b1a7fff4f07c2edaf8 100644
|
||||
index b318fc9add7df8997825c00c892a0000e1e8d69f..1072998cd4b00bd74e8aed9a17fbf67e31a595cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -52,9 +52,9 @@ public class ChunkHolder {
|
||||
|
@ -5213,7 +5213,7 @@ index 6fa6fb852cd5af2009008ac6158251ba5e8cf6fb..bbf2dee8cdd2d8239d9230b1a7fff4f0
|
|||
|
||||
if (!playerchunk_state1.isOrAfter(playerchunk_state)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 6df8c7ffd48b18dc0cb0dd9ec826228282e50180..ed21bd46262ac33801c17e6135dd22f99dd78504 100644
|
||||
index de53b338a05c23e70b7a9f7849daed8ad13d5272..0dcc5e5a819884bce9de03283f66b98dd093dc2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -55,6 +55,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
|
||||
|
@ -5373,7 +5373,7 @@ index 6df8c7ffd48b18dc0cb0dd9ec826228282e50180..ed21bd46262ac33801c17e6135dd22f9
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 9591f50922343283597bad6d9ac17c175d8ae230..77d98bfa0ad9fc92a8e794b5a4e00c3e471c123a 100644
|
||||
index e3c4ff57312df1f897f0731f62744c8c40c4b845..09d541032f7f4b2b38b434413a07b79885e04813 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -44,8 +44,10 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana
|
||||
|
@ -5764,7 +5764,7 @@ index 9591f50922343283597bad6d9ac17c175d8ae230..77d98bfa0ad9fc92a8e794b5a4e00c3e
|
|||
|
||||
Objects.requireNonNull(playerchunk);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index eded0e6fd0030f1f01f7e2b16497be768518728e..8115e016109f560f2de78c69285342a42ebd119a 100644
|
||||
index 60ef4ff0c9082e737d93b9ab155fe4c5eef652d0..9da2d00cfae804d4a98709f98ddb5210ab5a5010 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -9,6 +9,7 @@ import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
|
@ -5881,7 +5881,7 @@ index eded0e6fd0030f1f01f7e2b16497be768518728e..8115e016109f560f2de78c69285342a4
|
|||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey<Level> resourcekey, DimensionType dimensionmanager, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6c7c9750d67c914afaf4ecc48facac3189eba75b..89c718e5b975a83b07a114b2b2c6fe31c75cb580 100644
|
||||
index d87e23437ee5f930fb5dcba13d5986599f0c1c4c..5f243953d6d9710280bd099b7560c18d30dddfa0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -229,6 +229,8 @@ public class ServerPlayer extends Player {
|
||||
|
@ -5915,7 +5915,7 @@ index 3a4f026c73cdd22d30bdadabbcf24bef969b73e4..0d536d72ac918fbd403397ff369d1014
|
|||
private final String name;
|
||||
private final Comparator<T> comparator;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
index 391bae98e542333a431fb48bf0675c0e8a1873ac..0f6b534a4c789a2f09f6c4624e5d58b99c7ed0e6 100644
|
||||
index 602245be7f9eb0057399056bd0de9c1a3480dbc1..023702c616366ebb1c4f9ac80d4eccaa7fa5c9de 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
@@ -150,6 +150,26 @@ public class WorldGenRegion implements WorldGenLevel {
|
||||
|
@ -5946,7 +5946,7 @@ index 391bae98e542333a431fb48bf0675c0e8a1873ac..0f6b534a4c789a2f09f6c4624e5d58b9
|
|||
public BlockState getBlockState(BlockPos pos) {
|
||||
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 294060d48c624d77e64ddfa19607905cda1be675..2c8fa37694212f03f6c1f760078230b36b0fd1eb 100644
|
||||
index d91c6722543c43bf5d8c85171b83a3a7a5d8bf3e..736d3f0e9cf717529ac948b9318c1a5c8efd9a9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -218,9 +218,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
@ -5981,7 +5981,7 @@ index a4c5edee297af6d68d518b77f706732b5ccbe4de..7bf4bf5cb2c1b54a7e2733091f48f3a8
|
|||
@Override
|
||||
public void tell(R runnable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c57bde6b2042c0a68cb02f43c28cae0070f38111..a5f704edf4d8afdb088f3a4ac8e3957f8851842d 100644
|
||||
index 33a3b47a89f1d0a4074d3aef236060e01e6ba77f..fce3d21070aac24230457fd0cbf6bf99db340df4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -298,6 +298,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
@ -5997,7 +5997,7 @@ index c57bde6b2042c0a68cb02f43c28cae0070f38111..a5f704edf4d8afdb088f3a4ac8e3957f
|
|||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 41e5b1a888f2fa5c7fd26095d070898c9e4489eb..fd8c35e896cc03a21c41e846dc5413ce00da47b0 100644
|
||||
index 3c5177c8e56168b89d7d4202ab32d64b06c91820..648bec7f8743098bf29a34605ef46914228fe06c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity {
|
||||
|
@ -6046,7 +6046,7 @@ index 847a11383322ea67bf80dbcabe7272459392f27c..229490d3857ce9f5bba4e6bb4aedcff5
|
|||
super(type, world);
|
||||
this.xpReward = 5;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index c65d1c4982c4ea950dd11d2185d7409e52a55ec5..ab9cb0bf0321e4130b5bbf2b24b7655e9327d363 100644
|
||||
index 5af84a8daef999cc66d570c4bfb45b668b795c42..8381aa378e4c8982826c1726ea3dbf1bec58401a 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -727,6 +727,24 @@ public final class ItemStack {
|
||||
|
@ -6071,8 +6071,8 @@ index c65d1c4982c4ea950dd11d2185d7409e52a55ec5..ab9cb0bf0321e4130b5bbf2b24b7655e
|
|||
+ return bukkitStack;
|
||||
+ }
|
||||
+ // Paper end
|
||||
public void setTag(@Nullable CompoundTag tag) {
|
||||
this.tag = tag;
|
||||
public void setTag(@Nullable CompoundTag nbt) {
|
||||
this.tag = nbt;
|
||||
if (this.getItem().canBeDepleted()) {
|
||||
@@ -1127,6 +1145,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start
|
||||
|
@ -6120,7 +6120,7 @@ index 083122a2e051b23b2cb9bdb8eb70af01af9df400..e85e4a2dfceb0aa40e73b43a5e122a59
|
|||
FluidState getFluidState(BlockPos pos);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
index 3f77959c98ee6f19423105d23f69bc56a82df54b..439f82a48e6f6ce7b4773505ced32324cacb302d 100644
|
||||
index c39591861e758842b840c9ac2e1172344a2c9464..cd984c990f3fac8d968d522f45b8fdd116ed556d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
@@ -16,6 +16,7 @@ public class ChunkPos {
|
||||
|
@ -6184,7 +6184,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..c7d499bfc22152e0a49f50a2a8133f31
|
|||
public BlockState getBlockState(BlockPos pos) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 8516eef6ba56bd81710a8ad706f0fac8e49d7a3d..8ff3b141b816599759570ae0c7bee35cca7bef11 100644
|
||||
index 0f456b0fd91f426d7f71bbe87300c71e45c406c0..1a6faaf70e54a314031e8b96c11dc6be691a01ec 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -84,6 +84,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
|
@ -6337,7 +6337,7 @@ index 00118cc80ebc31e5fac95c31c07634f0e2904263..138b6792bc6ee26e0b9aaaef7bf58fb2
|
|||
@Override
|
||||
public BlockEntity getBlockEntity(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 505731735126e81a4cc768311dce337385e5503f..adf1c04d34383d088a3fc8c06cdc8b55552c354f 100644
|
||||
index 751b5fb8272a342f40903d51f38b8aafd73675b1..6a3baee561146f2b9d6f36a01b03125c1334b214 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -603,14 +603,14 @@ public abstract class BlockBehaviour {
|
||||
|
|
|
@ -2001,7 +2001,7 @@ index 0beb96dc896f63003e1b1ae458b73902bdbe648a..102eb86bad3000f258775ac06ecd1a6d
|
|||
public String getCustomName() {
|
||||
EnchantmentTableBlockEntity enchant = this.getSnapshot();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
index 5422bec518f96ed559898cd746663f3492466f93..b0a7f558cfe0f2ff859ab7b2db38ac303e9ae842 100644
|
||||
index 5422bec518f96ed559898cd746663f3492466f93..772bb8c7d9549059a2b446c36d17dd649d245dbb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
@@ -11,34 +11,60 @@ import org.bukkit.craftbukkit.util.CraftChatMessage;
|
||||
|
@ -2093,7 +2093,7 @@ index 5422bec518f96ed559898cd746663f3492466f93..b0a7f558cfe0f2ff859ab7b2db38ac30
|
|||
continue; // The line contents are still the same, skip.
|
||||
}
|
||||
- sign.setMessage(i, CraftChatMessage.fromString(line)[0]);
|
||||
+ sign.messages[i] = io.papermc.paper.adventure.PaperAdventure.asVanilla(component);
|
||||
+ sign.setMessage(i, io.papermc.paper.adventure.PaperAdventure.asVanilla(component));
|
||||
}
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
|
|||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index ab9cb0bf0321e4130b5bbf2b24b7655e9327d363..c6880228982ef12a37cfa867acb5e564254932b5 100644
|
||||
index 8381aa378e4c8982826c1726ea3dbf1bec58401a..8d9e85a24bf4d63f3b75d4bcfe8c7c78e6ba9636 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -13,6 +13,8 @@ import java.text.DecimalFormatSymbols;
|
||||
|
@ -64,8 +64,8 @@ index ab9cb0bf0321e4130b5bbf2b24b7655e9327d363..c6880228982ef12a37cfa867acb5e564
|
|||
|
||||
@@ -747,6 +767,7 @@ public final class ItemStack {
|
||||
// Paper end
|
||||
public void setTag(@Nullable CompoundTag tag) {
|
||||
this.tag = tag;
|
||||
public void setTag(@Nullable CompoundTag nbt) {
|
||||
this.tag = nbt;
|
||||
+ processEnchantOrder(this.tag); // Paper
|
||||
if (this.getItem().canBeDepleted()) {
|
||||
this.setDamageValue(this.getDamageValue());
|
||||
|
@ -79,7 +79,7 @@ index ab9cb0bf0321e4130b5bbf2b24b7655e9327d363..c6880228982ef12a37cfa867acb5e564
|
|||
|
||||
public boolean isEnchanted() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index d6467a42d54954dffe919482294cb9355f217f21..84f11780a22b3369519fc8f80d6c274360045df7 100644
|
||||
index e88df908377450964ae5b6ff97ee97bd2f09c05f..ba70ac49222c517a38e20e86cee1fd38aecb6318 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -6,7 +6,6 @@ import java.util.Map;
|
||||
|
|
|
@ -19,10 +19,10 @@ Other changes:
|
|||
configuration
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 1f4c0f2156c588fcbb3b0329a416dc20a4b355a8..ba7f0c199c60c062d399586e5c9a0d3da8ddb013 100644
|
||||
index 4bec3711869a1f0cfb324aabcd950cf0d9cce64b..0f88c4b11c0ee4aa46a7b9df0436cc074956987c 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -16,7 +16,17 @@ repositories {
|
||||
@@ -12,7 +12,17 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
implementation(project(":Paper-API"))
|
||||
|
@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938cf71d61b 100644
|
||||
index 0e333b878908b2f83d0a8a83ba475aab2a57f192..7557218fb81ffc1fa81add9231923a4e664d3b83 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -9,6 +9,7 @@ import com.mojang.authlib.GameProfile;
|
||||
|
@ -244,7 +244,7 @@ index 71991aee0d60299f744c896075502d1b436b3e44..0eea43c994e76b466fdda8ecd145d0b1
|
|||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 50427b48a0f823cff8826ca205a9af16b2e2fe93..696e2495ee8046c78ed53126db0e6c696c77c00d 100644
|
||||
index 978f3fe7c7547a923d015d9102b745f373f0db80..724d82995017118c3f3f71833ee83d9193f8dd7d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
||||
|
|
|
@ -15,10 +15,10 @@ This may cause additional prefixes to be disabled for plugins bypassing
|
|||
the plugin logger.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 9b70376813531718c02082633e9f8105f4879a63..fc8ffeea3e808eb1381f85972adffc614937ef6d 100644
|
||||
index 0f88c4b11c0ee4aa46a7b9df0436cc074956987c..bb46f7c5b1203dec12372f51c5a53cfe12ae2bd9 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -25,7 +25,7 @@ dependencies {
|
||||
@@ -21,7 +21,7 @@ dependencies {
|
||||
all its classes to check if they are plugins.
|
||||
Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
||||
*/
|
||||
|
|
|
@ -7,10 +7,10 @@ This patch contains config migrations for when upstream adds options
|
|||
which Paper already had.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index f4735cc330822183e098a67f2c0f00f21db9e137..c5c82496524705a0ce85df5508ec730c19246ec7 100644
|
||||
index f4735cc330822183e098a67f2c0f00f21db9e137..806b612d3c9ca1dd76be88170b3268ca45acef63 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -291,4 +291,22 @@ public class PaperConfig {
|
||||
@@ -291,4 +291,23 @@ public class PaperConfig {
|
||||
private static void authenticationServersDownKickMessage() {
|
||||
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
||||
}
|
||||
|
@ -19,8 +19,9 @@ index f4735cc330822183e098a67f2c0f00f21db9e137..c5c82496524705a0ce85df5508ec730c
|
|||
+ Object val = config.get("settings.save-player-data");
|
||||
+ if (val instanceof Boolean) {
|
||||
+ SpigotConfig.disablePlayerDataSaving = !(Boolean) val;
|
||||
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disableAdvancementSaving);
|
||||
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disablePlayerDataSaving);
|
||||
+ SpigotConfig.save();
|
||||
+ config.set("settings.save-player-data", null);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas.
|
|||
I would love to see this change in Vanilla, so Mojang please pull :)
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index c5c82496524705a0ce85df5508ec730c19246ec7..8ecd1e851cc2168c538947623e1c328e463b52d9 100644
|
||||
index 806b612d3c9ca1dd76be88170b3268ca45acef63..915e2c5b0ffbd0d459a203e1bfb131be4c5476d4 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -309,4 +309,12 @@ public class PaperConfig {
|
||||
@@ -310,4 +310,12 @@ public class PaperConfig {
|
||||
SpigotConfig.save();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index fc8ffeea3e808eb1381f85972adffc614937ef6d..c981944f4a5d40ec14ade9aaa22041887a317e1f 100644
|
||||
index bb46f7c5b1203dec12372f51c5a53cfe12ae2bd9..1610d0c3ecb5fc06a160c3e1f05cb276bc80b73e 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -37,6 +37,7 @@ dependencies {
|
||||
@@ -33,6 +33,7 @@ dependencies {
|
||||
}
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.34.0")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.23") // Paper
|
||||
|
|
|
@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
|
|||
plugins doing unsafe things.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 8ecd1e851cc2168c538947623e1c328e463b52d9..1508afe593a1b62e3a33455707e2552468786614 100644
|
||||
index 915e2c5b0ffbd0d459a203e1bfb131be4c5476d4..00dd9dab2b19f3e49f3b41c20eb96a84bfae1769 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -317,4 +317,18 @@ public class PaperConfig {
|
||||
@@ -318,4 +318,18 @@ public class PaperConfig {
|
||||
Bukkit.getLogger().log(Level.INFO, "Using Aikar's Alternative Luck Formula to apply Luck attribute to all loot pool calculations. See https://luckformula.emc.gs");
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ index 8ecd1e851cc2168c538947623e1c328e463b52d9..1508afe593a1b62e3a33455707e25524
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 857fa3a4f2d5afd27df7ce943359705b3ea131d3..265d147de39e306fac27913b2dc3899e82c63796 100644
|
||||
index 7d3dd3fba294bff2eeb261de767e3de04a6e6b42..cc1b855b09d4826f88b0c2b9c08fb901191a2108 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -227,6 +227,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
|
|
@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
|
|||
This will help diagnose what was going on in that time before the crash.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 1508afe593a1b62e3a33455707e2552468786614..73b49d24cd428e2328d56f5f42333a25a1d6ebae 100644
|
||||
index 00dd9dab2b19f3e49f3b41c20eb96a84bfae1769..d9114c5fa141c37270398100db6bb2a8a8e4ed1e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
@ -20,7 +20,7 @@ index 1508afe593a1b62e3a33455707e2552468786614..73b49d24cd428e2328d56f5f42333a25
|
|||
|
||||
public class PaperConfig {
|
||||
|
||||
@@ -318,6 +319,14 @@ public class PaperConfig {
|
||||
@@ -319,6 +320,14 @@ public class PaperConfig {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ index 1508afe593a1b62e3a33455707e2552468786614..73b49d24cd428e2328d56f5f42333a25
|
|||
public static int tabSpamLimit = 500;
|
||||
private static void tabSpamLimiters() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d9fab29a066367a5cf4a3486989fa7f35451801e..13f94e196ffd9f37e8049a4a76bc83389ff58d84 100644
|
||||
index 4d01f077fd1b93dc0a69d7ae83b75fe0d2ef2c89..cb2ca56df7f2adedff2ebdd26957c23164b56255 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1101,6 +1101,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -48,7 +48,7 @@ index d9fab29a066367a5cf4a3486989fa7f35451801e..13f94e196ffd9f37e8049a4a76bc8338
|
|||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d10da7acb03a2e4a67cee41a6f6fc6357eb8efd6..d62c4092737b8dc3973a67377a56370f1f27e0cb 100644
|
||||
index d3a17607ca7991839b5d5ac58fbdc3a760e89dbb..9dc83fa4ef1b6a04269193f99f013b32a45bcc72 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -835,6 +835,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -159,7 +159,7 @@ index 0fda52841b5e1643efeda92106124998abc4e0aa..fe79c0add4f7cb18d487c5bb9415c40c
|
|||
|
||||
public static Timing getTickList(ServerLevel worldserver, String timingsType) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 73b49d24cd428e2328d56f5f42333a25a1d6ebae..a89ccdf2ea517d2ec38c9433bdc26802884ed988 100644
|
||||
index d9114c5fa141c37270398100db6bb2a8a8e4ed1e..7cec7a377d64dd00ea6fb8f82af489d4bf3bf572 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -169,7 +169,7 @@ index 73b49d24cd428e2328d56f5f42333a25a1d6ebae..a89ccdf2ea517d2ec38c9433bdc26802
|
|||
import com.google.common.base.Strings;
|
||||
import com.google.common.base.Throwables;
|
||||
|
||||
@@ -340,4 +341,58 @@ public class PaperConfig {
|
||||
@@ -341,4 +342,58 @@ public class PaperConfig {
|
||||
}
|
||||
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ index 3d5db5ce2e60ca72ad202caebe49f3fc80d1af37..91f8b8e8e2ed15481ceafc8695068c8d
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bbc83031cf 100644
|
||||
index db366a5d81dac6748bb0b20188117266aee095d1..fc284d0f44a6cd0c36ca8a3d7dcdd611fbe6148e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity {
|
||||
|
@ -104,15 +104,15 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
Entity entity = source.getEntity();
|
||||
LivingEntity entityliving = this.getKillCredit();
|
||||
-
|
||||
+ /* // Paper - move down to make death event cancellable - this is the runKillTrigger below
|
||||
+ /* // Paper - move down to make death event cancellable - this is the awardKillScore below
|
||||
if (this.deathScore >= 0 && entityliving != null) {
|
||||
entityliving.awardKillScore(this, this.deathScore, source);
|
||||
}
|
||||
@@ -1613,20 +1613,46 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1613,20 +1613,52 @@ public abstract class LivingEntity extends Entity {
|
||||
if (!this.level.isClientSide && this.hasCustomName()) {
|
||||
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
|
||||
}
|
||||
+ */ // Paper - move down to make death event cancellable - this is the runKillTrigger below
|
||||
+ */ // Paper - move down to make death event cancellable - this is the awardKillScore below
|
||||
|
||||
this.dead = true;
|
||||
- this.getCombatTracker().recheckStatus();
|
||||
|
@ -130,6 +130,12 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
+ if (this.deathScore >= 0 && entityliving != null) {
|
||||
+ entityliving.awardKillScore(this, this.deathScore, source);
|
||||
+ }
|
||||
+ if (this instanceof Mob) { // Clear equipment slots marked as cleared
|
||||
+ for (EquipmentSlot slot : this.clearedEquipmentSlots) {
|
||||
+ this.setItemSlot(slot, ItemStack.EMPTY);
|
||||
+ }
|
||||
+ this.clearedEquipmentSlots.clear();
|
||||
+ }
|
||||
+
|
||||
+ if (this.isSleeping()) {
|
||||
+ this.stopSleeping();
|
||||
|
@ -158,7 +164,7 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1634,7 +1660,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1634,7 +1666,7 @@ public abstract class LivingEntity extends Entity {
|
||||
if (!this.level.isClientSide) {
|
||||
boolean flag = false;
|
||||
|
||||
|
@ -167,17 +173,30 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
|
||||
@@ -1663,7 +1689,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1663,7 +1695,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
- protected void dropAllDeathLoot(DamageSource source) {
|
||||
+ protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(DamageSource source) { // Paper
|
||||
+ // Paper start
|
||||
+ protected boolean clearEquipmentSlots = true;
|
||||
+ protected Set<EquipmentSlot> clearedEquipmentSlots = new HashSet<>();
|
||||
+ protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(DamageSource source) {
|
||||
+ // Paper end
|
||||
Entity entity = source.getEntity();
|
||||
int i;
|
||||
|
||||
@@ -1681,15 +1707,18 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1678,18 +1714,27 @@ public abstract class LivingEntity extends Entity {
|
||||
this.dropEquipment(); // CraftBukkit - from below
|
||||
if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
this.dropFromLootTable(source, flag);
|
||||
+ // Paper start - collect cleared slots, but don't clear to run advancement triggers
|
||||
+ final boolean prev = this.clearEquipmentSlots;
|
||||
+ this.clearEquipmentSlots = false;
|
||||
+ this.clearedEquipmentSlots.clear();
|
||||
+ // Paper end
|
||||
this.dropCustomDeathLoot(source, i, flag);
|
||||
+ this.clearEquipmentSlots = prev; // Paper
|
||||
}
|
||||
// CraftBukkit start - Call death event
|
||||
- CraftEventFactory.callEntityDeathEvent(this, this.drops);
|
||||
|
@ -196,6 +215,24 @@ index db366a5d81dac6748bb0b20188117266aee095d1..f4828c1bdc7d5e67941926f8d772b1bb
|
|||
|
||||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 3429521aa78596069f3bead01ad04874fea7ee91..0242bb4ee546d6f7044d563433d7fb0639abdb7a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -987,7 +987,13 @@ public abstract class Mob extends LivingEntity {
|
||||
}
|
||||
|
||||
this.spawnAtLocation(itemstack);
|
||||
+ if (this.clearEquipmentSlots) { // Paper
|
||||
this.setItemSlot(enumitemslot, ItemStack.EMPTY);
|
||||
+ // Paper start
|
||||
+ } else {
|
||||
+ this.clearedEquipmentSlots.add(enumitemslot);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 7de3d73232d985ab18d7266371d301c490b79b9f..bfb042f4828e1cd47124939ca3b9caadc7fe1b39 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
|
@ -289,7 +326,7 @@ index 3be9882ac1e96441f479f22099b77a25dd7cb8dd..7b7ceefbcc1f0be710dd8995f0afaad9
|
|||
|
||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e094b1b00d5fb73da73abcadb02ffd98b91fb869..3ef52d7705f3c59e19c56aac6250f2e5b5712600 100644
|
||||
index 0d1c6f609a5198c21c895e8f6ace467355b0f166..61c95f98a3e3e52a23f65f7c957019f7f1aa7417 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -807,9 +807,16 @@ public class CraftEventFactory {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1c35ba0d74aa02b0a94400308c20485ccaad7a13..a7aa62e52105b7adb7725f7abeae376df8f7bb3e 100644
|
||||
index fc284d0f44a6cd0c36ca8a3d7dcdd611fbe6148e..191c64e54392e63f0993ffb4b07ed5c18112bec9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
||||
|
@ -16,7 +16,7 @@ index 1c35ba0d74aa02b0a94400308c20485ccaad7a13..a7aa62e52105b7adb7725f7abeae376d
|
|||
import net.minecraft.world.phys.HitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
@@ -3736,6 +3737,38 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3752,6 +3753,38 @@ public abstract class LivingEntity extends Entity {
|
||||
return level.clip(raytrace);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ index 1c35ba0d74aa02b0a94400308c20485ccaad7a13..a7aa62e52105b7adb7725f7abeae376d
|
|||
|
||||
public int getShieldBlockingDelay() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 873b70c36d145a14632102c9e92d501745064fa4..c396ad36084e46c4b812d970e07a9188aed16daf 100644
|
||||
index 8c01d072287ddd1e73a0043868130e60a78b8c9e..814363d0dee4a91c2e1d5f91e67530fec383c0cb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
|
|
@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13
|
|||
login plugin message packet.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index da21f1623a90ade429723d4eb12d646aaf28071e..1015fcc6c77bd64c3f3cbf234e85a6602dbfa0d7 100644
|
||||
index 9aa28bb2968522ef1b9375bcc872e6d8dfb01764..edf0a82ba7e16b86100aa1920fa41508be2ab1e8 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -9,6 +9,7 @@ import java.io.IOException;
|
||||
|
@ -34,7 +34,7 @@ index da21f1623a90ade429723d4eb12d646aaf28071e..1015fcc6c77bd64c3f3cbf234e85a660
|
|||
}
|
||||
|
||||
public static int packetInSpamThreshold = 300;
|
||||
@@ -347,6 +348,20 @@ public class PaperConfig {
|
||||
@@ -348,6 +349,20 @@ public class PaperConfig {
|
||||
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ index 39bdda56aaa5503efc15207261634127b462c3e7..3fd913f3e963cf2da849a52364356e3b
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d62c4092737b8dc3973a67377a56370f1f27e0cb..921128242ba133d73d2ac592a5f4b7515ef2e46c 100644
|
||||
index 9dc83fa4ef1b6a04269193f99f013b32a45bcc72..7428ba0047d89618ee444303a4986598924ab017 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -703,7 +703,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -20,7 +20,7 @@ this is going to be the best soultion all around.
|
|||
Improvements/suggestions welcome!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d32e6feca6c39a28f80574e4b080ddd4cbb60fdc..42035548577b7c60806a557dd9f9931ca9584e8c 100644
|
||||
index b63af81646a468881b32d50cf18abcd4f2c4c84f..a45b21a882b34cce3f36ce71a5f803d53331deb0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1296,11 +1296,13 @@ public class ServerPlayer extends Player {
|
||||
|
@ -41,7 +41,7 @@ index d32e6feca6c39a28f80574e4b080ddd4cbb60fdc..42035548577b7c60806a557dd9f9931c
|
|||
|
||||
if (entity1 != entity && this.connection != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b4f2b969ad30be38c0a9e3f8efd2a57c3e0f7df0..3c7e75b8fc1bfbe08e232fcba412c83f4aba274c 100644
|
||||
index 56e0b6d14574a7f66cb7291543aa57cd1d8810ee..929cc28e5ec6df29d099477c0780e39eb755f25b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2245,12 +2245,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
@ -93,10 +93,10 @@ index b4f2b969ad30be38c0a9e3f8efd2a57c3e0f7df0..3c7e75b8fc1bfbe08e232fcba412c83f
|
|||
if (this.valid) {
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index a7aa62e52105b7adb7725f7abeae376df8f7bb3e..472b8db386dfb580734999900562d358e5ea146a 100644
|
||||
index 191c64e54392e63f0993ffb4b07ed5c18112bec9..5a162ebc4c57501a0bec66a9010051283fc210fe 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3335,11 +3335,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3351,11 +3351,13 @@ public abstract class LivingEntity extends Entity {
|
||||
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 4) != 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
|
|||
Puts some limits on the size of books.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 769353df1fcdaacecd80085165a1d72f99b577ee..4875e323e8ba52cf91259262b8418310061718ad 100644
|
||||
index c48b175d5511b733bcff9a93a874f5ffc0174691..e683e5bf47abe7bd3d2f7e9811a377549308ded4 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -368,6 +368,13 @@ public class PaperConfig {
|
||||
@@ -369,6 +369,13 @@ public class PaperConfig {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ index 769353df1fcdaacecd80085165a1d72f99b577ee..4875e323e8ba52cf91259262b8418310
|
|||
private static void asyncChunks() {
|
||||
ConfigurationSection section;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a615821cf605208c61be27f8bd026437b799de14..0103c76c183d0e866a98c26f2d1cf557ba4f67e8 100644
|
||||
index ed220061a7afca3a6385a796a0b3b2850f0a952a..2ea1e58cf721a8ae339cbfd6192f3312061249ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1001,6 +1001,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 472b8db386dfb580734999900562d358e5ea146a..55ac5e8cad4c7eee3d8b165698200e9afcd44594 100644
|
||||
index 5a162ebc4c57501a0bec66a9010051283fc210fe..04e10f0073ec4cea9a980a89af36327489e173aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3554,15 +3554,18 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3570,15 +3570,18 @@ public abstract class LivingEntity extends Entity {
|
||||
this.entityData.set(LivingEntity.DATA_LIVING_ENTITY_FLAGS, (byte) j);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ index 472b8db386dfb580734999900562d358e5ea146a..55ac5e8cad4c7eee3d8b165698200e9a
|
|||
}
|
||||
|
||||
}
|
||||
@@ -3635,6 +3638,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3651,6 +3654,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
|
@ -39,7 +39,7 @@ index 472b8db386dfb580734999900562d358e5ea146a..55ac5e8cad4c7eee3d8b165698200e9a
|
|||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@@ -3669,8 +3673,8 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3685,8 +3689,8 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
|
|
|
@ -7,10 +7,10 @@ When the server is lagging, players will wait longer when eating.
|
|||
Change to also use a time check instead if it passes.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 55ac5e8cad4c7eee3d8b165698200e9afcd44594..50d180daff7258795d476b9cd43412fba2fba50f 100644
|
||||
index 04e10f0073ec4cea9a980a89af36327489e173aa..f02894450715b7d08e13c0c4a95a3079e4a577a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3498,6 +3498,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3514,6 +3514,11 @@ public abstract class LivingEntity extends Entity {
|
||||
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ index 55ac5e8cad4c7eee3d8b165698200e9afcd44594..50d180daff7258795d476b9cd43412fb
|
|||
private void updatingUsingItem() {
|
||||
if (this.isUsingItem()) {
|
||||
if (ItemStack.isSameIgnoreDurability(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
|
||||
@@ -3515,8 +3520,12 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3531,8 +3536,12 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.shouldTriggerItemUseEffects()) {
|
||||
this.triggerItemUseEffects(stack, 5);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ index 55ac5e8cad4c7eee3d8b165698200e9afcd44594..50d180daff7258795d476b9cd43412fb
|
|||
this.completeUsingItem();
|
||||
}
|
||||
|
||||
@@ -3562,7 +3571,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3578,7 +3587,10 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag
|
||||
this.useItem = itemstack;
|
||||
|
@ -49,7 +49,7 @@ index 55ac5e8cad4c7eee3d8b165698200e9afcd44594..50d180daff7258795d476b9cd43412fb
|
|||
if (!this.level.isClientSide) {
|
||||
this.setLivingEntityFlag(1, true);
|
||||
this.setLivingEntityFlag(2, enumhand == InteractionHand.OFF_HAND);
|
||||
@@ -3586,7 +3598,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3602,7 +3614,10 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
} else if (!this.isUsingItem() && !this.useItem.isEmpty()) {
|
||||
this.useItem = ItemStack.EMPTY;
|
||||
|
@ -61,7 +61,7 @@ index 55ac5e8cad4c7eee3d8b165698200e9afcd44594..50d180daff7258795d476b9cd43412fb
|
|||
}
|
||||
}
|
||||
|
||||
@@ -3712,7 +3727,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3728,7 +3743,10 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.useItem = ItemStack.EMPTY;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7fc15f7731b9a249f5a1b82278c4ad61105462ce..3837cdc92174914e503dc573f496ea3464c7b566 100644
|
||||
index f02894450715b7d08e13c0c4a95a3079e4a577a4..8b355064c114fe9b65602024087b6c77fc209cc6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3165,8 +3165,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3181,8 +3181,10 @@ public abstract class LivingEntity extends Entity {
|
||||
} else if (this.isInLava() && (!this.onGround || d7 > d8)) {
|
||||
this.jumpInLiquid((Tag) FluidTags.LAVA);
|
||||
} else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) {
|
||||
|
|
|
@ -42,10 +42,10 @@ sets the excessive tick delay to the specified ticks (defaults to
|
|||
60 * 20 ticks, aka 60 seconds)
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 26c5ae72f63d930bf6de2ec18a964ddfeca16379..e9954fa75412a7077950e3813af4b201c084f68f 100644
|
||||
index e683e5bf47abe7bd3d2f7e9811a377549308ded4..098cca054c597864caae5ea5e10593edf83b627a 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -375,6 +375,13 @@ public class PaperConfig {
|
||||
@@ -376,6 +376,13 @@ public class PaperConfig {
|
||||
maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier);
|
||||
}
|
||||
|
||||
|
@ -889,7 +889,7 @@ index 0000000000000000000000000000000000000000..118988c39e58f28e8a2851792b9c014f
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 84f370e887a3e7ff49296bdf8d6d8de9cc194cfb..daeb5b175d17492f382d23af58a9cc46fbb49e60 100644
|
||||
index 0bde40692465de8d5619eca5208336fe4829b06c..5561bad6431018f03375b58471ae830c3b4c4eaa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -86,6 +86,19 @@ public class ChunkHolder {
|
||||
|
@ -925,7 +925,7 @@ index 84f370e887a3e7ff49296bdf8d6d8de9cc194cfb..daeb5b175d17492f382d23af58a9cc46
|
|||
});
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index c6213a7dfcf9aeccdb546eaf74fa8eb119a6a32c..ec0d8e58a518a20634b902769251d6d04750433e 100644
|
||||
index 9e1a6dbc48aed80075fe631795211ce9b2ac741f..0531b5d40b2e58047e52009c4484d1434df40618 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -218,6 +218,18 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
@ -948,7 +948,7 @@ index c6213a7dfcf9aeccdb546eaf74fa8eb119a6a32c..ec0d8e58a518a20634b902769251d6d0
|
|||
// Paper start
|
||||
// this will try to avoid chunk neighbours for lighting
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 527ae7af221c031b4cdf481f097e9062c41af5ac..a19b3c039751da14f044f05fb5ebfa08c051abe4 100644
|
||||
index fb8a13585a27ac0d125f5b22df15c394f3a2d8b4..140014d0eb3b70f8415484afc36f700fd737d9d9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -381,6 +381,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Async command map building
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 780f46c8fdbaafaca6babfa34ebd97f420d0d612..07c4d909324c8aad3a8c5d27811e2c28fe7a91f3 100644
|
||||
index 780f46c8fdbaafaca6babfa34ebd97f420d0d612..1140325637868d60b80394016d936759b1edded1 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -29,6 +29,7 @@ import net.minecraft.network.chat.MutableComponent;
|
||||
|
@ -16,14 +16,12 @@ index 780f46c8fdbaafaca6babfa34ebd97f420d0d612..07c4d909324c8aad3a8c5d27811e2c28
|
|||
import net.minecraft.server.commands.AdvancementCommands;
|
||||
import net.minecraft.server.commands.AttributeCommand;
|
||||
import net.minecraft.server.commands.BanIpCommands;
|
||||
@@ -335,6 +336,14 @@ public class Commands {
|
||||
@@ -335,6 +336,12 @@ public class Commands {
|
||||
if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot
|
||||
// CraftBukkit start
|
||||
// Register Vanilla commands into builtRoot as before
|
||||
+ // Paper start - Async command map building
|
||||
+ java.util.concurrent.ForkJoinPool.commonPool().execute(() -> {
|
||||
+ sendAsync(player);
|
||||
+ });
|
||||
+ net.minecraft.server.MCUtil.scheduleAsyncTask(() -> this.sendAsync(player));
|
||||
+ }
|
||||
+
|
||||
+ private void sendAsync(ServerPlayer player) {
|
||||
|
@ -31,7 +29,7 @@ index 780f46c8fdbaafaca6babfa34ebd97f420d0d612..07c4d909324c8aad3a8c5d27811e2c28
|
|||
Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
|
||||
RootCommandNode vanillaRoot = new RootCommandNode();
|
||||
|
||||
@@ -352,7 +361,14 @@ public class Commands {
|
||||
@@ -352,7 +359,14 @@ public class Commands {
|
||||
for (CommandNode node : rootcommandnode.getChildren()) {
|
||||
bukkit.add(node.getName());
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ Will not run if max entity craming is disabled and
|
|||
the max collisions per entity is less than or equal to 0
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 64403a0a1bddeb1f126b8e315187ea79a859582a..478204aa91d33232f33708816fcc7ea2fe1b55d4 100644
|
||||
index 8b355064c114fe9b65602024087b6c77fc209cc6..f63ec915eab78a63eee67560494fea2162caabaf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3262,10 +3262,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3278,10 +3278,16 @@ public abstract class LivingEntity extends Entity {
|
||||
protected void serverAiStep() {}
|
||||
|
||||
protected void pushEntities() {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 478204aa91d33232f33708816fcc7ea2fe1b55d4..fab8098ce72feb9b08960e55ab1a4aebaae22276 100644
|
||||
index f63ec915eab78a63eee67560494fea2162caabaf..4755bfe5f49a8d110dfbb20d241c8496a14b0703 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2040,7 +2040,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2056,7 +2056,16 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
|
||||
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
|
||||
|
|
|
@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the
|
|||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5802b1721a0d8e1c40d87be099d4f1b1c8a921d7..fbcbe0443f843d04738938f10b433bfe1631fe78 100644
|
||||
index de4e47ced31b0711eda98c1cf53c80950a730143..326d00f9889cdca2e5af3ca7f7964cd7b43b3411 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2159,11 +2159,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
@ -79,6 +79,40 @@ index 5802b1721a0d8e1c40d87be099d4f1b1c8a921d7..fbcbe0443f843d04738938f10b433bfe
|
|||
}
|
||||
|
||||
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4755bfe5f49a8d110dfbb20d241c8496a14b0703..9c6ed2b6384edf8d507ec70852ea65d988528be6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1626,9 +1626,9 @@ public abstract class LivingEntity extends Entity {
|
||||
// Paper start
|
||||
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(source);
|
||||
if (deathEvent == null || !deathEvent.isCancelled()) {
|
||||
- if (this.deathScore >= 0 && entityliving != null) {
|
||||
- entityliving.awardKillScore(this, this.deathScore, source);
|
||||
- }
|
||||
+ // if (this.deathScore >= 0 && entityliving != null) { // Paper - moved to be run earlier in #dropAllDeathLoot before destroying the drop items in CraftEventFactory#callEntityDeathEvent
|
||||
+ // entityliving.awardKillScore(this, this.deathScore, source);
|
||||
+ // }
|
||||
if (this instanceof Mob) { // Clear equipment slots marked as cleared
|
||||
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
|
||||
this.setItemSlot(slot, ItemStack.EMPTY);
|
||||
@@ -1723,8 +1723,14 @@ public abstract class LivingEntity extends Entity {
|
||||
this.dropCustomDeathLoot(source, i, flag);
|
||||
this.clearEquipmentSlots = prev; // Paper
|
||||
}
|
||||
- // CraftBukkit start - Call death event
|
||||
- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
|
||||
+ // CraftBukkit start - Call death event // Paper start - run advancement triggers before destroying drop itemstacks
|
||||
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops, () -> {
|
||||
+ final LivingEntity entityliving = this.getKillCredit();
|
||||
+ if (this.deathScore >= 0 && entityliving != null) {
|
||||
+ entityliving.awardKillScore(this, this.deathScore, source);
|
||||
+ }
|
||||
+ });
|
||||
+ // Paper end
|
||||
this.postDeathDropItems(deathEvent); // Paper
|
||||
this.drops = new ArrayList<>();
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index b41e6fb0b7e02b50e5ad05555ed911d09055d694..c5e9273055ff7302941b7475d8175be53eaece1f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
|
@ -102,10 +136,27 @@ index b41e6fb0b7e02b50e5ad05555ed911d09055d694..c5e9273055ff7302941b7475d8175be5
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 4c2ebb2eb93c1f8a805dbe0919f9726ccb4fff1f..54aa3a95118176e7f91f4d669253790167fcd958 100644
|
||||
index bf7c61c767bdfe8ddb63367f1b38dbbeba17ba02..4533988489fa2af009ffab95314a2a34344d0b87 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -827,7 +827,8 @@ public class CraftEventFactory {
|
||||
@@ -810,6 +810,11 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
+ // Paper start
|
||||
+ return CraftEventFactory.callEntityDeathEvent(victim, drops, com.google.common.util.concurrent.Runnables.doNothing());
|
||||
+ }
|
||||
+ public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops, Runnable lootCheck) {
|
||||
+ // Paper end
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
|
||||
populateFields(victim, event); // Paper - make cancellable
|
||||
@@ -823,11 +828,13 @@ public class CraftEventFactory {
|
||||
playDeathSound(victim, event);
|
||||
// Paper end
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
+ lootCheck.run(); // Paper - run advancement triggers before destroying the equipment stacks below
|
||||
|
||||
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
||||
if (stack == null || stack.getType() == Material.AIR || stack.getAmount() == 0) continue;
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ Adds CommandRegisteredEvent
|
|||
- Allows manipulating the CommandNode to add more children/metadata for the client
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 24465fa59dd9eeff82ad620731fadcb19910aa4e..053e65679dd44f3d1c669ef560f07554af09086b 100644
|
||||
index 1610d0c3ecb5fc06a160c3e1f05cb276bc80b73e..2955dc6db42ed1f057f6817e7ccae5be9f231585 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -16,6 +16,7 @@ repositories {
|
||||
@@ -12,6 +12,7 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
implementation(project(":Paper-API"))
|
||||
|
@ -61,10 +61,10 @@ index 880fc9fea286384d002518137972935fdf1d2d72..a59d14e61fcbca7861a5593d0717b812
|
|||
public boolean hasPermission(int level) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 07c4d909324c8aad3a8c5d27811e2c28fe7a91f3..96a33f63024c1f72ab018e15904505832430002c 100644
|
||||
index 1140325637868d60b80394016d936759b1edded1..341a0fb886daaffd885dfc448b93f084c98f0559 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -362,6 +362,7 @@ public class Commands {
|
||||
@@ -360,6 +360,7 @@ public class Commands {
|
||||
bukkit.add(node.getName());
|
||||
}
|
||||
// Paper start - Async command map building
|
||||
|
@ -72,7 +72,7 @@ index 07c4d909324c8aad3a8c5d27811e2c28fe7a91f3..96a33f63024c1f72ab018e1590450583
|
|||
MinecraftServer.getServer().execute(() -> {
|
||||
runSync(player, bukkit, rootcommandnode);
|
||||
});
|
||||
@@ -369,6 +370,7 @@ public class Commands {
|
||||
@@ -367,6 +368,7 @@ public class Commands {
|
||||
|
||||
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
|
||||
// Paper end - Async command map building
|
||||
|
@ -81,7 +81,7 @@ index 07c4d909324c8aad3a8c5d27811e2c28fe7a91f3..96a33f63024c1f72ab018e1590450583
|
|||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9fc196ada8dc3b9b9a8f3f35ac6b07c949ce2339..3071053aa9c6a9abc2af50b3c370a408cddbac85 100644
|
||||
index 34e8007b3e34a946749b3d900fbd8eb2955fac00..9e9edd4b649330c99a41372192e5051732204cc5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -759,8 +759,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index a482ad74b9a5d06a982ac2a6d9b6c5dc9f664f46..974f0bbbd3d271d28ce884490dc68b68849a07c3 100644
|
||||
index 2955dc6db42ed1f057f6817e7ccae5be9f231585..f7555720d22fdf642d36a1c0d8a9933ab3544b68 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -1,7 +1,9 @@
|
||||
|
@ -19,19 +19,7 @@ index a482ad74b9a5d06a982ac2a6d9b6c5dc9f664f46..974f0bbbd3d271d28ce884490dc68b68
|
|||
import java.util.Locale
|
||||
|
||||
plugins {
|
||||
@@ -12,6 +14,11 @@ plugins {
|
||||
|
||||
repositories {
|
||||
maven("https://libraries.minecraft.net/")
|
||||
+ // Paper start
|
||||
+ maven("https://maven.fabricmc.net/") {
|
||||
+ mavenContent { includeModule("net.fabricmc", "mapping-io") }
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -46,6 +53,8 @@ dependencies {
|
||||
@@ -42,6 +44,8 @@ dependencies {
|
||||
|
||||
implementation("io.netty:netty-all:4.1.65.Final") // Paper
|
||||
|
||||
|
@ -40,7 +28,7 @@ index a482ad74b9a5d06a982ac2a6d9b6c5dc9f664f46..974f0bbbd3d271d28ce884490dc68b68
|
|||
testImplementation("junit:junit:4.13.1")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
}
|
||||
@@ -95,6 +104,7 @@ relocation {
|
||||
@@ -91,6 +95,7 @@ relocation {
|
||||
|
||||
relocate("org.jline:jline-terminal-jansi", "org.jline" to cb("jline"))
|
||||
sequenceOf(
|
||||
|
@ -48,7 +36,7 @@ index a482ad74b9a5d06a982ac2a6d9b6c5dc9f664f46..974f0bbbd3d271d28ce884490dc68b68
|
|||
"commons-codec:commons-codec" to "org.apache.commons.codec",
|
||||
"commons-io:commons-io" to "org.apache.commons.io",
|
||||
//"it.unimi.dsi:fastutil" to "it.unimi", // Paper - don't relocate fastutil
|
||||
@@ -139,6 +149,45 @@ tasks.shadowJar {
|
||||
@@ -135,6 +140,45 @@ tasks.shadowJar {
|
||||
transform(ModifiedLog4j2PluginsCacheFileTransformer::class.java)
|
||||
}
|
||||
|
||||
|
@ -95,10 +83,10 @@ index a482ad74b9a5d06a982ac2a6d9b6c5dc9f664f46..974f0bbbd3d271d28ce884490dc68b68
|
|||
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 4bdc154ce5b91c3d5c4b5dc63ff32a7fe094bd37..e1d91a95c306e71ac77b3658de77ec9d18c4f8e6 100644
|
||||
index 6f0aba841a3518a36d17ab1e540376384952d2c2..beaa1976b3435176bdfbb9613be80f62bd3f3875 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -436,4 +436,9 @@ public class PaperConfig {
|
||||
@@ -437,4 +437,9 @@ public class PaperConfig {
|
||||
log("Async Chunks: Enabled - Chunks will be loaded much faster, without lag.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement Mob Goal API
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index f802d9e803b406cb9b5b4bce7de6858eba0fae7e..27f8a99f35a22f334e8023c1c9048e3a88a63d6f 100644
|
||||
index f7555720d22fdf642d36a1c0d8a9933ab3544b68..df0b06d0c582e9ec9f5dff74456e0ace64fc079f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -55,6 +55,7 @@ dependencies {
|
||||
@@ -46,6 +46,7 @@ dependencies {
|
||||
|
||||
implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
||||
|
||||
|
@ -798,7 +798,7 @@ index fabd20265863751ad980ee4a697f3f0d47df101f..3a4da2bb86a742985d309eb325dc843a
|
|||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1e34f8d2c3b14ed6a42930099d3130c4d589d48c..df5a9d6b1b8117080ede57f443dc79b875145461 100644
|
||||
index 4cb95a3757205d010ca652e79a12c596f433b300..73fbd6f092ecbc016d53588c4eafabfa3604a1b5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2570,5 +2570,11 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -13,10 +13,10 @@ A config is provided if you rather let players use these exploits, and let
|
|||
them destroy the worlds End Portals and get on top of the nether easy.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index e1d91a95c306e71ac77b3658de77ec9d18c4f8e6..c9bf57298c7023b2d609d5271609a4070bb1c773 100644
|
||||
index beaa1976b3435176bdfbb9613be80f62bd3f3875..d1d908e28f38e3749b96e42cf0aa3ab3fc654b5a 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -441,4 +441,15 @@ public class PaperConfig {
|
||||
@@ -442,4 +442,15 @@ public class PaperConfig {
|
||||
private static void loggerSettings() {
|
||||
deobfuscateStacktraces = getBoolean("settings.loggers.deobfuscate-stacktraces", deobfuscateStacktraces);
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option for console having all permissions
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index c9bf57298c7023b2d609d5271609a4070bb1c773..31e127151d2a046bf1652a909bc3ea64f95f2d1f 100644
|
||||
index d1d908e28f38e3749b96e42cf0aa3ab3fc654b5a..320b8481b84de4f76790217832a90ec2d58b32f3 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -452,4 +452,9 @@ public class PaperConfig {
|
||||
@@ -453,4 +453,9 @@ public class PaperConfig {
|
||||
config.set("settings.unsupported-settings.allow-permanent-block-break-exploits-readme", "This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.");
|
||||
allowBlockPermanentBreakingExploits = getBoolean("settings.unsupported-settings.allow-permanent-block-break-exploits", allowBlockPermanentBreakingExploits);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ so inline where possible, and avoid the abstraction of the
|
|||
Either class.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 89e88a1de65a5724d05e926cd41733c9cd6cd740..09d06ffb0d3c9920f80843c65e2d0831b9d94f95 100644
|
||||
index 24825d546c54f49b299905899df37965b2e4b5a8..6f92255c500b7b5e0062d37105cbeece7143fd27 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2118,15 +2118,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -34,15 +34,15 @@ index 89e88a1de65a5724d05e926cd41733c9cd6cd740..09d06ffb0d3c9920f80843c65e2d0831
|
|||
|
||||
private final class EntityCallbacks implements LevelCallback<Entity> {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
index 439f82a48e6f6ce7b4773505ced32324cacb302d..2a99aa989ac5c19d99bb3cbc0934425e46573cd7 100644
|
||||
index cd984c990f3fac8d968d522f45b8fdd116ed556d..eb105ed06c1611eeadd0e796b57ca3b12c545bd3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
@@ -48,7 +48,7 @@ public class ChunkPos {
|
||||
}
|
||||
|
||||
public static long asLong(BlockPos blockPos) {
|
||||
- return asLong(SectionPos.blockToSectionCoord(blockPos.getX()), SectionPos.blockToSectionCoord(blockPos.getZ()));
|
||||
+ return (((long)blockPos.getX() >> 4) & 4294967295L) | ((((long)blockPos.getZ() >> 4) & 4294967295L) << 32); // Paper - inline
|
||||
public static long asLong(BlockPos pos) {
|
||||
- return asLong(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ()));
|
||||
+ return (((long)pos.getX() >> 4) & 4294967295L) | ((((long)pos.getZ() >> 4) & 4294967295L) << 32); // Paper - inline
|
||||
}
|
||||
|
||||
public static int getX(long pos) {
|
||||
|
|
|
@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840
|
|||
This patch also fixes rail duping and carpet duping.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 31e127151d2a046bf1652a909bc3ea64f95f2d1f..db2aa6998ab7d2786bb455401f653eec724d53ba 100644
|
||||
index 320b8481b84de4f76790217832a90ec2d58b32f3..566c5823ff3851d4c677fdb8b0bf2b9918fd4c30 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -457,4 +457,12 @@ public class PaperConfig {
|
||||
@@ -458,4 +458,12 @@ public class PaperConfig {
|
||||
private static void consoleHasAllPermissions() {
|
||||
consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions);
|
||||
}
|
||||
|
|
|
@ -94,10 +94,10 @@ index 3df5031ec2c50dc6eb2533318cf8a98f21b03d2a..c971a534ded962e3be92c71059c75cc1
|
|||
|
||||
private void setupRecipeList(Container input, ItemStack stack) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ff2149572a82d6605a0b28f2fdd0dadb86af25a1..869990c181403a025d219dbd0e1201005973ffe9 100644
|
||||
index c976bd81d76124b8afd1e25305d51571f08ab3af..dc7d3f57c0e27c5948da66a2a1cacbf40c532e30 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1556,19 +1556,44 @@ public class CraftEventFactory {
|
||||
@@ -1562,19 +1562,44 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index fab8098ce72feb9b08960e55ab1a4aebaae22276..2e7d7bd60ac340568b1bc0f3052affcf445090f7 100644
|
||||
index 9c6ed2b6384edf8d507ec70852ea65d988528be6..cb7d46b31575c170dcbda4656b7520ccc2c699ff 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3359,7 +3359,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3381,7 +3381,7 @@ public abstract class LivingEntity extends Entity {
|
||||
Entity entity = this.getVehicle();
|
||||
|
||||
super.stopRiding(suppressCancellation); // Paper - suppress
|
||||
|
|
|
@ -9,7 +9,7 @@ itself, so the criterion object stores no references - and thus
|
|||
needs no cleanup.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
|
||||
index 584f48aba7bfec07a75b5a37da4ba7439610543c..c25c1cfca010ed625b6faf310be2edeccd6667bc 100644
|
||||
index 06fc39b19385d36fd0c5bb9a7042a238eb6e8a57..bb1f0e9dbcb792d015d1cb65664a96fdd3e0489e 100644
|
||||
--- a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
|
||||
+++ b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
|
||||
@@ -14,22 +14,24 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
|
@ -52,7 +52,7 @@ index 584f48aba7bfec07a75b5a37da4ba7439610543c..c25c1cfca010ed625b6faf310be2edec
|
|||
protected abstract T createInstance(JsonObject obj, EntityPredicate.Composite playerPredicate, DeserializationContext predicateDeserializer);
|
||||
@@ -50,7 +52,7 @@ public abstract class SimpleCriterionTrigger<T extends AbstractCriterionTriggerI
|
||||
|
||||
protected void trigger(ServerPlayer player, Predicate<T> tester) {
|
||||
protected void trigger(ServerPlayer player, Predicate<T> predicate) {
|
||||
PlayerAdvancements playerAdvancements = player.getAdvancements();
|
||||
- Set<CriterionTrigger.Listener<T>> set = this.players.get(playerAdvancements);
|
||||
+ Set<CriterionTrigger.Listener<T>> set = (Set) playerAdvancements.criterionData.get(this); // Paper - fix AdvancementDataPlayer leak
|
||||
|
@ -60,7 +60,7 @@ index 584f48aba7bfec07a75b5a37da4ba7439610543c..c25c1cfca010ed625b6faf310be2edec
|
|||
LootContext lootContext = EntityPredicate.createContext(player, player);
|
||||
List<CriterionTrigger.Listener<T>> list = null;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
index ce02a467c1c3434f2cdb112ceb9794196069a820..e05e5710c81b7dbb648afbfe16f843e7ae310752 100644
|
||||
index bd858a9da2f2442be85f36bb2de0dac46d0c68d7..3ff6995d34914720d353fdbe1aa981bfab9f6040 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -39,6 +39,7 @@ import net.minecraft.advancements.Criterion;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Incremental player saving
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 4b02a035cec0aa260e67f77c7025d2fb0e85f2eb..0b23250cbbfd947568afcb8c4510b7dea4468380 100644
|
||||
index 566c5823ff3851d4c677fdb8b0bf2b9918fd4c30..1b9919389cd32f55c20bb6fb38c88f6cfdc1d31c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -465,4 +465,14 @@ public class PaperConfig {
|
||||
@@ -466,4 +466,14 @@ public class PaperConfig {
|
||||
set("settings.unsupported-settings.allow-tnt-duplication", null);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ index 4b02a035cec0aa260e67f77c7025d2fb0e85f2eb..0b23250cbbfd947568afcb8c4510b7de
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 335d42592d99d91ae1d99fe1b99122a3bac97a49..968476493bcea8b4d961e838b142912d3eac91cd 100644
|
||||
index f37e55afee9486ec1884461a0a2b89f5204e7d00..2e36c2a9589c501a94451884bff9edfd4beda5fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -982,7 +982,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -54,7 +54,7 @@ index 335d42592d99d91ae1d99fe1b99122a3bac97a49..968476493bcea8b4d961e838b142912d
|
|||
} // Paper start
|
||||
for (ServerLevel level : this.getAllLevels()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 74b68679d311017246d49c37f3cd17f938f3b57f..d8df3bcf6ddd87e9fa932f01a41a48a641328f9d 100644
|
||||
index 2ee07e5bb5b4081870ae46ba322e0ec9a4dfe0ec..f2c7d4a07fded840ca67c1392afad07b88e9d31a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -175,6 +175,7 @@ public class ServerPlayer extends Player {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created
|
|||
Prevent headless pistons from being created by explosions or tree/mushroom growth.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 64ccc906fef2c0988c30d289c392b13221b9b4c1..6b725dc2217e68255286caad6a0820bcccffb6da 100644
|
||||
index 1b9919389cd32f55c20bb6fb38c88f6cfdc1d31c..8cc92129fd32aa94041cf99ec9a79231099047b8 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -465,6 +465,12 @@ public class PaperConfig {
|
||||
@@ -466,6 +466,12 @@ public class PaperConfig {
|
||||
set("settings.unsupported-settings.allow-tnt-duplication", null);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ the world per tick, this attempts to reduce the impact that join floods
|
|||
has on the server
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 6b725dc2217e68255286caad6a0820bcccffb6da..6733e78ba6bf2993bb2adde4cf9f1f6ca366679c 100644
|
||||
index 8cc92129fd32aa94041cf99ec9a79231099047b8..53fc241e9aab9d73e8807de9acf31c1531d92fde 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -481,4 +481,9 @@ public class PaperConfig {
|
||||
@@ -482,4 +482,9 @@ public class PaperConfig {
|
||||
maxPlayerAutoSavePerTick = (playerAutoSaveRate == -1 || playerAutoSaveRate > 100) ? 10 : 20;
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ index 6b725dc2217e68255286caad6a0820bcccffb6da..6733e78ba6bf2993bb2adde4cf9f1f6c
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 3faf9bc694016f3f46576a549814ff8e6070598a..7f6405ac44fef423dc8b21f3dbeaae26a1005077 100644
|
||||
index a3bfc12e34754dc5f8f53b968451a07f3a0ab496..aca6f642220de626983138270de67f161b1b1e76 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -37,6 +37,7 @@ import net.minecraft.network.protocol.Packet;
|
||||
|
|
|
@ -14,10 +14,10 @@ this breaks your workflow you can always force all scoreboards to be tracked wit
|
|||
settings.track-plugin-scoreboards in paper.yml.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 6733e78ba6bf2993bb2adde4cf9f1f6ca366679c..380c4f46b98e6296cf28568abb1e74a80278ffa0 100644
|
||||
index 53fc241e9aab9d73e8807de9acf31c1531d92fde..6b0dc60a1cfe8766924735698eb49defff0287ef 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -486,4 +486,9 @@ public class PaperConfig {
|
||||
@@ -487,4 +487,9 @@ public class PaperConfig {
|
||||
private static void maxJoinsPerTick() {
|
||||
maxJoinsPerTick = getInt("settings.max-joins-per-tick", 3);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index e1aa521a3947b38643866e038c7d0536658c58f2..a6cfc237fe5e06d43732dcd76b3a52a886ae8fe3 100644
|
||||
index 6113aaf4949427b0b5a1cc37013ac46fd93144fe..5143682786c6f046853f723f33bf904e54e8d6fa 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -93,6 +93,11 @@ public class PaperWorldConfig {
|
||||
|
@ -21,7 +21,7 @@ index e1aa521a3947b38643866e038c7d0536658c58f2..a6cfc237fe5e06d43732dcd76b3a52a8
|
|||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 368c80ac596b66396985521e6e8c6aee6af26697..7e0f711ded0ecf0b94a79f69a3d75c2afa57c5a9 100644
|
||||
index 8174e09d349ec8e01966ca902364eb155e4b8fca..8d34c99af7593c6dff45f8d2b21ae3e5836d6312 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1749,6 +1749,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
@ -61,10 +61,10 @@ index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422
|
|||
} else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 40964014376aa911f412f6a5b717c6cf523530ab..327199d0e002bb7e7c2194fb54c213e837dd8dd8 100644
|
||||
index cb7d46b31575c170dcbda4656b7520ccc2c699ff..21e5c87c3d2163f24f0497b4185cd4d971486960 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3277,7 +3277,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3299,7 +3299,7 @@ public abstract class LivingEntity extends Entity {
|
||||
return;
|
||||
}
|
||||
// Paper end - don't run getEntities if we're not going to use its result
|
||||
|
@ -73,7 +73,7 @@ index 40964014376aa911f412f6a5b717c6cf523530ab..327199d0e002bb7e7c2194fb54c213e8
|
|||
|
||||
if (!list.isEmpty()) {
|
||||
// Paper - move up
|
||||
@@ -3444,9 +3444,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3466,9 +3466,16 @@ public abstract class LivingEntity extends Entity {
|
||||
return !this.isRemoved() && this.collides; // CraftBukkit
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 380c4f46b98e6296cf28568abb1e74a80278ffa0..288310df8ca9eff6901d906b48ba7cd1b6bc8ae3 100644
|
||||
index 6b0dc60a1cfe8766924735698eb49defff0287ef..c8ed728440f263a97975688a41897039ee0667bc 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -355,6 +355,13 @@ public class PaperConfig {
|
||||
@@ -356,6 +356,13 @@ public class PaperConfig {
|
||||
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ index 380c4f46b98e6296cf28568abb1e74a80278ffa0..288310df8ca9eff6901d906b48ba7cd1
|
|||
public static boolean velocityOnlineMode;
|
||||
public static byte[] velocitySecretKey;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7cfdd686773b8ef67c99f3211c3ed2bf84fb54ea..7a4766d4fd86b6f0ab725955e364c631d37752b6 100644
|
||||
index 821dea72223e2d8eea804eacbfc35668304ec854..8a3013f5309a4fa67cdca3c516bfd03b1a01743a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -231,6 +231,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
|
|
@ -9,10 +9,10 @@ loss, which forces the server to lose the same precision as the client
|
|||
keeping them in sync.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 288310df8ca9eff6901d906b48ba7cd1b6bc8ae3..3a39180042a7753feba2262ad1a8fd6b92132846 100644
|
||||
index c8ed728440f263a97975688a41897039ee0667bc..fa9e4f77b9a30c2616bf942db92130f6989e7aa1 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -498,4 +498,9 @@ public class PaperConfig {
|
||||
@@ -499,4 +499,9 @@ public class PaperConfig {
|
||||
private static void trackPluginScoreboards() {
|
||||
trackPluginScoreboards = getBoolean("settings.track-plugin-scoreboards", false);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ index b30c08bfb8c55161543a4ef09f2e462e0a1fe4ae..ec93f5300cc7d423ec0d292f0f8443f9
|
|||
|
||||
public Vec3 updateEntityPosition(Vec3 orig) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 34b3e3a522dd8fd226cb32d1218f75092065c431..7b8e747a44d9a60f345154a9aee817b8d923b424 100644
|
||||
index 8d34c99af7593c6dff45f8d2b21ae3e5836d6312..2bf428255ea589ef845744affbfa1b4454afb1f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3785,6 +3785,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerTradeEvent and PlayerPurchaseEvent
|
|||
Co-authored-by: Alexander <protonull@protonmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index 4a7b657265cbbc91ae85409abb3db29cfc555a2c..c75fa3274dedfafa11b94704695a2313f11c22cc 100644
|
||||
index 4a7b657265cbbc91ae85409abb3db29cfc555a2c..a44c30370989c8a5ac5ad8e9f0062e76d8c33675 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -138,11 +138,24 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
|
@ -15,11 +15,11 @@ index 4a7b657265cbbc91ae85409abb3db29cfc555a2c..c75fa3274dedfafa11b94704695a2313
|
|||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void processTrade(MerchantOffer recipe, io.papermc.paper.event.player.PlayerPurchaseEvent event) { // The MerchantRecipe passed in here is the one set by the PlayerPurchaseEvent
|
||||
+ if (event.willIncreaseTradeUses()) {
|
||||
+ public void processTrade(MerchantOffer recipe, @Nullable io.papermc.paper.event.player.PlayerPurchaseEvent event) { // The MerchantRecipe passed in here is the one set by the PlayerPurchaseEvent
|
||||
+ if (event == null || event.willIncreaseTradeUses()) {
|
||||
+ recipe.increaseUses();
|
||||
+ }
|
||||
+ if (event.isRewardingExp()) {
|
||||
+ if (event == null || event.isRewardingExp()) {
|
||||
+ this.rewardTradeXp(recipe);
|
||||
+ }
|
||||
+ this.notifyTrade(recipe);
|
||||
|
@ -168,10 +168,10 @@ index dc036f6450b2eccdc848c66dac525ed43f70f4e4..549c13180fbbebce73771a8d82eb040f
|
|||
|
||||
return itemstack;
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/MerchantResultSlot.java b/src/main/java/net/minecraft/world/inventory/MerchantResultSlot.java
|
||||
index 74b28315197b81f80334ae6023113904e4fac4c3..9e65c9535e01b3c858050a7881aff3f99edbeaac 100644
|
||||
index 74b28315197b81f80334ae6023113904e4fac4c3..42b4bd526c3a083ae29f913f7f67eb7ee4d61fa7 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/MerchantResultSlot.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/MerchantResultSlot.java
|
||||
@@ -47,13 +47,30 @@ public class MerchantResultSlot extends Slot {
|
||||
@@ -47,13 +47,32 @@ public class MerchantResultSlot extends Slot {
|
||||
|
||||
@Override
|
||||
public void onTake(Player player, ItemStack stack) {
|
||||
|
@ -180,18 +180,20 @@ index 74b28315197b81f80334ae6023113904e4fac4c3..9e65c9535e01b3c858050a7881aff3f9
|
|||
MerchantOffer merchantOffer = this.slots.getActiveOffer();
|
||||
+ // Paper start
|
||||
+ io.papermc.paper.event.player.PlayerPurchaseEvent event = null;
|
||||
+ if (this.merchant instanceof net.minecraft.world.entity.npc.AbstractVillager && this.merchant.getTradingPlayer().getBukkitEntity() instanceof org.bukkit.entity.Player) {
|
||||
+ event = new io.papermc.paper.event.player.PlayerTradeEvent((org.bukkit.entity.Player) this.merchant.getTradingPlayer().getBukkitEntity(), (org.bukkit.entity.AbstractVillager) ((net.minecraft.world.entity.npc.AbstractVillager) this.merchant).getBukkitEntity(), merchantOffer.asBukkit(), true, true);
|
||||
+ } else if (this.merchant instanceof org.bukkit.craftbukkit.inventory.CraftMerchantCustom.MinecraftMerchant && this.merchant.getTradingPlayer().getBukkitEntity() instanceof org.bukkit.entity.Player) {
|
||||
+ event = new io.papermc.paper.event.player.PlayerPurchaseEvent((org.bukkit.entity.Player) this.merchant.getTradingPlayer().getBukkitEntity(), merchantOffer.asBukkit(), false, true);
|
||||
+ }
|
||||
+ if (event != null) {
|
||||
+ if (!event.callEvent()) {
|
||||
+ stack.setCount(0);
|
||||
+ event.getPlayer().updateInventory();
|
||||
+ return;
|
||||
+ if (merchantOffer != null && player instanceof net.minecraft.server.level.ServerPlayer serverPlayer) {
|
||||
+ if (this.merchant instanceof net.minecraft.world.entity.npc.AbstractVillager villager) {
|
||||
+ event = new io.papermc.paper.event.player.PlayerTradeEvent(serverPlayer.getBukkitEntity(), (org.bukkit.entity.AbstractVillager) villager.getBukkitEntity(), merchantOffer.asBukkit(), true, true);
|
||||
+ } else if (this.merchant instanceof org.bukkit.craftbukkit.inventory.CraftMerchantCustom.MinecraftMerchant) {
|
||||
+ event = new io.papermc.paper.event.player.PlayerPurchaseEvent(serverPlayer.getBukkitEntity(), merchantOffer.asBukkit(), false, true);
|
||||
+ }
|
||||
+ if (event != null) {
|
||||
+ if (!event.callEvent()) {
|
||||
+ stack.setCount(0);
|
||||
+ event.getPlayer().updateInventory();
|
||||
+ return;
|
||||
+ }
|
||||
+ merchantOffer = org.bukkit.craftbukkit.inventory.CraftMerchantRecipe.fromBukkit(event.getTrade()).toMinecraft();
|
||||
+ }
|
||||
+ merchantOffer = org.bukkit.craftbukkit.inventory.CraftMerchantRecipe.fromBukkit(event.getTrade()).toMinecraft();
|
||||
+ }
|
||||
+ this.checkTakeAchievements(stack);
|
||||
+ // Paper end
|
||||
|
@ -205,19 +207,19 @@ index 74b28315197b81f80334ae6023113904e4fac4c3..9e65c9535e01b3c858050a7881aff3f9
|
|||
this.slots.setItem(0, itemStack);
|
||||
this.slots.setItem(1, itemStack2);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/trading/Merchant.java b/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
index 50dca0d86dbc47f66ba2d2f262e8587853cc6f9e..f11eff88ba4b9a4f8601d70c07907cc12611a1d0 100644
|
||||
index 50dca0d86dbc47f66ba2d2f262e8587853cc6f9e..7444800ff6e0807762001399907cfbd361d7f3eb 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
@@ -21,6 +21,7 @@ public interface Merchant {
|
||||
|
||||
void overrideOffers(MerchantOffers offers);
|
||||
|
||||
+ default void processTrade(MerchantOffer merchantRecipe, io.papermc.paper.event.player.PlayerPurchaseEvent event) { this.notifyTrade(merchantRecipe); } // Paper
|
||||
+ default void processTrade(MerchantOffer merchantRecipe, @Nullable io.papermc.paper.event.player.PlayerPurchaseEvent event) { this.notifyTrade(merchantRecipe); } // Paper
|
||||
void notifyTrade(MerchantOffer offer);
|
||||
|
||||
void notifyTradeUpdated(ItemStack stack);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
|
||||
index f40d6a0048ad5b3f6e31d83894ee89f5ca64fb3a..22a64092e3b925e852b304376fe0a7c19acf35d0 100644
|
||||
index f40d6a0048ad5b3f6e31d83894ee89f5ca64fb3a..eb938890132b9e72204b7f862c4d0a734f7d9924 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
|
||||
@@ -79,10 +79,25 @@ public class CraftMerchantCustom extends CraftMerchant {
|
||||
|
@ -226,13 +228,13 @@ index f40d6a0048ad5b3f6e31d83894ee89f5ca64fb3a..22a64092e3b925e852b304376fe0a7c1
|
|||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void processTrade(MerchantOffer merchantRecipe, io.papermc.paper.event.player.PlayerPurchaseEvent event) { // The MerchantRecipe passed in here is the one set by the PlayerPurchaseEvent
|
||||
+ public void processTrade(MerchantOffer merchantRecipe, @javax.annotation.Nullable io.papermc.paper.event.player.PlayerPurchaseEvent event) { // The MerchantRecipe passed in here is the one set by the PlayerPurchaseEvent
|
||||
+ /** Based on {@link net.minecraft.world.entity.npc.AbstractVillager#processTrade(MerchantOffer, io.papermc.paper.event.player.PlayerPurchaseEvent)} */
|
||||
+ if (getTradingPlayer() instanceof net.minecraft.server.level.ServerPlayer) {
|
||||
+ if (event.willIncreaseTradeUses()) {
|
||||
+ if (event == null || event.willIncreaseTradeUses()) {
|
||||
+ merchantRecipe.increaseUses();
|
||||
+ }
|
||||
+ if (event.isRewardingExp()) {
|
||||
+ if (event == null || event.isRewardingExp()) {
|
||||
+ this.tradingWorld.addFreshEntity(new net.minecraft.world.entity.ExperienceOrb(tradingWorld, tradingPlayer.getX(), tradingPlayer.getY(), tradingPlayer.getZ(), merchantRecipe.getXp(), org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.tradingPlayer, null));
|
||||
+ }
|
||||
+ }
|
||||
|
|
|
@ -32,10 +32,10 @@ index 51723c8f740c7b0bbd15acc0f1c848790c2ff299..5a95b550c767284563c124df1ff45322
|
|||
} else {
|
||||
ItemStack itemstack = tileentitydispenser.getItem(i);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index aaefea1af4086e74f356bbb09b130a9845fa82f1..31445c2e888d3020c1cba01f208fd60e424fb173 100644
|
||||
index aeba8355da7cbe8595b403ea660869d01ae08350..92d970961ea7be9577d7fad452deeeadc535c96b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1830,4 +1830,12 @@ public class CraftEventFactory {
|
||||
@@ -1836,4 +1836,12 @@ public class CraftEventFactory {
|
||||
EntitiesUnloadEvent event = new EntitiesUnloadEvent(new CraftChunk((ServerLevel) world, coords.x, coords.z), bukkitEntities);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@ index 501a5483160dba050261bb3448317a097cdb7ef2..2dcac4b638073aa1748f26f61219dbf9
|
|||
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 70452799bb3436fdb11462f77097ee52d1139f0d..db6b057eb6b0f08f7fcb998f8b646b757a98d3f6 100644
|
||||
index 59791b45abe1984c93d2b3b54b67011bbb33086b..a921d98d2bc35e59e948893b2cb034b009db4753 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1848,5 +1848,11 @@ public class CraftEventFactory {
|
||||
@@ -1854,5 +1854,11 @@ public class CraftEventFactory {
|
||||
io.papermc.paper.event.block.BlockFailedDispenseEvent event = new io.papermc.paper.event.block.BlockFailedDispenseEvent(block);
|
||||
return event.callEvent();
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add dropLeash variable to EntityUnleashEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 976dbf40292b10364f9e80bebe96ec9c4dfb657e..c375081e02925da6085a2d433bfc2c3719770f78 100644
|
||||
index 62d296ac82d322f3574021f54779dbb10954397e..79ca304ee934e29145f7fa2fa06cbdc3ba67d54d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1213,12 +1213,15 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1219,12 +1219,15 @@ public abstract class Mob extends LivingEntity {
|
||||
return InteractionResult.PASS;
|
||||
} else if (this.getLeashHolder() == player) {
|
||||
// CraftBukkit start - fire PlayerUnleashEntityEvent
|
||||
|
@ -26,7 +26,7 @@ index 976dbf40292b10364f9e80bebe96ec9c4dfb657e..c375081e02925da6085a2d433bfc2c37
|
|||
return InteractionResult.sidedSuccess(this.level.isClientSide);
|
||||
} else {
|
||||
InteractionResult enuminteractionresult = this.checkAndHandleImportantInteractions(player, hand);
|
||||
@@ -1376,8 +1379,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1382,8 +1385,11 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (this.leashHolder != null) {
|
||||
if (!this.isAlive() || !this.leashHolder.isAlive()) {
|
||||
|
@ -40,7 +40,7 @@ index 976dbf40292b10364f9e80bebe96ec9c4dfb657e..c375081e02925da6085a2d433bfc2c37
|
|||
}
|
||||
|
||||
}
|
||||
@@ -1440,8 +1446,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1446,8 +1452,11 @@ public abstract class Mob extends LivingEntity {
|
||||
boolean flag1 = super.startRiding(entity, force);
|
||||
|
||||
if (flag1 && this.isLeashed()) {
|
||||
|
@ -54,7 +54,7 @@ index 976dbf40292b10364f9e80bebe96ec9c4dfb657e..c375081e02925da6085a2d433bfc2c37
|
|||
}
|
||||
|
||||
return flag1;
|
||||
@@ -1611,8 +1620,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1617,8 +1626,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@Override
|
||||
protected void removeAfterChangingDimensions() {
|
||||
super.removeAfterChangingDimensions();
|
||||
|
@ -122,10 +122,10 @@ index b9b67134f02fd7484ed19905c9ae1f9b8a26ce26..c05f173b7642380900fdd77ce5d2c020
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index db6b057eb6b0f08f7fcb998f8b646b757a98d3f6..33a8e174c4e3b3b5164157c90c8f5b5f9c6d8263 100644
|
||||
index a921d98d2bc35e59e948893b2cb034b009db4753..ae3ee371530a52d9a2b12e5c18fd85f6da6fc2de 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1489,8 +1489,10 @@ public class CraftEventFactory {
|
||||
@@ -1495,8 +1495,10 @@ public class CraftEventFactory {
|
||||
return itemInHand;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] EntityMoveEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d37b14523dd2a0e6412449001c7876bd27bf760e..f3976a53514249e64d91075ec2e620e4c7cef37f 100644
|
||||
index 13d3e1a07ea4ac2ef0f043486181daf23633cb32..3704d4b00a819c4d23b1c77c3e61958b45bba85c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1527,6 +1527,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -17,7 +17,7 @@ index d37b14523dd2a0e6412449001c7876bd27bf760e..f3976a53514249e64d91075ec2e620e4
|
|||
|
||||
this.profiler.push(() -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 073dbf69b5b58c4351110d28491e7feb2e47081c..c58b0de1cf1c51ceb0a0ecc145f4a98929521934 100644
|
||||
index ec583ee3b9e0ffed230f219283e384035e73828d..09474f7e973563585e102cc839ab6842a3a10c0c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -197,6 +197,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -29,10 +29,10 @@ index 073dbf69b5b58c4351110d28491e7feb2e47081c..c58b0de1cf1c51ceb0a0ecc145f4a989
|
|||
return new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e3d8557733e20a51bb71d9c968f4f12cc3192624..8ce983822ab44ade6306b52cad352ad95f6d6bad 100644
|
||||
index 21e5c87c3d2163f24f0497b4185cd4d971486960..b04d3b86931f3c0b6560a4af8f3793d0a19a317f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3223,6 +3223,20 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3245,6 +3245,20 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
this.pushEntities();
|
||||
this.level.getProfiler().pop();
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add support for hex color codes in console
|
|||
Converts upstream's hex color code legacy format into actual hex color codes in the console.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 57edac376bcbd056fb8fc7f0a433e946bce4ff2e..f3db86346c5e7bf446707a746f3094f7f27e09c4 100644
|
||||
index df0b06d0c582e9ec9f5dff74456e0ace64fc079f..a744a8e5917ded1488f377d3ed2c30c41132a03d 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -34,6 +34,7 @@ dependencies {
|
||||
@@ -25,6 +25,7 @@ dependencies {
|
||||
Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
||||
*/
|
||||
implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Enhance console tab completions for brigadier commands
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 4e824a87b463a417c204a9ee188450bdd9f4fbc2..ef1e6e898b3cb9d012b2cf24aedffea4afce8a38 100644
|
||||
index fa9e4f77b9a30c2616bf942db92130f6989e7aa1..c907e0447f52e625fe31184349038e213c565c74 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -503,4 +503,11 @@ public class PaperConfig {
|
||||
@@ -504,4 +504,11 @@ public class PaperConfig {
|
||||
private static void fixEntityPositionDesync() {
|
||||
fixEntityPositionDesync = getBoolean("settings.fix-entity-position-desync", fixEntityPositionDesync);
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ till their item is switched.
|
|||
This patch clears the active item when the event is cancelled
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 8ce983822ab44ade6306b52cad352ad95f6d6bad..b84e20cd955fd75582a2c52f0c571d54ead555b2 100644
|
||||
index b04d3b86931f3c0b6560a4af8f3793d0a19a317f..2ec47f83ab238edbd9abe7efded86852329bce95 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3702,6 +3702,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3724,6 +3724,7 @@ public abstract class LivingEntity extends Entity {
|
||||
level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make item validations configurable
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 247c172c3b722cb1b753fd92839ab427233d7a13..939744ef6850d4e59e5c94bc4781d045041b977d 100644
|
||||
index c907e0447f52e625fe31184349038e213c565c74..c0d5eaf617f5c1a814986a9954b16bb59b3616fa 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -510,4 +510,19 @@ public class PaperConfig {
|
||||
@@ -511,4 +511,19 @@ public class PaperConfig {
|
||||
enableBrigadierConsoleHighlighting = getBoolean("settings.console.enable-brigadier-highlighting", enableBrigadierConsoleHighlighting);
|
||||
enableBrigadierConsoleCompletions = getBoolean("settings.console.enable-brigadier-completions", enableBrigadierConsoleCompletions);
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Line Of Sight Changes
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b84e20cd955fd75582a2c52f0c571d54ead555b2..a60d289f3cf3826ac5368f3de77584fb63bf5e64 100644
|
||||
index 2ec47f83ab238edbd9abe7efded86852329bce95..692bef7e1c0350c826a2961217e9c0f96c1eec70 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3430,7 +3430,8 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3452,7 +3452,8 @@ public abstract class LivingEntity extends Entity {
|
||||
Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ());
|
||||
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
|
||||
|
||||
|
@ -42,7 +42,7 @@ index 483ca752016c0d5e669b462396e50e83b66d3ef1..6a4c379a2905455b14c3cbd4a46a0f95
|
|||
|
||||
private static final Random rand = new Random();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 20e619baa4bce6a133ade5e5d6a6f04f49a1b176..1c684244213d04b36589dd50ea66052a9cdad072 100644
|
||||
index ee63e6a650f93c973ffb2034e04b974cc1350540..675faa296d4da33db9fce9625d480a79103ffa10 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -29,6 +29,9 @@ import net.minecraft.world.entity.projectile.ThrownEgg;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add git branch and commit to manifest
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 1e4e3c6fbac820fa03e2a6f5d76c008d5879d2e6..c7ebad49e04c36c27341cabc4a024f170d762f3f 100644
|
||||
index a744a8e5917ded1488f377d3ed2c30c41132a03d..35266258f7eddba51a6e2b334046954213d88237 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -69,6 +69,7 @@ tasks.jar {
|
||||
@@ -60,6 +60,7 @@ tasks.jar {
|
||||
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
||||
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
|
||||
|
@ -16,7 +16,7 @@ index 1e4e3c6fbac820fa03e2a6f5d76c008d5879d2e6..c7ebad49e04c36c27341cabc4a024f17
|
|||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
@@ -78,6 +79,8 @@ tasks.jar {
|
||||
@@ -69,6 +70,8 @@ tasks.jar {
|
||||
"Specification-Version" to project.version,
|
||||
"Specification-Vendor" to "Bukkit Team",
|
||||
"Multi-Release" to "true", // Paper
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add a bunch of missing forceDrop toggles
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index c375081e02925da6085a2d433bfc2c3719770f78..a8e5be1c941755b3e5b335d8211ca70a6c6fc32f 100644
|
||||
index 79ca304ee934e29145f7fa2fa06cbdc3ba67d54d..19acb348bdb950ffeb3803feec24245699a2b4fc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1474,7 +1474,9 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1480,7 +1480,9 @@ public abstract class Mob extends LivingEntity {
|
||||
}
|
||||
|
||||
if (this.tickCount > 100) {
|
||||
|
|
|
@ -17,7 +17,7 @@ index 81f4f26a6b83079d36acd1fd86dede0eb1116c01..59437f04911662f06596ef61b91017ca
|
|||
|
||||
public static <K, V> Collector<Entry<? extends K, ? extends V>, ?, Map<K, V>> toMap() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 38e8d8c7d37fc824323dac372c56550480360515..1018f4640bab5876c5e0afb5b88f71437fb79662 100644
|
||||
index eda7e3ee1f44eb0677a357fb06c59a8954986fc1..df3459ecd78b915f8f1b2b9825fc5e423cd332b6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1321,7 +1321,7 @@ public abstract class LivingEntity extends Entity {
|
||||
|
@ -44,7 +44,7 @@ index 38e8d8c7d37fc824323dac372c56550480360515..1018f4640bab5876c5e0afb5b88f7143
|
|||
d0 = (Math.random() - Math.random()) * 0.01D;
|
||||
}
|
||||
|
||||
@@ -2086,7 +2087,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2108,7 +2109,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
|
||||
Entity entity = damagesource.getDirectEntity();
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make EntityUnleashEvent cancellable
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index a8e5be1c941755b3e5b335d8211ca70a6c6fc32f..bada11542390b7575466f0e7062470665b8266c4 100644
|
||||
index 19acb348bdb950ffeb3803feec24245699a2b4fc..6cde7bde7a8675b9956e2eb420250e740379c3c3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1448,7 +1448,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1454,7 +1454,7 @@ public abstract class Mob extends LivingEntity {
|
||||
if (flag1 && this.isLeashed()) {
|
||||
// Paper start - drop leash variable
|
||||
EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN, true);
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Wed, 18 Aug 2021 12:02:02 -0500
|
||||
Subject: [PATCH] Set AsyncAppender dispatch thread to be a daemon thread
|
||||
|
||||
This diff will be included in the not yet released Log4j 2.14.2. When Log4j 2.14.2 is released this patch should be dropped in favor of bumping Log4j.
|
||||
|
||||
diff --git a/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppenderEventDispatcher.java b/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppenderEventDispatcher.java
|
||||
index a01f68db840b6e953fa6908ad10cd25744be6471..d406c3d38059b1e4012ca5ebd938b8a6f8ce152f 100644
|
||||
--- a/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppenderEventDispatcher.java
|
||||
+++ b/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppenderEventDispatcher.java
|
||||
@@ -50,6 +50,7 @@ class AsyncAppenderEventDispatcher extends Log4jThread {
|
||||
final List<AppenderControl> appenders,
|
||||
final BlockingQueue<LogEvent> queue) {
|
||||
super("AsyncAppenderEventDispatcher-" + THREAD_COUNTER.incrementAndGet() + "-" + name);
|
||||
+ this.setDaemon(true); // Paper - Backport change from not yet released Log4j 2.14.2
|
||||
this.errorAppender = errorAppender;
|
||||
this.appenders = appenders;
|
||||
this.queue = queue;
|
|
@ -30,7 +30,7 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b
|
|||
private RedirectModifier<S> modifier = null;
|
||||
private boolean forks;
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 816ea85a5880123c970d227d61426a0ae2b9539f..b7c24a7ff4dc50d03f74b21a0b353d0ce559b4d4 100644
|
||||
index e269bc8f6282a73ceac6e8aec8652fe2b685adab..0766f272068248175bc929a145bafaf9efc8978d 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -204,6 +204,13 @@ public class Commands {
|
|
@ -10,7 +10,7 @@ schedules. Effectively, use the callback executor as a tool of
|
|||
finding issues rather than hiding these issues.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 047f1772c8f9346ba4541d46af8e144141865cfb..173c9d06b28db3e776c762903a0409234c08b13c 100644
|
||||
index dc1aca025a6e54ee0d494e20a4a72ac6a6c976fb..ba1c55c4f2486cae25ce570132d9222f6ab77d49 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -154,17 +154,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
@ -9,7 +9,7 @@ chunk through it. This should also be OK from a leak prevention/
|
|||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index f8c0574137cab33d0b5efe5d532efb132dcb914a..80f59abeb0081fe4784f3c0d027e8dfce752814b 100644
|
||||
index 43a740eb644629bf88d60d7ab559793a1965f9d8..ac3ef76f0db5a2d0f02b5e48a8bf511d9b0104d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1292,9 +1292,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -28,7 +28,7 @@ index f8c0574137cab33d0b5efe5d532efb132dcb914a..80f59abeb0081fe4784f3c0d027e8dfc
|
|||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 9b02f054493ad69c7a595374e6fd600c3d64e61e..e40587b9c13d9170ef5dd0811e96b02ecaccebb2 100644
|
||||
index 80f7ff6117d15d1e0f19a497a8a2172a75d14734..bb7185009ece552baeba6de72166eb22a39ccbed 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1562,6 +1562,18 @@ public class ServerPlayer extends Player {
|
|
@ -8,7 +8,7 @@ cause a recursive call which would handle the increase but then
|
|||
the caller would think the chunk would be unloaded.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 823451570e02ee75bfce1c106779a0502187fcea..d4ea81824acdc1220616b24ea0f465db97f4a343 100644
|
||||
index 6df2167204ef1a8e9ad1d8b1e73df762f0523fa3..b4f8e67b1e4d1ea481d4270597fff86d7faf1bd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -619,8 +619,10 @@ public class ChunkHolder {
|
|
@ -10,7 +10,7 @@ chunk future to complete. We can simply schedule to the immediate
|
|||
executor to get this effect, rather than the main mailbox.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index dcb5b1022eb72c50dc1df3654b0c9db7c782517c..efaab00b73f48e267a033a4ef466dcbaf2af2044 100644
|
||||
index fe15f8fdb886674278513c5fdbf17f066c9f0b4f..19bd06be74f144393be6aa6e392d60c88bdb1c2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1451,9 +1451,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
@ -8,7 +8,7 @@ This WILL cause state corruption if it happens. So, don't
|
|||
allow it.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index d4ea81824acdc1220616b24ea0f465db97f4a343..b0a6eb7846580489e0476e69565676e77fd224cd 100644
|
||||
index b4f8e67b1e4d1ea481d4270597fff86d7faf1bd5..dd18ee4ac478d64fca7b311148a85507232e602f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -599,7 +599,13 @@ public class ChunkHolder {
|
|
@ -46,7 +46,7 @@ index 8703f97dc2f392b136c6851aa09b607cbfdfa5de..ade010fe3b62a4624b009c6d665e9909
|
|||
exception.printStackTrace();
|
||||
ServerInternalException.reportInternalException(exception); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java b/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||
index af8a555c777b5abbaa2615d2ff03f03a9a93847e..b794c02ea36bdc901b1f6a160095abb3fcfe9b60 100644
|
||||
index b1a65ec9258a3a74ef29e7856870132b1097f566..83ed842325c30dc3d62af697db87fe95b38a400d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
|
||||
@@ -348,6 +348,12 @@ public class LevelStorageSource {
|
||||
|
@ -164,15 +164,15 @@ index 87705fc8ee32016bf5ca533eb278bf32df08d3a3..b9bcbcf509ebb59d15082ce0faef8e40
|
|||
private static void convertRegion(RegistryAccess.RegistryHolder registryManager, File directory, File file, BiomeSource biomeSource, int i, int j, ProgressListener progressListener) {
|
||||
String string = file.getName();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java b/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java
|
||||
index 4d0af984490b556a9911c3b8fdca1e168e6fe932..c20e5d69b4ad8adcdaffb56e4e2a24596ae16edf 100644
|
||||
index c85edd7e06720c7a116c6842e47223d593b78130..68ce6c0d6ef46462200eb05026cbc6b50b366319 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java
|
||||
@@ -212,7 +212,7 @@ public class PrimaryLevelData implements ServerLevelData, WorldData {
|
||||
levelTag.putUUID("WanderingTraderId", this.wanderingTraderId);
|
||||
levelNbt.putUUID("WanderingTraderId", this.wanderingTraderId);
|
||||
}
|
||||
|
||||
- levelTag.putString("Bukkit.Version", Bukkit.getName() + "/" + Bukkit.getVersion() + "/" + Bukkit.getBukkitVersion()); // CraftBukkit
|
||||
+ if (Bukkit.getServer() != null) levelTag.putString("Bukkit.Version", Bukkit.getName() + "/" + Bukkit.getVersion() + "/" + Bukkit.getBukkitVersion()); // CraftBukkit // Paper - server may not be started yet
|
||||
- levelNbt.putString("Bukkit.Version", Bukkit.getName() + "/" + Bukkit.getVersion() + "/" + Bukkit.getBukkitVersion()); // CraftBukkit
|
||||
+ if (Bukkit.getServer() != null) levelNbt.putString("Bukkit.Version", Bukkit.getName() + "/" + Bukkit.getVersion() + "/" + Bukkit.getBukkitVersion()); // CraftBukkit // Paper - server may not be started yet
|
||||
}
|
||||
|
||||
@Override
|
|
@ -3843,7 +3843,7 @@ index d8be2ad889f46491e50404916fb4ae0de5f42098..29ba097a7b230ef67d4d1b5f4ebe20cd
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index b0a6eb7846580489e0476e69565676e77fd224cd..54822e418e319db551bfea3218d00faf0e043f43 100644
|
||||
index dd18ee4ac478d64fca7b311148a85507232e602f..a9267e64e54f451c896e35693f469b8563f578f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -55,7 +55,7 @@ public class ChunkHolder {
|
||||
|
@ -3856,7 +3856,7 @@ index b0a6eb7846580489e0476e69565676e77fd224cd..54822e418e319db551bfea3218d00faf
|
|||
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
|
||||
public int oldTicketLevel;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index efaab00b73f48e267a033a4ef466dcbaf2af2044..aae8dca773686bec3f867b79aa11d668032b9244 100644
|
||||
index 19bd06be74f144393be6aa6e392d60c88bdb1c2d..0006b8af2f9f774068ed5b8c906fe9b9383666e1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -121,7 +121,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
@ -4196,7 +4196,7 @@ index 41ddcf6775f99c56cf4b13b284420061e5dd6bdc..ae46429264e6a7e5c88b6b6a41a6df4d
|
|||
public static <T> TicketType<T> create(String name, Comparator<T> argumentComparator) {
|
||||
return new TicketType<>(name, argumentComparator, 0L);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index b534fd9e5d2a17926282cf40c9d66a2143a37bfe..4a7fdea6a5f966db444dc41f7215faa99e3820b3 100644
|
||||
index 2f35e145de9cd5a065eb6e6a0996afb78291bd62..b1b4dad73b69180cb4c3344e4a5e7e49bb467f62 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -643,6 +643,7 @@ public abstract class BlockBehaviour {
|
|
@ -914,7 +914,7 @@ index 0000000000000000000000000000000000000000..3ba094e640d7fe7803e2bbdab8ff3beb
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ac3ef76f0db5a2d0f02b5e48a8bf511d9b0104d4..5c588c39de11bbabdc2f50ef4204007c622fdc6a 100644
|
||||
index 47a73be0451150fd37d921f5e4bae46f994d18c3..573cde2be4155e2dc2332e73a865c0f513420904 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -437,7 +437,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -927,7 +927,7 @@ index ac3ef76f0db5a2d0f02b5e48a8bf511d9b0104d4..5c588c39de11bbabdc2f50ef4204007c
|
|||
int j = this.spigotConfig.viewDistance; // Spigot
|
||||
PersistentEntitySectionManager persistententitysectionmanager = this.entityManager;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
index 0f6b534a4c789a2f09f6c4624e5d58b99c7ed0e6..21d1e0c9c471e9e556b5bd70166a769b46105c7a 100644
|
||||
index 023702c616366ebb1c4f9ac80d4eccaa7fa5c9de..cf1cb0996bb06ae7cf56e0ecf0c01f03da7fdd83 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
@@ -77,6 +77,23 @@ public class WorldGenRegion implements WorldGenLevel {
|
||||
|
@ -951,9 +951,9 @@ index 0f6b534a4c789a2f09f6c4624e5d58b99c7ed0e6..21d1e0c9c471e9e556b5bd70166a769b
|
|||
+ public <T> void getEntitiesByClass(Class<? extends T> clazz, Entity except, AABB box, List<? super T> into, Predicate<? super T> predicate) {}
|
||||
+ // Paper end
|
||||
+
|
||||
public WorldGenRegion(ServerLevel world, List<ChunkAccess> list, ChunkStatus chunkstatus, int i) {
|
||||
public WorldGenRegion(ServerLevel world, List<ChunkAccess> list, ChunkStatus chunkstatus, int placementRadius) {
|
||||
this.generatingStatus = chunkstatus;
|
||||
this.writeRadiusCutoff = i;
|
||||
this.writeRadiusCutoff = placementRadius;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e9eacba3816ff3b76c51e9d3011c739b24864355..b7b802053c48c740161747c89cc55ade80094cb7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
|
@ -1077,7 +1077,7 @@ index 325e244c46ec208a2e7e18d71ccbbfcc25fc1bce..94130509e3a7980c378cc95c46821cf0
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index d0cfa782498eca8a13ce7d7f28d5e55ae4e402fa..1dd2e968bde16da2d2da63ca3c30515e1fd5b620 100644
|
||||
index 1d5eee4bf026a97feb066c5b25d597381d92cef7..d88ce89dadaa7bd25cdd58dd4ec4592f30c311ce 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -204,6 +204,50 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
@ -926,7 +926,7 @@ index 0000000000000000000000000000000000000000..d67a40e7be030142443680c89e1763fc
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index e40587b9c13d9170ef5dd0811e96b02ecaccebb2..52ffc39715def70a8ad3a99356be19bea5ef892b 100644
|
||||
index bb7185009ece552baeba6de72166eb22a39ccbed..d0a6da33bb9152b6fafe6b3a788817d523c1fe49 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -419,7 +419,7 @@ public class ServerPlayer extends Player {
|
||||
|
@ -961,7 +961,7 @@ index 450dd486269450be88c9a9a4d895184199e655aa..9b6770a41d272eea4b0a1d2076c936af
|
|||
}
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 74fcc1b45a9e57280da82f7c181530d4183872a5..481e84fda6dccfaf684c922a12fa19ed35c87b3c 100644
|
||||
index b7b802053c48c740161747c89cc55ade80094cb7..880723e59e4ca52d7b30a4dcad3b929e86128d2a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1025,9 +1025,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
@ -1229,7 +1229,7 @@ index 94130509e3a7980c378cc95c46821cf0fc753ce6..7224c56e8a68870364c6538c82c04f37
|
|||
if (true || entityx.getBoundingBox().intersects(aABB)) { // Paper - always true
|
||||
if (entity == null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 4a7fdea6a5f966db444dc41f7215faa99e3820b3..d87f8d106834678364f8720447d671de60c2454e 100644
|
||||
index b1b4dad73b69180cb4c3344e4a5e7e49bb467f62..83d813025efca5846538e36508a5d4fe38b02108 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -685,7 +685,7 @@ public abstract class BlockBehaviour {
|
|
@ -22,7 +22,7 @@ index 807bbe54f6516f794bdcb735bb7b8d6812e3ef01..2ef4b4c2ff81d0fa33d4630593266066
|
|||
continue;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index 436ea61d284120a43123709f0213ec56870147dc..d2ea11d35ea111c349df5aa375d7ee8831658262 100644
|
||||
index 14d31bc2fb19b1265ee3e72280f2aba22ec0a26d..82a233b413791eff4bc6b9140b5bbf99354ed671 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -619,7 +619,7 @@ public final class MCUtil {
|
||||
|
@ -35,7 +35,7 @@ index 436ea61d284120a43123709f0213ec56870147dc..d2ea11d35ea111c349df5aa375d7ee88
|
|||
List<ChunkHolder> allChunks = new ArrayList<>(visibleChunks.values());
|
||||
List<ServerPlayer> players = world.players;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index aae8dca773686bec3f867b79aa11d668032b9244..2f5ab00d26dcf027ec0e152a8bf17686a280ae50 100644
|
||||
index 0006b8af2f9f774068ed5b8c906fe9b9383666e1..85c97767cdaf45b24f5764a6a1ef3c56535bb37f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -114,9 +114,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
@ -80,10 +80,10 @@ index cfe293881f68c8db337c3a48948362bb7b3e3522..7d44abcb4fff9717a1af55879deb7eb9
|
|||
}));
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 939744ef6850d4e59e5c94bc4781d045041b977d..a72f15c10410508ff344caf3ca376fd3d7317518 100644
|
||||
index c0d5eaf617f5c1a814986a9954b16bb59b3616fa..6a1957f9ab333e0c662895a14d83c015660a8a0f 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -525,4 +525,29 @@ public class PaperConfig {
|
||||
@@ -526,4 +526,29 @@ public class PaperConfig {
|
||||
itemValidationBookAuthorLength = getInt("settings.item-validation.book.author", itemValidationBookAuthorLength);
|
||||
itemValidationBookPageLength = getInt("settings.item-validation.book.page", itemValidationBookPageLength);
|
||||
}
|
|
@ -7,7 +7,7 @@ Subject: [PATCH] Detail more information in watchdog dumps
|
|||
- Dump player name, player uuid, position, and world for packet handling
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 23757f466da571aec35a373112dcbba0d1f46dcb..3321bb7582a3e0227fbc1d41982529c23548269b 100644
|
||||
index 580bdaa99129c8edb82b835edfa822892f1cd243..40875229e37d41b922add280e11a85cb3565e079 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -481,7 +481,14 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
@ -77,7 +77,7 @@ index bcf53ec07b8eeec7a88fb67e6fb908362e6f51b0..acc12307f61e1e055896b68fe16654c9
|
|||
});
|
||||
throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 9c69855874da2c18e9c80decf4244a0f50021a28..a999fece43b1b3f687061b541a975d889886db60 100644
|
||||
index e219e385df356531639cb1b4bf993dca9034aa1d..960aa86d64ce6bfc84fff06a7698490c7c32c5fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -962,7 +962,26 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -123,7 +123,7 @@ index 9c69855874da2c18e9c80decf4244a0f50021a28..a999fece43b1b3f687061b541a975d88
|
|||
|
||||
private void tickPassenger(Entity vehicle, Entity passenger) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 481e84fda6dccfaf684c922a12fa19ed35c87b3c..94857a736d2a16e8ade286c6f2ddf8bd798008eb 100644
|
||||
index 880723e59e4ca52d7b30a4dcad3b929e86128d2a..f3c5bf25c13b52b0843a45f2732a657b00e546a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -888,7 +888,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimise collision checking in player move packet handling
|
|||
Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index efa7c4b1e8c2e4297f89eb62aab76c43d2947e16..5d7c47b0a302f7db95a0b2bb811c5656c6b02beb 100644
|
||||
index 2a1614a514e35c473e5497d6293c63ca70268c0d..43014e542600f4565615d33f5c1d19ec029af91d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -582,12 +582,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
|
@ -24,10 +24,10 @@ and an action can be defined: DROP or KICK
|
|||
If interval or rate are less-than 0, the limit is ignored
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index a72f15c10410508ff344caf3ca376fd3d7317518..5ccc86d714d5e6e40df853bb30be11662cd53809 100644
|
||||
index 6a1957f9ab333e0c662895a14d83c015660a8a0f..02b995ea419c018b7ba5eb345a983f9422cbdd2c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -550,4 +550,102 @@ public class PaperConfig {
|
||||
@@ -551,4 +551,102 @@ public class PaperConfig {
|
||||
playerMaxConcurrentChunkLoads = getDouble("settings.chunk-loading.player-max-concurrent-loads", 4.0);
|
||||
globalMaxConcurrentChunkLoads = getDouble("settings.chunk-loading.global-max-concurrent-loads", 500.0);
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ index a72f15c10410508ff344caf3ca376fd3d7317518..5ccc86d714d5e6e40df853bb30be1166
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 3321bb7582a3e0227fbc1d41982529c23548269b..73457ae24ba6f605dd831a870499f1a990570e53 100644
|
||||
index 40875229e37d41b922add280e11a85cb3565e079..c44b2d5d043340b12eed80d766aa17dd9e8bd5a3 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -148,6 +148,22 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue