aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0564-Configurable-door-breaking-difficulty.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0564-Configurable-door-breaking-difficulty.patch')
-rw-r--r--patches/server/0564-Configurable-door-breaking-difficulty.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/server/0564-Configurable-door-breaking-difficulty.patch b/patches/server/0564-Configurable-door-breaking-difficulty.patch
new file mode 100644
index 0000000000..45e5e3e168
--- /dev/null
+++ b/patches/server/0564-Configurable-door-breaking-difficulty.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Sun, 3 Jan 2021 22:27:43 -0800
+Subject: [PATCH] Configurable door breaking difficulty
+
+Co-authored-by: Doc <[email protected]>
+
+diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
+index ffc8e20d916940fb5e28bac610e3c6bd3d493f78..a9e75a16a7dc0ff5d4f0faa92ebc444559a39325 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
++++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
+@@ -197,7 +197,7 @@ public class Vindicator extends AbstractIllager {
+
+ static class VindicatorBreakDoorGoal extends BreakDoorGoal {
+ public VindicatorBreakDoorGoal(Mob mob) {
+- super(mob, 6, Vindicator.DOOR_BREAKING_PREDICATE);
++ super(mob, 6, com.google.common.base.Predicates.in(mob.level.paperConfig().entities.behavior.doorBreakingDifficulty.getOrDefault(mob.getType(), mob.level.paperConfig().entities.behavior.doorBreakingDifficulty.get(EntityType.VINDICATOR)))); // Paper
+ this.setFlags(EnumSet.of(Goal.Flag.MOVE));
+ }
+
+diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+index c84bae4aac13698893420e669ca323194e28ca48..3e1fa4336cc18eaeb048d0a1d592cf74820ff3b2 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
++++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+@@ -98,7 +98,7 @@ public class Zombie extends Monster {
+
+ public Zombie(EntityType<? extends Zombie> type, Level world) {
+ super(type, world);
+- this.breakDoorGoal = new BreakDoorGoal(this, Zombie.DOOR_BREAKING_PREDICATE);
++ this.breakDoorGoal = new BreakDoorGoal(this, com.google.common.base.Predicates.in(world.paperConfig().entities.behavior.doorBreakingDifficulty.getOrDefault(type, world.paperConfig().entities.behavior.doorBreakingDifficulty.get(EntityType.ZOMBIE)))); // Paper
+ }
+
+ public Zombie(Level world) {