aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch
diff options
context:
space:
mode:
authorLulu13022002 <[email protected]>2024-12-04 21:05:57 +0100
committerLulu13022002 <[email protected]>2024-12-04 21:05:57 +0100
commit4806ce5cd5755bb3323d27b1302b282f5c9316a3 (patch)
treee64e8c123dbff91bb2c2aa7700365c902248a42d /patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch
parent2a4ba00d9f039612ded57cba226bc429c15abe04 (diff)
downloadPaper-4806ce5cd5755bb3323d27b1302b282f5c9316a3.tar.gz
Paper-4806ce5cd5755bb3323d27b1302b282f5c9316a3.zip
properly override push/knockback methods
This prevent the creaking from being pushed with knockback enchant when it can't move
Diffstat (limited to 'patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch')
-rw-r--r--patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch14
1 files changed, 6 insertions, 8 deletions
diff --git a/patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch
index 64686a7ba9..670efb3867 100644
--- a/patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch
+++ b/patches/server/0905-Validate-ResourceLocation-in-NBT-reading.patch
@@ -103,22 +103,20 @@ index 2715ba6325ecf82dee237bb53372e3aac3972112..95c2e2d73aefcf7c436fad3066e1fedc
if (nbt.contains("Brain", 10)) {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 13064a73a9e3b45d32a098c4179cd980be508abc..8ac12520650501139d53f6db3ae1ee6417db7bb9 100644
+index 13064a73a9e3b45d32a098c4179cd980be508abc..a66ed6527d95b9c40b6c5983455fc078fd9eb2bf 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -609,9 +609,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -609,7 +609,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
this.readLeashData(nbt);
this.setLeftHanded(nbt.getBoolean("LeftHanded"));
if (nbt.contains("DeathLootTable", 8)) {
- this.lootTable = Optional.of(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(nbt.getString("DeathLootTable"))));
-- } else {
-- this.lootTable = Optional.empty();
-+ this.lootTable = Optional.ofNullable(ResourceLocation.tryParse(nbt.getString("DeathLootTable"))).map((rs) -> ResourceKey.create(Registries.LOOT_TABLE, rs)); // Paper - Validate ResourceLocation } else {
++ this.lootTable = Optional.ofNullable(ResourceLocation.tryParse(nbt.getString("DeathLootTable"))).map((rs) -> ResourceKey.create(Registries.LOOT_TABLE, rs)); // Paper - Validate ResourceLocation
+ } else {
+ this.lootTable = Optional.empty();
}
-
- this.lootTableSeed = nbt.getLong("DeathLootTableSeed");
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 0abe2fe6d7cf0a2084b7219c3ab0c5118586a8fe..9c781ad45fd0295cc8ffe5ba901dc7a59ece06f2 100644
+index 758fa49f9b420fdbb583ca3443b81ca151478ea8..6edb5a76a503242a6528875184ccd62d6499205f 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -710,7 +710,7 @@ public abstract class AbstractArrow extends Projectile {