From 36020d6749d8d5b8799ead580169d1f236668e30 Mon Sep 17 00:00:00 2001 From: Jake Potrebic 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 --- .../world/entity/monster/Vindicator.java.patch | 11 +++++++++++ .../minecraft/world/entity/monster/Zombie.java.patch | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch new file mode 100644 index 0000000000..e652ce7a7e --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Vindicator.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/Vindicator.java ++++ b/net/minecraft/world/entity/monster/Vindicator.java +@@ -184,7 +184,7 @@ + + 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/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch index a465244d15..b7eba5851b 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch @@ -53,7 +53,7 @@ private static final ResourceLocation REINFORCEMENT_CALLER_CHARGE_ID = ResourceLocation.withDefaultNamespace("reinforcement_caller_charge"); private static final AttributeModifier ZOMBIE_REINFORCEMENT_CALLEE_CHARGE = new AttributeModifier(ResourceLocation.withDefaultNamespace("reinforcement_callee_charge"), -0.05000000074505806D, AttributeModifier.Operation.ADD_VALUE); private static final ResourceLocation LEADER_ZOMBIE_BONUS_ID = ResourceLocation.withDefaultNamespace("leader_zombie_bonus"); -@@ -91,6 +98,8 @@ +@@ -91,10 +98,12 @@ private boolean canBreakDoors; private int inWaterTime; public int conversionTime; @@ -62,6 +62,11 @@ public Zombie(EntityType 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) { @@ -103,7 +112,7 @@ @Override