3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Fix door breaking difficulty defaults for vindicator (#7795)

Dieser Commit ist enthalten in:
Jake Potrebic 2022-05-07 11:38:15 -07:00 committet von GitHub
Ursprung 1a17a83f8a
Commit 87d2eb2d3b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Configurable door breaking difficulty
Co-authored-by: Doc <nachito94@msn.com> Co-authored-by: Doc <nachito94@msn.com>
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index bd28bbab098441bdede682c6b269c1d19a2dd062..082a7d3c7ebaa66e89dbab3ebf7c9b5451e7180b 100644 index bd28bbab098441bdede682c6b269c1d19a2dd062..13fc7c21283f09fd135a12649776bb1355da4154 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -137,6 +137,27 @@ public class PaperWorldConfig { @@ -137,6 +137,27 @@ public class PaperWorldConfig {
@ -19,7 +19,7 @@ index bd28bbab098441bdede682c6b269c1d19a2dd062..082a7d3c7ebaa66e89dbab3ebf7c9b54
+ private void setupEntityBreakingDoors() { + private void setupEntityBreakingDoors() {
+ for (net.minecraft.world.entity.EntityType<?> entityType : entitiesValidForBreakDoors) { + for (net.minecraft.world.entity.EntityType<?> entityType : entitiesValidForBreakDoors) {
+ java.util.function.Predicate<net.minecraft.world.Difficulty> difficultyPredicate = net.minecraft.world.entity.monster.Zombie.DOOR_BREAKING_PREDICATE; + java.util.function.Predicate<net.minecraft.world.Difficulty> difficultyPredicate = net.minecraft.world.entity.monster.Zombie.DOOR_BREAKING_PREDICATE;
+ if (entityType.getBaseClass() == net.minecraft.world.entity.monster.Vindicator.class) { + if (entityType == net.minecraft.world.entity.EntityType.VINDICATOR) {
+ difficultyPredicate = net.minecraft.world.entity.monster.Vindicator.DOOR_BREAKING_PREDICATE; + difficultyPredicate = net.minecraft.world.entity.monster.Vindicator.DOOR_BREAKING_PREDICATE;
+ } + }
+ entitiesDifficultyBreakDoors.put( + entitiesDifficultyBreakDoors.put(