From 6a4e753d93639b69cda4076bc8bd8ed1abd8bc59 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 30 Oct 2022 18:45:27 -0500 Subject: [PATCH] Update Paper --- gradle.properties | 2 +- ...t-of-vehicle-collision-checks-to-3-and-di.patch | 8 ++++---- ...etter-handling-of-invalid-JSON-components.patch | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gradle.properties b/gradle.properties index 511e447..33c2d22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=me.totalfreedom.scissors version=1.19.2-R0.1-SNAPSHOT mcVersion=1.19.2 -paperRef=3dcfec4499ce2ab3d8c775c7795a6283f8647242 +paperRef=aaf5e3997f5bba868834e990ebac7120ab31d0b8 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/server/0026-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch b/patches/server/0026-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch index ad110be..194ca18 100644 --- a/patches/server/0026-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch +++ b/patches/server/0026-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Limit amount of vehicle collision checks to 3 and discard diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index 3f31a3c17ecca6e93b794478129b95ecff4e1a9c..1db184c47880a3527e6c83666c90b7d9a9bd3ad7 100644 +index c71120fe57a76c4638be5dcbda5a756cc2d62ffc..db2ed9a3603dbb1a0ce05a0d9d6d372474441ffb 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java @@ -8,6 +8,7 @@ import com.mojang.datafixers.util.Pair; @@ -25,7 +25,7 @@ index 3f31a3c17ecca6e93b794478129b95ecff4e1a9c..1db184c47880a3527e6c83666c90b7d9 public double maxSpeed = 0.4D; // CraftBukkit end -@@ -424,8 +426,10 @@ public abstract class AbstractMinecart extends Entity { +@@ -432,8 +434,10 @@ public abstract class AbstractMinecart extends Entity { if (this.getMinecartType() == AbstractMinecart.Type.RIDEABLE && this.getDeltaMovement().horizontalDistanceSqr() > 0.01D) { List list = this.level.getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D), EntitySelector.pushableBy(this)); @@ -38,7 +38,7 @@ index 3f31a3c17ecca6e93b794478129b95ecff4e1a9c..1db184c47880a3527e6c83666c90b7d9 Entity entity = (Entity) list.get(l); if (!(entity instanceof Player) && !(entity instanceof IronGolem) && !(entity instanceof AbstractMinecart) && !this.isVehicle() && !entity.isPassenger()) { -@@ -452,6 +456,16 @@ public abstract class AbstractMinecart extends Entity { +@@ -460,6 +464,16 @@ public abstract class AbstractMinecart extends Entity { entity.push(this); } } @@ -56,7 +56,7 @@ index 3f31a3c17ecca6e93b794478129b95ecff4e1a9c..1db184c47880a3527e6c83666c90b7d9 } else { Iterator iterator = this.level.getEntities(this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D)).iterator(); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -index eb753323f67badb1bed28405c07b03078e322b44..8e1855ae99ce0a1c098a67c7e0fead87c061eb4f 100644 +index 29da8a42406feccf7932097b07b1d32a38fa96b7..cc6c192bd821f704a0179007fe10fdcb70aede80 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java @@ -4,6 +4,7 @@ import com.google.common.collect.Lists; diff --git a/patches/server/0028-Better-handling-of-invalid-JSON-components.patch b/patches/server/0028-Better-handling-of-invalid-JSON-components.patch index 7def2a0..f950bec 100644 --- a/patches/server/0028-Better-handling-of-invalid-JSON-components.patch +++ b/patches/server/0028-Better-handling-of-invalid-JSON-components.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Video -Date: Sun, 12 Jun 2022 00:06:07 -0500 +From: Telesphoreo +Date: Sun, 30 Oct 2022 18:40:45 -0500 Subject: [PATCH] Better handling of invalid JSON components @@ -110,7 +110,7 @@ index 97a2657bc98d41c3c1e376b266d2c85f685acc88..7b6476455e095eed15c92797ce3a3e11 } }).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 a1421689445b9df3f25889845c21cf37a439afe2..8ee325986eb479f223661ffcbda45b007e4d2ccc 100644 +index f2908cf61ff28bef44fcf46b15cf585e942fd7ce..f96156a80f0b503963fcfc289ee2289655b975ff 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2315,12 +2315,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -128,27 +128,27 @@ index a1421689445b9df3f25889845c21cf37a439afe2..8ee325986eb479f223661ffcbda45b00 this.setCustomNameVisible(nbt.getBoolean("CustomNameVisible")); diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 5f6eeb36f57bd342b18590c8f0ffb668d2bf273c..5ae750a2f12917ecddb0c14c23e6b02735385599 100644 +index bb4ab75ec0e7a5d71dafeeb55e26d2204455e7a1..5ae750a2f12917ecddb0c14c23e6b02735385599 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -408,7 +408,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { this.levels = nbt.getInt("Levels"); // SPIGOT-5053, use where available // CraftBukkit end if (nbt.contains("CustomName", 8)) { -- this.name = net.minecraft.server.MCUtil.getBaseComponentFromNbt("CustomName", nbt); // Paper - Catch ParseException +- this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt); // Paper - Catch ParseException + this.name = Component.Serializer.fromJsonSafe(nbt.getString("CustomName")); // Scissors - Use safer method for getting Components from JSON } this.lockKey = LockCode.fromTag(nbt); diff --git a/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java -index 2341a5a249d455628165fc6ba508fc6d70c3dbfb..3e23451066894ebd88cad7022970cb2c0e9b75db 100644 +index 65e1381bb2d10bd212463feb602c60f8fdb9ade1..3e23451066894ebd88cad7022970cb2c0e9b75db 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java @@ -42,7 +42,7 @@ public class EnchantmentTableBlockEntity extends BlockEntity implements Nameable public void load(CompoundTag nbt) { super.load(nbt); if (nbt.contains("CustomName", 8)) { -- this.name = net.minecraft.server.MCUtil.getBaseComponentFromNbt("CustomName", nbt); // Paper - Catch ParseException +- this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt); // Paper - Catch ParseException + this.name = Component.Serializer.fromJsonSafe(nbt.getString("CustomName")); // Scissors - Use safer method for getting Components from JSON }