mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-30 08:06:01 +00:00
Update Paper
This commit is contained in:
parent
c401e92012
commit
a2e1f7fd86
@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
|
||||
version=1.20.4-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.20.4
|
||||
paperRef=07b956e3a30d9cd192111829b59bdf4372f128b1
|
||||
paperRef=106c67a811a857293b934c453752e73579c6ed8c
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Build changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 58da26ad2f128ba0b66f86820f60853f4be352f0..94a75d6ff937f178711bff7ca32d96506d4e0673 100644
|
||||
index 444ff797c70b0e285d4272ea2ce3d72453c9bda5..ca719ecf971286def958deef10d4fad8b7f21e81 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
||||
@ -23,7 +23,7 @@ index 58da26ad2f128ba0b66f86820f60853f4be352f0..94a75d6ff937f178711bff7ca32d9650
|
||||
// Paper start
|
||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||
@@ -66,11 +70,19 @@ tasks.jar {
|
||||
@@ -65,11 +69,19 @@ 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
|
||||
@ -45,7 +45,7 @@ index 58da26ad2f128ba0b66f86820f60853f4be352f0..94a75d6ff937f178711bff7ca32d9650
|
||||
"Implementation-Vendor" to date, // Paper
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
@@ -154,7 +166,7 @@ fun TaskContainer.registerRunTask(
|
||||
@@ -153,7 +165,7 @@ fun TaskContainer.registerRunTask(
|
||||
name: String,
|
||||
block: JavaExec.() -> Unit
|
||||
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
||||
@ -95,10 +95,10 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..21ded7c14c56a40feaa7741131be5166
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 34f19ac897a30c0c4e3ab406013fcca1c8b7db93..6f284b7cd52ea47bd96ecd3b7a21d68ae5c12d77 100644
|
||||
index c1c1763de0ad0376c504946cbfd7bbd5b0cff0fd..6ac66aad01ff3486f75efdf7e74309abee938467 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1866,7 +1866,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1852,7 +1852,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
@ -108,7 +108,7 @@ index 34f19ac897a30c0c4e3ab406013fcca1c8b7db93..6f284b7cd52ea47bd96ecd3b7a21d68a
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 142d2c48239d4ebe3896218536656d116cd24d7c..c97079981e19ebd3e47e650e5e04f2c213bbff41 100644
|
||||
index 70274239aa95d41953291d138cc46e0d7b491a8a..0a5233a777294af3e7ef7844f72d47d11cd05b89 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
|
||||
|
@ -44,11 +44,11 @@ index 1f55185814125c691288294d18bf1580461c8066..259d65f8e21f9cf99585d416eafdc967
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 6cfce9755dd464a7afb01f9032e567ce3bcd5bc5..264c94f49035236e3584a3577f2516f0f430a552 100644
|
||||
index 081937597a8984b52a1e92d4c6032c04c942116e..9a540393339e85a06ac9e29d6539517b663ed312 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -599,7 +599,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
if (generation) entity.generation = true; // Paper - add generation bool param
|
||||
if (generation) entity.generation = true; // Paper - Don't fire sync event during generation
|
||||
entity.load(nbt);
|
||||
}, () -> {
|
||||
- EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id"));
|
||||
@ -57,10 +57,10 @@ index 6cfce9755dd464a7afb01f9032e567ce3bcd5bc5..264c94f49035236e3584a3577f2516f0
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index a18aadbf7ae83713e1f2b21553185d8000bc7699..f5ad7ddf13cbb6452c2927aef9b54eae3335b4c6 100644
|
||||
index 5eaab97a0c3b93a44a45e2ed11033fe01c0c95c2..5edca8cdad2c3e3e8d2dd9f6ab02b3d63beb768d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -289,7 +289,12 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -290,7 +290,12 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
while (iterator.hasNext()) {
|
||||
String s = (String) iterator.next();
|
||||
|
||||
@ -88,7 +88,7 @@ index b5b1831631e233a96b6fd55972a8862b0f420da8..a086f12c09a5e38f63c8de118fcb5a6a
|
||||
return true;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
index 64875525df244db838560f5fefb7b1b07b0f1f51..fd490db7431404b0324e5ade474ec95d694aa489 100644
|
||||
index a94300a457b25f0e33a8eeabba6dd5720ca9ab1e..de300a7888f95e7770690ecdc36e44803e3634fd 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
@@ -50,7 +50,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Removes useless spammy error logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 91bbea5cb169f96910cc8661151c04dbff057091..84c9f2b09576046c138a11a835c9192a6e347c1d 100644
|
||||
index ef2b0e8aa9cce09097000029e39ff70f177ed3a7..591e37648241870546b14a9732b2c94eef5f0354 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -1805,8 +1805,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1806,8 +1806,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
resource = CraftNamespacedKey.fromMinecraft(key);
|
||||
}
|
||||
} catch (IllegalArgumentException ex) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Validate BlockState and SoundEvent values
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
index 80083fed4b44b9d433925f09db83e559582109a1..032fc2add6c25780a3663fd1d2e429fcfd37dc4a 100644
|
||||
index 8e68a094a22243f3e84110ddf81136219ac1de7c..807194e1c4d4b6808e60b2db57b596c7de5c27de 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
@@ -231,7 +231,7 @@ public final class NbtUtils {
|
||||
@ -15,5 +15,5 @@ index 80083fed4b44b9d433925f09db83e559582109a1..032fc2add6c25780a3663fd1d2e429fc
|
||||
- ResourceLocation resourceLocation = ResourceLocation.tryParse(nbt.getString("Name"));
|
||||
+ ResourceLocation resourceLocation = ResourceLocation.tryParse(nbt.getString("Name")); // Scissors - Validate BlockState
|
||||
Optional<? extends Holder<Block>> optional = resourceLocation != null ? blockLookup.get(ResourceKey.create(Registries.BLOCK, resourceLocation)) : Optional.empty();
|
||||
// Paper end
|
||||
// Paper end - Validate resource location
|
||||
if (optional.isEmpty()) {
|
||||
|
@ -93,10 +93,10 @@ index 186547674894fd084bceb478bb6017b747df4173..74c880425964da042ca57c097eb93273
|
||||
}
|
||||
}).reduce((accumulator, current) -> {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1be10c57e374ad4018c08d96cfb69397a2f541d3..2e11d0f17fc8fa4ed84c40dd9747e136675030a4 100644
|
||||
index 92f9d55c224cd4e25060d8751ccb28a978979241..00144a02089522e24fd0b3ee847c35c954c4af2b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2526,11 +2526,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2528,11 +2528,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (nbt.contains("CustomName", 8)) {
|
||||
String s = nbt.getString("CustomName");
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Block server-side chunkbans
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
index d364bd57b1675c8b21d781c2bc16c3e65800455c..f2e7585630ff724f966c7bcedc17e502d786870d 100644
|
||||
index b5b228e67284baad3639b283595427a819bb1a44..617d7f41a57fb86620183b219f025bb8f747bcf8 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
@@ -7,8 +7,16 @@ import io.netty.handler.codec.MessageToByteEncoder;
|
||||
@ -49,12 +49,9 @@ index d364bd57b1675c8b21d781c2bc16c3e65800455c..f2e7585630ff724f966c7bcedc17e502
|
||||
protected void encode(ChannelHandlerContext channelHandlerContext, Packet<?> packet, ByteBuf byteBuf) throws Exception {
|
||||
Attribute<ConnectionProtocol.CodecData<?>> attribute = channelHandlerContext.channel().attr(this.codecKey);
|
||||
ConnectionProtocol.CodecData<?> codecData = attribute.get();
|
||||
@@ -34,46 +59,59 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
throw new IOException("Can't serialize unregistered packet");
|
||||
} else {
|
||||
FriendlyByteBuf friendlyByteBuf = new FriendlyByteBuf(byteBuf);
|
||||
- friendlyByteBuf.writeVarInt(i);
|
||||
- friendlyByteBuf.adventure$locale = channelHandlerContext.channel().attr(io.papermc.paper.adventure.PaperAdventure.LOCALE_ATTRIBUTE).get(); // Paper
|
||||
@@ -37,43 +62,58 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
friendlyByteBuf.writeVarInt(i);
|
||||
friendlyByteBuf.adventure$locale = channelHandlerContext.channel().attr(io.papermc.paper.adventure.PaperAdventure.LOCALE_ATTRIBUTE).get(); // Paper - adventure; set player's locale
|
||||
|
||||
+ // Scissors start
|
||||
+ int k;
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Reject oversized components from updating
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/ComponentUtils.java b/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
index 7daca712816a79cc4a30b084afbd3d07b5d3755f..a7e04eb4284e7d5148e1c7b991620d666785ec70 100644
|
||||
index 57206594f305961a33542e1f8079c75bfa7c535f..ea4504be0eb115e563a4abd9dcbcedd57f9edcc2 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
@@ -38,8 +38,9 @@ public class ComponentUtils {
|
||||
@ -17,7 +17,7 @@ index 7daca712816a79cc4a30b084afbd3d07b5d3755f..a7e04eb4284e7d5148e1c7b991620d66
|
||||
- return text.copy();
|
||||
+ result = text.copy(); // Scissors
|
||||
} else {
|
||||
// Paper start
|
||||
// Paper start - adventure; pass actual vanilla component
|
||||
if (text instanceof io.papermc.paper.adventure.AdventureComponent adventureComponent) {
|
||||
@@ -52,8 +53,9 @@ public class ComponentUtils {
|
||||
mutableComponent.append(updateForEntity(source, component, sender, depth + 1));
|
||||
|
@ -414,24 +414,24 @@ index 0000000000000000000000000000000000000000..8cd2848aa6b06c5efbe797ed2d75ff4b
|
||||
+}
|
||||
+
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 7573c12a77797146c51ef2dfe4b2a636df45e21a..90d9c9cbf730df6ec1800a611fd9103418cce607 100644
|
||||
index a5e6b99b95e8408136f4c665aec070c5adc448da..9558994dc312f23581654a9d54ec3576feae788a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -141,6 +141,7 @@ public class Main {
|
||||
// Paper start - load config files for access below if needed
|
||||
// Paper start - load config files early for access below if needed
|
||||
org.bukkit.configuration.file.YamlConfiguration bukkitConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("bukkit-settings"));
|
||||
org.bukkit.configuration.file.YamlConfiguration spigotConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("spigot-settings"));
|
||||
+ org.bukkit.configuration.file.YamlConfiguration scissorsConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("scissors-settings")); // Scissors - TODO Change this
|
||||
// Paper end
|
||||
// Paper end - load config files early for access below if needed
|
||||
|
||||
if (optionset.has("initSettings")) { // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 58536aabf607015939a1326f80207c0a06eed8ff..34a8c36d88eb17b7574b6766f5e14ef926ec9080 100644
|
||||
index cb7fe116a29916761299a808572f76547d143971..92f14286513c0ca536ceb8e0b6d5475bfcb6e997 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -222,6 +222,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
||||
// Paper end
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // Paper - init PaperBrigadierProvider
|
||||
|
||||
+ // Scissors start
|
||||
+ try {
|
||||
@ -447,7 +447,7 @@ index 58536aabf607015939a1326f80207c0a06eed8ff..34a8c36d88eb17b7574b6766f5e14ef9
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
this.setMotd(dedicatedserverproperties.motd);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 856ebd326f9c91591fe293aefb4d1dc93af52ea0..398818dbfaf455aa20e9f47723c19f2468573006 100644
|
||||
index 0a5233a777294af3e7ef7844f72d47d11cd05b89..390b5302365a76ec4bcac276c0cfdfee6a9a0da2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1036,6 +1036,7 @@ public final class CraftServer implements Server {
|
||||
@ -466,7 +466,7 @@ index 856ebd326f9c91591fe293aefb4d1dc93af52ea0..398818dbfaf455aa20e9f47723c19f24
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -3011,6 +3013,14 @@ public final class CraftServer implements Server {
|
||||
@@ -3010,6 +3012,14 @@ public final class CraftServer implements Server {
|
||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
}
|
||||
|
||||
@ -482,7 +482,7 @@ index 856ebd326f9c91591fe293aefb4d1dc93af52ea0..398818dbfaf455aa20e9f47723c19f24
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 1576a201c92d8b17fd3a92ec497c42861db8ad1e..81454e29639f428e3331c5c20bb7ad39351d2f8a 100644
|
||||
index 3817c57b0a24969c0847a2c891bfe24d2ef9cafc..7a69edeaaf696be8ec441b71a94e27d981431dd8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -181,6 +181,20 @@ public class Main {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Prevent attributes with invalid namespaces from being applied
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index a2fed3fd711bf906cf066a41ad1f187f02b13551..49b7de6845054450bd9dd35979d9b2d409a9e598 100644
|
||||
index 591e37648241870546b14a9732b2c94eef5f0354..45f39201acf88d715b6efea5a329701e2ea8300d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -47,6 +47,7 @@ import net.minecraft.nbt.NbtIo;
|
||||
@ -17,7 +17,7 @@ index a2fed3fd711bf906cf066a41ad1f187f02b13551..49b7de6845054450bd9dd35979d9b2d4
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import org.apache.commons.lang3.EnumUtils;
|
||||
@@ -487,7 +488,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -488,7 +489,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
|
||||
|
||||
String attributeName = org.bukkit.craftbukkit.attribute.CraftAttributeMap.convertIfNeeded(entry.getString(CraftMetaItem.ATTRIBUTES_IDENTIFIER.NBT)); // Paper
|
||||
|
@ -59,7 +59,7 @@ index 4092c7a8c2b0d9d26e6f4d97386735236300d132..04c47cf1a920ae6c356449df801227ee
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index de277d61b718fe07a87d75a2547bb1c7f8553aa1..e2dbfe581717cc107d89206c1ba46014a6965693 100644
|
||||
index d1effd5d7b9eb2d715c9a3e16adbef2541b1ccf2..622617bcfd1f41d1d055b916efd972d9f6dae083 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -23,6 +23,7 @@ import java.util.function.Predicate;
|
||||
@ -105,7 +105,7 @@ index de277d61b718fe07a87d75a2547bb1c7f8553aa1..e2dbfe581717cc107d89206c1ba46014
|
||||
this.processEnchantOrder(this.tag); // Paper
|
||||
if (this.getItem().canBeDepleted()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index f5ad7ddf13cbb6452c2927aef9b54eae3335b4c6..041e3c8fb7c9ca69a7c7c1c952ed9915a75d7752 100644
|
||||
index 5edca8cdad2c3e3e8d2dd9f6ab02b3d63beb768d..eed465e73e073f6d741752b9bc5cfe99f1b26676 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -9,6 +9,7 @@ import java.util.Iterator;
|
||||
@ -116,7 +116,7 @@ index f5ad7ddf13cbb6452c2927aef9b54eae3335b4c6..041e3c8fb7c9ca69a7c7c1c952ed9915
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
@@ -212,6 +213,17 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -213,6 +214,17 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
||||
|
||||
public List<ItemStack> getContents() {
|
||||
@ -164,7 +164,7 @@ index 416aa989ebb18a8741cc9d605a1180ab830f6643..a9a8c9e68e5b767dec2c26495685da88
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
index c57efcb9a79337ec791e4e8f6671612f0a82b441..2cbb8170953cb555411db8c171a3d1d91eb799bb 100644
|
||||
index bc01481ac5990ad1cfd1def5a16dd0ed2f9de8c9..5948d7f87c2f2021345d58db18ec1c996ae8bf7a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.block.entity;
|
||||
@ -252,7 +252,7 @@ index 881379681c39230a00b3a1f11cd87498984396c7..d0513b72cdaec3b67b9341d251367b19
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index d4dcf7fe26474ae07374e7761d823bc5c8b54f97..7352183f7eaa1ddcd028e53f4b66a1c34e32b988 100644
|
||||
index df1c1c27b7c0065f8179d59bdb9de01dde22befa..68cccd8d6dd1d8e196c9e2d4efdd15891fe48567 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -6,6 +6,7 @@ import java.util.function.BooleanSupplier;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't log invalid teams to console
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 5a11c89e10a9214fddc37f57c9b937494da19c9c..cb6319c539542b5391532cadb71310532a72c2c9 100644
|
||||
index 4a0dbc927d23894d865a51dcef158899b898ed25..877de84675353c987db9dcad4a6d55ce9deeeda3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -860,7 +860,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -861,7 +861,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
boolean flag = scoreboardteam != null && this.level().getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam);
|
||||
|
||||
if (!flag) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add spectator teleport event
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 64255f7db85886421d5029766e8a6d1eadb94cff..2a3f4e6bfc6b122bb2102163381de8c78f06f1b5 100644
|
||||
index cafd0cde26a623861c7d3d01b496cb32fdc77335..4293978e1ddb789d5b9ff8f2dfbbb23bffba10ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -15,7 +15,7 @@ index 64255f7db85886421d5029766e8a6d1eadb94cff..2a3f4e6bfc6b122bb2102163381de8c7
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.primitives.Floats;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
@@ -2037,6 +2038,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2039,6 +2040,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
Entity entity = packet.getEntity(worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent invalid container events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2a3f4e6bfc6b122bb2102163381de8c78f06f1b5..2ac044f9e4c4c80263a34f9294cb69829bca132e 100644
|
||||
index 4293978e1ddb789d5b9ff8f2dfbbb23bffba10ad..e47f9527a6fe69cec500062c9b6a3a569f18d359 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -29,6 +29,7 @@ import java.util.function.UnaryOperator;
|
||||
@ -16,7 +16,7 @@ index 2a3f4e6bfc6b122bb2102163381de8c78f06f1b5..2ac044f9e4c4c80263a34f9294cb6982
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.Util;
|
||||
@@ -2909,6 +2910,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2911,6 +2912,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Validate block entity/entity tag query positions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2ac044f9e4c4c80263a34f9294cb69829bca132e..889f142b6f87d4ccf4c1d2ffd379c96fbbfddd44 100644
|
||||
index e47f9527a6fe69cec500062c9b6a3a569f18d359..24bd79c80b1b8fadce647febcf461f564e1eae88 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1265,7 +1265,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1267,7 +1267,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (this.player.hasPermissions(2)) {
|
||||
Entity entity = this.player.level().getEntity(packet.getEntityId());
|
||||
|
||||
@ -17,7 +17,7 @@ index 2ac044f9e4c4c80263a34f9294cb69829bca132e..889f142b6f87d4ccf4c1d2ffd379c96f
|
||||
CompoundTag nbttagcompound = entity.saveWithoutId(new CompoundTag());
|
||||
|
||||
this.player.connection.send(new ClientboundTagQueryPacket(packet.getTransactionId(), nbttagcompound));
|
||||
@@ -1297,7 +1297,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1299,7 +1299,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handleBlockEntityTagQuery(ServerboundBlockEntityTagQuery packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
|
@ -40,7 +40,7 @@ index 74cf1c043beef03cfd5adf481414a5ee78bef2a6..939f4a0639c847b94cfc9acf1409a7a3
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
index 85a8a687b1568a56e3e646b37ef78b562c1b8a82..68e2edd39dcbcc9199aeaecff9b3280914ba9270 100644
|
||||
index 22ead092ae984d1eaa052fe97981ce3c49b521d8..77be2549c1c836fd21f510ed1082cbd22ec60f09 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
@@ -5,6 +5,8 @@ import java.time.Instant;
|
||||
@ -62,7 +62,7 @@ index 85a8a687b1568a56e3e646b37ef78b562c1b8a82..68e2edd39dcbcc9199aeaecff9b32809
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 889f142b6f87d4ccf4c1d2ffd379c96fbbfddd44..4bdd2e731102c7e3a312ad3144537042dce46923 100644
|
||||
index 24bd79c80b1b8fadce647febcf461f564e1eae88..e94f9879bfd06e9f45373389bbdce67ee05a9773 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -72,7 +72,6 @@ index 889f142b6f87d4ccf4c1d2ffd379c96fbbfddd44..4bdd2e731102c7e3a312ad3144537042
|
||||
import me.totalfreedom.scissors.event.player.SpectatorTeleportEvent; // Scissors
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.primitives.Floats;
|
||||
@@ -2247,7 +2248,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
private void handleMessageDecodeFailure(SignedMessageChain.DecodeException exception) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Failed to update secure chat state for {}: '{}'", this.player.getGameProfile().getName(), exception.getComponent().getString());
|
||||
@ -81,7 +80,7 @@ index 889f142b6f87d4ccf4c1d2ffd379c96fbbfddd44..4bdd2e731102c7e3a312ad3144537042
|
||||
this.disconnect(exception.getComponent(), exception.kickCause); // Paper - kick event causes
|
||||
} else {
|
||||
this.player.sendSystemMessage(exception.getComponent().copy().withStyle(ChatFormatting.RED));
|
||||
@@ -2295,6 +2296,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2297,6 +2298,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
Optional<LastSeenMessages> optional = this.lastSeenMessages.applyUpdate(acknowledgment);
|
||||
|
||||
if (optional.isEmpty()) {
|
||||
@ -89,7 +88,7 @@ index 889f142b6f87d4ccf4c1d2ffd379c96fbbfddd44..4bdd2e731102c7e3a312ad3144537042
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
|
||||
this.disconnect(ServerGamePacketListenerImpl.CHAT_VALIDATION_FAILED, org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event causes
|
||||
}
|
||||
@@ -2493,6 +2495,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2495,6 +2497,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
synchronized (this.lastSeenMessages) {
|
||||
if (!this.lastSeenMessages.applyOffset(packet.offset())) {
|
||||
@ -97,7 +96,7 @@ index 889f142b6f87d4ccf4c1d2ffd379c96fbbfddd44..4bdd2e731102c7e3a312ad3144537042
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
|
||||
this.disconnect(ServerGamePacketListenerImpl.CHAT_VALIDATION_FAILED, org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event causes
|
||||
}
|
||||
@@ -3471,6 +3474,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3473,6 +3476,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handleChatSessionUpdate(ServerboundChatSessionUpdatePacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent player banning using duplicate UUIDs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 676087c3addd712939c865b39ddb5d9f0bc7ce25..69a0d8c05c90ca8c9009c98a47d1e2aea94a571f 100644
|
||||
index 9801b283da75aa63d7eba33d08322285c86c241c..6375d2e00ce8dab51294fe5dc53210883c4e1153 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1673,7 +1673,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1672,7 +1672,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity != null) {
|
||||
ServerLevel.LOGGER.warn("Force-added player with duplicate UUID {}", player.getUUID());
|
||||
entity.unRide();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix packet-related lag exploits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1f7dc235f8cf848d740ef6a8cf879d253b56c1c8..2ef6fd0fadaf6b912c4f242210c1ce2756ccddd7 100644
|
||||
index 677ad69a4d359227c679c207225b7e6b02b93706..ee84d71b3ca60a037bd38630bcb36878489efd74 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -859,7 +859,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -17,7 +17,7 @@ index 1f7dc235f8cf848d740ef6a8cf879d253b56c1c8..2ef6fd0fadaf6b912c4f242210c1ce27
|
||||
BaseCommandBlock commandblocklistenerabstract = null;
|
||||
CommandBlockEntity tileentitycommand = null;
|
||||
BlockPos blockposition = packet.getPos();
|
||||
@@ -1026,7 +1026,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1028,7 +1028,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handleSetStructureBlock(ServerboundSetStructureBlockPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
@ -26,7 +26,7 @@ index 1f7dc235f8cf848d740ef6a8cf879d253b56c1c8..2ef6fd0fadaf6b912c4f242210c1ce27
|
||||
BlockPos blockposition = packet.getPos();
|
||||
BlockState iblockdata = this.player.level().getBlockState(blockposition);
|
||||
BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
|
||||
@@ -1084,7 +1084,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1086,7 +1086,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handleSetJigsawBlock(ServerboundSetJigsawBlockPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
@ -35,7 +35,7 @@ index 1f7dc235f8cf848d740ef6a8cf879d253b56c1c8..2ef6fd0fadaf6b912c4f242210c1ce27
|
||||
BlockPos blockposition = packet.getPos();
|
||||
BlockState iblockdata = this.player.level().getBlockState(blockposition);
|
||||
BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
|
||||
@@ -1109,7 +1109,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1111,7 +1111,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handleJigsawGenerate(ServerboundJigsawGeneratePacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
|
Loading…
Reference in New Issue
Block a user