Skip to content

Commit 8830ee9

Browse files
committed
Fix server config player_relations being reset
1 parent ad515d4 commit 8830ee9

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 1.7.4
22

33
- No longer ignore `attackCooldown` field in MinecraftClient, for better compatibility with other mods
4+
- Fix server config `player_relations` being reset on every launch
45

56
# 1.7.3
67

common/src/main/java/net/bettercombat/config/ServerConfig.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.Comment;
66
import net.bettercombat.logic.TargetHelper;
77

8+
import java.util.HashMap;
89
import java.util.Map;
910

1011
@Config(name = "server")
@@ -88,12 +89,13 @@ Entities struck (+1) in a swing more than this, won't get weakened any further.
8889
- `player_relation_to_other`
8990
(The first relation to be found for the target will be applied.)
9091
""")
91-
public Map<String, TargetHelper.Relation> player_relations = Map.of(
92-
"minecraft:player", TargetHelper.Relation.NEUTRAL,
93-
"minecraft:villager", TargetHelper.Relation.NEUTRAL,
94-
"minecraft:iron_golem", TargetHelper.Relation.NEUTRAL,
95-
"guardvillagers:guard", TargetHelper.Relation.NEUTRAL
96-
);
92+
public HashMap<String, TargetHelper.Relation> player_relations = new HashMap<>() {{
93+
put("minecraft:player", TargetHelper.Relation.NEUTRAL);
94+
put("minecraft:villager", TargetHelper.Relation.NEUTRAL);
95+
put("minecraft:iron_golem", TargetHelper.Relation.NEUTRAL);
96+
put("guardvillagers:guard", TargetHelper.Relation.NEUTRAL);
97+
}};
98+
9799
@Comment("Relation to unspecified entities those are instance of PassiveEntity(Yarn)")
98100
public TargetHelper.Relation player_relation_to_passives = TargetHelper.Relation.HOSTILE;
99101
@Comment("Relation to unspecified entities those are instance of HostileEntity(Yarn)")

0 commit comments

Comments
 (0)