|
5 | 5 | import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.Comment;
|
6 | 6 | import net.bettercombat.logic.TargetHelper;
|
7 | 7 |
|
| 8 | +import java.util.Map; |
| 9 | + |
8 | 10 | @Config(name = "server")
|
9 | 11 | public class ServerConfig implements ConfigData {
|
10 | 12 | @Comment("""
|
@@ -71,12 +73,34 @@ Entities struck (+1) in a swing more than this, won't get weakened any further.
|
71 | 73 | public float dual_wielding_main_hand_damage_multiplier = 1F;
|
72 | 74 | @Comment("Total multiplier, (examples: +30% = 1.3, -30% = 0.7)")
|
73 | 75 | public float dual_wielding_off_hand_damage_multiplier = 1F;
|
74 |
| - @Comment("Entities with `HOSTILE` relation will be hit by undirected weapon swings. NOTE: Vanilla sweeping will still happen, if not disabled via `allow_sweeping`") |
75 |
| - public TargetHelper.Relation player_relation_to_teamless_players = TargetHelper.Relation.NEUTRAL; |
76 |
| - public TargetHelper.Relation player_relation_to_villagers = TargetHelper.Relation.NEUTRAL; |
| 76 | + |
| 77 | + @Comment(""" |
| 78 | + Relations determine when players' undirected weapon swings (cleaves) will hurt another entity (target). |
| 79 | + - `FRIENDLY` - The target can never be damaged by the player. |
| 80 | + - `NEUTRAL` - The target can be damaged only if the player is directly looking at it. |
| 81 | + - `HOSTILE` - The target can be damaged if located within the weapon swing area. |
| 82 | + (NOTE: Vanilla sweeping can still hit targets, if not disabled via `allow_sweeping`) |
| 83 | + |
| 84 | + The various relation related configs are being checked in the following order: |
| 85 | + - `player_relations` |
| 86 | + - `player_relation_to_passives` |
| 87 | + - `player_relation_to_hostiles` |
| 88 | + - `player_relation_to_other` |
| 89 | + (The first relation to be found for the target will be applied.) |
| 90 | + """) |
| 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 | + ); |
| 97 | + @Comment("Relation to unspecified entities those are instance of PassiveEntity(Yarn)") |
77 | 98 | public TargetHelper.Relation player_relation_to_passives = TargetHelper.Relation.HOSTILE;
|
| 99 | + @Comment("Relation to unspecified entities those are instance of HostileEntity(Yarn)") |
78 | 100 | public TargetHelper.Relation player_relation_to_hostiles = TargetHelper.Relation.HOSTILE;
|
| 101 | + @Comment("Fallback relation") |
79 | 102 | public TargetHelper.Relation player_relation_to_other = TargetHelper.Relation.HOSTILE;
|
| 103 | + |
80 | 104 | @Comment("Try to guess and apply a preset for items without weapon attributes data file")
|
81 | 105 | public boolean fallback_compatibility_enabled = true;
|
82 | 106 | @Comment("Allow printing the content of weapon attributes registry")
|
|
0 commit comments