From 8befd612e73d8c2667eb9605032e448565e7a4c0 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Mon, 9 May 2022 23:42:18 -0500 Subject: [PATCH] Update Paper and fix patches --- gradle.properties | 2 +- ...ceLocation-validation-and-log-spam-f.patch | 20 +++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gradle.properties b/gradle.properties index 79478e3..d1c7a96 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=me.totalfreedom.scissors version=1.18.2-R0.1-SNAPSHOT mcVersion=1.18.2 -paperRef=268476bba3f1796fffff13a213e3ffa81ff76cc6 +paperRef=9fd870db0b681b9840706aea4958376492e725b5 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/server/0012-Even-more-ResourceLocation-validation-and-log-spam-f.patch b/patches/server/0012-Even-more-ResourceLocation-validation-and-log-spam-f.patch index 6823b48..295afa7 100644 --- a/patches/server/0012-Even-more-ResourceLocation-validation-and-log-spam-f.patch +++ b/patches/server/0012-Even-more-ResourceLocation-validation-and-log-spam-f.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Video -Date: Sun, 20 Mar 2022 03:04:33 -0600 +From: Telesphoreo +Date: Mon, 9 May 2022 23:40:59 -0500 Subject: [PATCH] Even more ResourceLocation validation and log spam fixes @@ -60,18 +60,22 @@ index 0dd0ce9a9b3253e87eda12354249ec2fd2a33cf2..b6920f9432ca1736afbe775186fbbcf1 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -index cf0be5ef01bddaabbfd11f54b2dacd68c68ad16a..b4b86d7448e6659b1d4e034ffcddd7be77dd977f 100644 +index d775e19402188e35f79affb4ed636b6533f90ab5..29f5ab80ffbc421da911046678427755c6156894 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -@@ -67,8 +67,14 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { - this.getHandle().lootTable = this.getHandle().getDefaultLootTable(); - } +@@ -63,8 +63,18 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { -- NamespacedKey key = CraftNamespacedKey.fromMinecraft(this.getHandle().lootTable); + @Override + public LootTable getLootTable() { +- NamespacedKey key = CraftNamespacedKey.fromMinecraft(this.getHandle().getLootTable()); - return Bukkit.getLootTable(key); ++ if (this.getHandle().lootTable == null) { ++ this.getHandle().lootTable = this.getHandle().getDefaultLootTable(); ++ } ++ + // Scissors start - Return a null loot table if the specified loot table is not valid + try { -+ NamespacedKey key = CraftNamespacedKey.fromMinecraft(this.getHandle().lootTable); ++ NamespacedKey key = CraftNamespacedKey.fromMinecraft(this.getHandle().getLootTable()); + return Bukkit.getLootTable(key); + } catch (Exception ex) { + return null;