centralize all ModConfig.SERVER reads through SettingsAccessor
No more direct ModConfig.SERVER access outside SettingsAccessor. 32 new accessor methods, 21 consumer files rerouted.
This commit is contained in:
@@ -335,9 +335,9 @@ public class EntityKidnapperArcher
|
||||
public int getBindChanceForTarget(UUID targetUUID) {
|
||||
int hitCount = targetHitCounts.getOrDefault(targetUUID, 0);
|
||||
int baseChance =
|
||||
com.tiedup.remake.core.ModConfig.SERVER.archerArrowBindChanceBase.get();
|
||||
SettingsAccessor.getArcherArrowBindChanceBase();
|
||||
int perHitChance =
|
||||
com.tiedup.remake.core.ModConfig.SERVER.archerArrowBindChancePerHit.get();
|
||||
SettingsAccessor.getArcherArrowBindChancePerHit();
|
||||
|
||||
int chance = baseChance + (hitCount * perHitChance);
|
||||
return Math.min(chance, ARCHER_MAX_BIND_CHANCE);
|
||||
|
||||
Reference in New Issue
Block a user