diff options
author | Owen1212055 <[email protected]> | 2024-04-24 10:29:12 -0400 |
---|---|---|
committer | Owen1212055 <[email protected]> | 2024-04-24 10:29:12 -0400 |
commit | a403a8d085a3546787746a9308c5a5321e326fe5 (patch) | |
tree | 6145b0f37a5620a59cb5ee16c4d3fee3fae3b650 /removed-patches-1-20-5 | |
parent | 2d9d0d8b1dcf64e8790b17119b7480361d5f33e3 (diff) | |
download | Paper-a403a8d085a3546787746a9308c5a5321e326fe5.tar.gz Paper-a403a8d085a3546787746a9308c5a5321e326fe5.zip |
Patches!!!!!!!
Diffstat (limited to 'removed-patches-1-20-5')
-rw-r--r-- | removed-patches-1-20-5/0590-Make-item-validations-configurable.patch | 55 | ||||
-rw-r--r-- | removed-patches-1-20-5/0603-Add-config-for-mobs-immune-to-default-effects.patch | 57 |
2 files changed, 112 insertions, 0 deletions
diff --git a/removed-patches-1-20-5/0590-Make-item-validations-configurable.patch b/removed-patches-1-20-5/0590-Make-item-validations-configurable.patch new file mode 100644 index 0000000000..e82f39807e --- /dev/null +++ b/removed-patches-1-20-5/0590-Make-item-validations-configurable.patch @@ -0,0 +1,55 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Fri, 4 Jun 2021 12:12:35 -0700 +Subject: [PATCH] Make item validations configurable + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +index e0d4798e244add64cbe43201604ad9d57701515f..c5d1ba7a1be3f102edcdfdc05fc50b30ef1f775b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +@@ -89,11 +89,11 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { + super(tag); + + if (tag.contains(CraftMetaBook.BOOK_TITLE.NBT)) { +- this.title = limit( tag.getString(CraftMetaBook.BOOK_TITLE.NBT), 8192 ); // Spigot ++ this.title = limit( tag.getString(CraftMetaBook.BOOK_TITLE.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.book.title); // Spigot // Paper - make configurable + } + + if (tag.contains(CraftMetaBook.BOOK_AUTHOR.NBT)) { +- this.author = limit( tag.getString(CraftMetaBook.BOOK_AUTHOR.NBT), 8192 ); // Spigot ++ this.author = limit( tag.getString(CraftMetaBook.BOOK_AUTHOR.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.book.author ); // Spigot // Paper - make configurable + } + + if (tag.contains(CraftMetaBook.RESOLVED.NBT)) { +@@ -121,7 +121,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { + } else { + page = this.validatePage(page); + } +- this.pages.add( limit( page, 16384 ) ); // Spigot ++ this.pages.add( limit( page, io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.book.page ) ); // Spigot // Paper - make configurable + } + } + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index 27be5da67801be6fd99c91576064e4be0b3f0d6c..7d3d32679bdfe373d89a28c3616da5069640d1bb 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -362,7 +362,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + CompoundTag display = tag.getCompound(CraftMetaItem.DISPLAY.NBT); + + if (display.contains(CraftMetaItem.NAME.NBT)) { +- this.displayName = limit( display.getString(CraftMetaItem.NAME.NBT), 8192 ); // Spigot ++ this.displayName = limit( display.getString(CraftMetaItem.NAME.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.displayName ); // Spigot // Paper - make configurable + } + + if (display.contains(CraftMetaItem.LOCNAME.NBT)) { +@@ -373,7 +373,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + ListTag list = display.getList(CraftMetaItem.LORE.NBT, CraftMagicNumbers.NBT.TAG_STRING); + this.lore = new ArrayList<String>(list.size()); + for (int index = 0; index < list.size(); index++) { +- String line = limit( list.getString(index), 8192 ); // Spigot ++ String line = limit( list.getString(index), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.loreLine ); // Spigot // Paper - make configurable + this.lore.add(line); + } + } diff --git a/removed-patches-1-20-5/0603-Add-config-for-mobs-immune-to-default-effects.patch b/removed-patches-1-20-5/0603-Add-config-for-mobs-immune-to-default-effects.patch new file mode 100644 index 0000000000..10ce8bf043 --- /dev/null +++ b/removed-patches-1-20-5/0603-Add-config-for-mobs-immune-to-default-effects.patch @@ -0,0 +1,57 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Wed, 2 Dec 2020 21:03:02 -0800 +Subject: [PATCH] Add config for mobs immune to default effects + + +diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java +index 60c9bae18f277a90b464a6f1f55d074ed9046aff..f01ace6a6e517ff3d3cd66e69e2594ae3d702072 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -1172,7 +1172,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + if (this.getMobType() == MobType.UNDEAD) { + MobEffect mobeffectlist = effect.getEffect(); + +- if (mobeffectlist == MobEffects.REGENERATION || mobeffectlist == MobEffects.POISON) { ++ if ((mobeffectlist == MobEffects.REGENERATION || mobeffectlist == MobEffects.POISON) && this.level().paperConfig().entities.mobEffects.undeadImmuneToCertainEffects) { // Paper - Add config for mobs immune to default effects + return false; + } + } +diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +index bd9453a92e1b2eca0a6dc56aef921e31a18a20c3..25f611b35a5710c595574d2d6ed50c442ca55721 100644 +--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java ++++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +@@ -607,7 +607,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob + + @Override + public boolean canBeAffected(MobEffectInstance effect) { +- return effect.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(effect); ++ return effect.getEffect() == MobEffects.WITHER && this.level().paperConfig().entities.mobEffects.immuneToWitherEffect.wither ? false : super.canBeAffected(effect); // Paper - Add config for mobs immune to default effects + } + + private class WitherDoNothingGoal extends Goal { +diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java +index 6241baccd3fdee59175f616cdf69d3873074f855..4d5cfaa58bdf4e6cb975134004d14c591f6e85fa 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java +@@ -135,7 +135,7 @@ public class Spider extends Monster { + + @Override + public boolean canBeAffected(MobEffectInstance effect) { +- return effect.getEffect() == MobEffects.POISON ? false : super.canBeAffected(effect); ++ return effect.getEffect() == MobEffects.POISON && this.level().paperConfig().entities.mobEffects.spidersImmuneToPoisonEffect ? false : super.canBeAffected(effect); // Paper - Add config for mobs immune to default effects + } + + public boolean isClimbing() { +diff --git a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java +index 62943d43b701d9ae6d955003f4e7658f76d5bdb3..20a65c11ededcd7170704b70118da6200151fbab 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java ++++ b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java +@@ -128,6 +128,6 @@ public class WitherSkeleton extends AbstractSkeleton { + + @Override + public boolean canBeAffected(MobEffectInstance effect) { +- return effect.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(effect); ++ return effect.getEffect() == MobEffects.WITHER && this.level().paperConfig().entities.mobEffects.immuneToWitherEffect.witherSkeleton ? false : super.canBeAffected(effect); // Paper - Add config for mobs immune to default effects + } + } |