diff options
author | Newwind <[email protected]> | 2024-08-31 19:29:50 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-31 20:29:50 +0200 |
commit | 509ea2fd17fa03ce04f86046098607733b8767ba (patch) | |
tree | 3f7c9a29481fafbb6ad9f846839ec8f4863d2363 /patches/server/0467-Configurable-door-breaking-difficulty.patch | |
parent | e01ddf46279fbb68d157749a906b7a2ecc60da1a (diff) | |
download | Paper-509ea2fd17fa03ce04f86046098607733b8767ba.tar.gz Paper-509ea2fd17fa03ce04f86046098607733b8767ba.zip |
Fix horse armor desync (#11341)
Diffstat (limited to 'patches/server/0467-Configurable-door-breaking-difficulty.patch')
-rw-r--r-- | patches/server/0467-Configurable-door-breaking-difficulty.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/patches/server/0467-Configurable-door-breaking-difficulty.patch b/patches/server/0467-Configurable-door-breaking-difficulty.patch new file mode 100644 index 0000000000..679bb5f5e7 --- /dev/null +++ b/patches/server/0467-Configurable-door-breaking-difficulty.patch @@ -0,0 +1,37 @@ +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 + +== AT == +public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE +public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE + +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 7c3aff97ba777af131d7efad0b08b844bf6e8946..0615bb305d70f660a6baa7f78078990d6db227d3 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java +@@ -179,7 +179,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 - Configurable door breaking difficulty + 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 5908f1646b542d61b5a2b23b284b1532e4b276c1..fd304e7d8305877d56de7a38b8664e5a70bf0c33 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +@@ -101,7 +101,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 - Configurable door breaking difficulty + } + + public Zombie(Level world) { |