Skip to content

Commit

Permalink
Combatify 1.2.0 1.20.5-rc2 Beta 5 - Translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra-Myers committed Apr 21, 2024
1 parent a3d8086 commit 411015c
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 9 deletions.
14 changes: 8 additions & 6 deletions src/main/java/net/atlas/combatify/config/AtlasConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,20 @@ public BooleanHolder createBoolean(String name, boolean defaultVal) {
return booleanHolder;
}
public IntegerHolder createIntegerUnbound(String name, Integer defaultVal) {
IntegerHolder integerHolder = new IntegerHolder(new ConfigValue<>(defaultVal, null, false, name, this));
IntegerHolder integerHolder = new IntegerHolder(new ConfigValue<>(defaultVal, null, false, name, this), false);
integerValues.add(integerHolder);
holders.add(integerHolder);
return integerHolder;
}
public IntegerHolder createInRestrictedValues(String name, Integer defaultVal, Integer... values) {
IntegerHolder integerHolder = new IntegerHolder(new ConfigValue<>(defaultVal, values, false, name, this));
IntegerHolder integerHolder = new IntegerHolder(new ConfigValue<>(defaultVal, values, false, name, this), false);
integerValues.add(integerHolder);
holders.add(integerHolder);
return integerHolder;
}
public IntegerHolder createInRange(String name, int defaultVal, int min, int max) {
public IntegerHolder createInRange(String name, int defaultVal, int min, int max, boolean isSlider) {
Integer[] range = new Integer[]{min, max};
IntegerHolder integerHolder = new IntegerHolder(new ConfigValue<>(defaultVal, range, true, name, this));
IntegerHolder integerHolder = new IntegerHolder(new ConfigValue<>(defaultVal, range, true, name, this), isSlider);
integerValues.add(integerHolder);
holders.add(integerHolder);
return integerHolder;
Expand Down Expand Up @@ -405,14 +405,16 @@ public AbstractConfigListEntry<?> transformIntoConfigEntry() {
}
}
public static class IntegerHolder extends ConfigHolder<Integer> {
private IntegerHolder(ConfigValue<Integer> value) {
public final boolean isSlider;
private IntegerHolder(ConfigValue<Integer> value, boolean isSlider) {
super(value, ByteBufCodecs.VAR_INT, (writer, i) -> {
try {
writer.value(i);
} catch (IOException e) {
throw new RuntimeException(e);
}
});
this.isSlider = isSlider;
}

@Override
Expand All @@ -425,7 +427,7 @@ public boolean isNotValid(Integer newValue) {

@Override
public AbstractConfigListEntry<?> transformIntoConfigEntry() {
if (!heldValue.isRange)
if (!heldValue.isRange || !isSlider)
return new IntegerListEntry(Component.translatable(getTranslationKey()), get(), Component.translatable(getTranslationResetKey()), () -> heldValue.defaultValue, this::setValue, tooltip, restartRequired);
return new IntegerSliderEntry(Component.translatable(getTranslationKey()), heldValue.possibleValues[0], heldValue.possibleValues[1], get(), Component.translatable(getTranslationResetKey()), () -> heldValue.defaultValue, this::setValue, tooltip, restartRequired);
}
Expand Down
27 changes: 24 additions & 3 deletions src/main/java/net/atlas/combatify/config/CombatifyBetaConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public void saveExtra(JsonWriter jsonWriter, PrintWriter printWriter) {
public void defineConfigHolders() {
attackDecay = createBoolean("attackDecay", false);
attackDecay.tieToCategory(ctsB);
attackDecay.setupTooltip(1);
attackReach = createBoolean("attackReach", true);
attackReach.tieToCategory(ctsB);
attackReach.setupTooltip(1);
Expand All @@ -116,27 +117,37 @@ public void defineConfigHolders() {
autoAttackAllowed.setupTooltip(1);
bedrockImpaling = createBoolean("bedrockImpaling", true);
bedrockImpaling.tieToCategory(ctsB);
bedrockImpaling.setupTooltip(1);
bowFatigue = createBoolean("bowFatigue", true);
bowFatigue.tieToCategory(ctsB);
bowFatigue.setupTooltip(4);
canAttackEarly = createBoolean("canAttackEarly", false);
canAttackEarly.tieToCategory(ctsB);
canAttackEarly.setupTooltip(1);
canSweepOnMiss = createBoolean("canSweepOnMiss", true);
canSweepOnMiss.tieToCategory(ctsB);
canSweepOnMiss.setupTooltip(1);
chargedAttacks = createBoolean("chargedAttacks", true);
chargedAttacks.tieToCategory(ctsB);
chargedAttacks.setupTooltip(1);
chargedReach = createBoolean("chargedReach", true);
chargedReach.tieToCategory(ctsB);
chargedReach.setupTooltip(1);
creativeReach = createBoolean("creativeReach", false);
creativeReach.tieToCategory(ctsB);
creativeReach.setupTooltip(1);
ctsAttackBalancing = createBoolean("ctsAttackBalancing", true);
ctsAttackBalancing.tieToCategory(ctsB);
ctsAttackBalancing.setupTooltip(1);
ctsKB = createBoolean("ctsKB", true);
ctsKB.tieToCategory(ctsB);
ctsKB.setupTooltip(1);
ctsMomentumPassedToProjectiles = createBoolean("ctsMomentumPassedToProjectiles", true);
ctsMomentumPassedToProjectiles.tieToCategory(ctsB);
ctsMomentumPassedToProjectiles.setupTooltip(1);
dispensableTridents = createBoolean("dispensableTridents", true);
dispensableTridents.tieToCategory(ctsB);
dispensableTridents.setupTooltip(1);
eatingInterruption = createBoolean("eatingInterruption", true);
eatingInterruption.tieToCategory(ctsB);
eatingInterruption.setupTooltip(1);
Expand All @@ -145,15 +156,19 @@ public void defineConfigHolders() {
fistDamage.setupTooltip(1);
hasMissTime = createBoolean("hasMissTime", false);
hasMissTime.tieToCategory(ctsB);
hasMissTime.setupTooltip(1);
missedAttackRecovery = createBoolean("missedAttackRecovery", true);
missedAttackRecovery.tieToCategory(ctsB);
missedAttackRecovery.setupTooltip(1);
percentageDamageEffects = createBoolean("percentageDamageEffects", true);
percentageDamageEffects.tieToCategory(ctsB);
percentageDamageEffects.setupTooltip(1);
projectilesHaveIFrames = createBoolean("projectilesHaveIFrames", false);
projectilesHaveIFrames.tieToCategory(ctsB);
projectilesHaveIFrames.setupTooltip(1);
resetOnItemChange = createBoolean("resetOnItemChange", false);
resetOnItemChange.tieToCategory(ctsB);
resetOnItemChange.setupTooltip(1);
fastHealing = createBoolean("fastHealing", false);
fastHealing.tieToCategory(ctsB);
fastHealing.setupTooltip(1);
Expand All @@ -168,21 +183,27 @@ public void defineConfigHolders() {
sprintCritsEnabled.setupTooltip(1);
strengthAppliesToEnchants = createBoolean("strengthAppliesToEnchants", true);
strengthAppliesToEnchants.tieToCategory(ctsB);
strengthAppliesToEnchants.setupTooltip(1);
sweepWithSweeping = createBoolean("sweepWithSweeping", true);
sweepWithSweeping.tieToCategory(ctsB);
sweepWithSweeping.setupTooltip(1);
swingThroughGrass = createBoolean("swingThroughGrass", true);
swingThroughGrass.tieToCategory(ctsB);
swingThroughGrass.setupTooltip(1);
tridentVoidReturn = createBoolean("tridentVoidReturn", true);
tridentVoidReturn.tieToCategory(ctsB);
tridentVoidReturn.setupTooltip(1);
vanillaSweep = createBoolean("vanillaSweep", false);
vanillaSweep.tieToCategory(ctsB);
vanillaSweep.setupTooltip(1);
weaponTypesEnabled = createBoolean("weaponTypesEnabled", true);
weaponTypesEnabled.tieToCategory(ctsB);
weaponTypesEnabled.setupTooltip(3);

shieldDelay = createInRange("shieldDelay", 0, 0, 2000);
shieldDelay = createInRange("shieldDelay", 0, 0, 2000, false);
shieldDelay.tieToCategory(ctsI);
shieldDelay.setupTooltip(1);
instantHealthBonus = createInRange("instantHealthBonus", 6, 1, 1000);
instantHealthBonus = createInRange("instantHealthBonus", 6, 1, 1000, false);
instantHealthBonus.tieToCategory(ctsI);

baseHandAttackSpeed = createInRange("baseHandAttackSpeed", 2.5, 2.5, 20);
Expand Down Expand Up @@ -257,7 +278,7 @@ public void defineConfigHolders() {
swordBlocking.tieToCategory(extraB);
swordBlocking.setupTooltip(1);

shieldChargePercentage = createInRange("shieldChargePercentage", 195, 1, 200);
shieldChargePercentage = createInRange("shieldChargePercentage", 195, 1, 200, true);
shieldChargePercentage.tieToCategory(extraI);
shieldChargePercentage.setupTooltip(1);

Expand Down
50 changes: 50 additions & 0 deletions src/main/resources/assets/combatify/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,74 @@
"text.config.combatify-beta.category.extra_integers": "Extra Integers",
"text.config.combatify-beta.category.extra_doubles": "Extra Doubles",
"text.config.combatify-beta.category.extra_enums": "Extra Enums",
"text.config.combatify-beta.option.attackDecay": "Attack Decay",
"text.config.combatify-beta.option.attackDecay.tooltip.0": "Determines whether or not damage will decay based on percentage if used before 100%.",
"text.config.combatify-beta.option.attackReach": "Attack Reach Enabled",
"text.config.combatify-beta.option.attackReach.tooltip.0": "Determines whether or not items will have unique attack reach.",
"text.config.combatify-beta.option.autoAttackAllowed": "Auto Attack Allowed",
"text.config.combatify-beta.option.autoAttackAllowed.tooltip.0": "Option for servers which will prevent using auto-attack on client.",
"text.config.combatify-beta.option.bedrockImpaling": "Bedrock Impaling",
"text.config.combatify-beta.option.bedrockImpaling.tooltip.0": "Impaling activates in water or rain rather than just on specific entities.",
"text.config.combatify-beta.option.bowFatigue": "Bow Fatigue",
"text.config.combatify-beta.option.bowFatigue.tooltip.0": "Whether bows will fatigue when held for too long.",
"text.config.combatify-beta.option.bowFatigue.tooltip.1": " This has two effects:",
"text.config.combatify-beta.option.bowFatigue.tooltip.2": " 1. Arrows will not be critical.",
"text.config.combatify-beta.option.bowFatigue.tooltip.3": " 2. Arrows lose accuracy over time.",
"text.config.combatify-beta.option.canAttackEarly": "Can Attack Early",
"text.config.combatify-beta.option.canAttackEarly.tooltip.0": "Whether you can attack before you would normally be allowed.",
"text.config.combatify-beta.option.canSweepOnMiss": "Can Sweep On Miss",
"text.config.combatify-beta.option.canSweepOnMiss.tooltip.0": "Whether sweeping occurs on misses.",
"text.config.combatify-beta.option.chargedAttacks": "Charged Attacks",
"text.config.combatify-beta.option.chargedAttacks.tooltip.0": "Whether attacks can go up to 200%.",
"text.config.combatify-beta.option.chargedAttacks.tooltip.1": " Note: For abilities that occur on charged attacks, they become on 90% charge if this is disabled",
"text.config.combatify-beta.option.chargedReach": "Charged Reach",
"text.config.combatify-beta.option.chargedReach.tooltip.0": "Whether reach is gained on charged attacks.",
"text.config.combatify-beta.option.creativeReach": "Creative Reach",
"text.config.combatify-beta.option.creativeReach.tooltip.0": "Whether creative mode increases reach.",
"text.config.combatify-beta.option.ctsAttackBalancing": "CTS Attack Damage Balancing",
"text.config.combatify-beta.option.ctsAttackBalancing.tooltip.0": "Determines whether or not weapons will deal less damage than they do in 1.9.",
"text.config.combatify-beta.option.ctsKB": "CTS Knockback",
"text.config.combatify-beta.option.ctsKB.tooltip.0": "Whether the KB from CTS will be used instead of 1.9.",
"text.config.combatify-beta.option.ctsMomentumPassedToProjectiles": "CTS Momentum Passed To Projectiles",
"text.config.combatify-beta.option.ctsMomentumPassedToProjectiles.tooltip.0": "Whether momentum from the user will be passed to the projectile in the CTS way or 1.9.",
"text.config.combatify-beta.option.dispensableTridents": "Dispensable Tridents",
"text.config.combatify-beta.option.dispensableTridents.tooltip.0": "Whether tridents can be shot out of a dispenser.",
"text.config.combatify-beta.option.eatingInterruption": "Eating Interruption Enabled",
"text.config.combatify-beta.option.eatingInterruption.tooltip.0": "Eating progress resets when attacked.",
"text.config.combatify-beta.option.fistDamage": "CTS Fist Damage",
"text.config.combatify-beta.option.fistDamage.tooltip.0": "Fist Damage is updated to 1, matching the change made to Bedrock Edition.",
"text.config.combatify-beta.option.hasMissTime": "Has Miss Time",
"text.config.combatify-beta.option.hasMissTime.tooltip.0": "What this does has yet to be identified.",
"text.config.combatify-beta.option.missedAttackRecovery": "Missed Attack Recovery",
"text.config.combatify-beta.option.missedAttackRecovery.tooltip.0": "Whether missed attacks trigger a 4-tick cooldown instead of requiring 100%.",
"text.config.combatify-beta.option.percentageDamageEffects": "Percentage Damage Effects",
"text.config.combatify-beta.option.percentageDamageEffects.tooltip.0": "Strength and Weakness work as percentage buffs rather than flat increases.",
"text.config.combatify-beta.option.projectilesHaveIFrames": "Projectiles Have I-Frames",
"text.config.combatify-beta.option.projectilesHaveIFrames.tooltip.0": "Determines if projectile damage sources have I-Frames.",
"text.config.combatify-beta.option.resetOnItemChange": "Reset On Item Change",
"text.config.combatify-beta.option.resetOnItemChange.tooltip.0": "Attack cooldown resets when changing items.",
"text.config.combatify-beta.option.fastHealing": "Fast Healing",
"text.config.combatify-beta.option.fastHealing.tooltip.0": "Allows for fast healing like in 1.9+ when you have high saturation.",
"text.config.combatify-beta.option.saturationHealing": "Saturation Healing",
"text.config.combatify-beta.option.saturationHealing.tooltip.0": "Healing relies on saturation as a buffer, rather than just taking hunger.",
"text.config.combatify-beta.option.snowballKB": "Snowballs Trigger KB",
"text.config.combatify-beta.option.snowballKB.tooltip.0": "Allows damage sources that deal 0 damage to trigger KB.",
"text.config.combatify-beta.option.sprintCritsEnabled": "Sprint Crits Enabled",
"text.config.combatify-beta.option.sprintCritsEnabled.tooltip.0": "Can crit while sprinting.",
"text.config.combatify-beta.option.strengthAppliesToEnchants": "Strength Applies To Enchants",
"text.config.combatify-beta.option.strengthAppliesToEnchants.tooltip.0": "Allows Strength and Weakness to impact the damage gained from enchantments.",
"text.config.combatify-beta.option.sweepWithSweeping": "Sweep With Sweeping",
"text.config.combatify-beta.option.sweepWithSweeping.tooltip.0": "Allows any item to sweep given it has sweeping.",
"text.config.combatify-beta.option.swingThroughGrass": "Swing Through Grass",
"text.config.combatify-beta.option.swingThroughGrass.tooltip.0": "Allows attacking through non-solid blocks.",
"text.config.combatify-beta.option.tridentVoidReturn": "Trident Returns From The Void",
"text.config.combatify-beta.option.tridentVoidReturn.tooltip.0": "Allows Tridents with Loyalty to return to you from the void.",
"text.config.combatify-beta.option.vanillaSweep": "Vanilla Sweeping Ratios",
"text.config.combatify-beta.option.vanillaSweep.tooltip.0": "Whether Sweeping Edge should use ratios from 1.9 over CTS.",
"text.config.combatify-beta.option.weaponTypesEnabled": "Weapon Types Enabled",
"text.config.combatify-beta.option.weaponTypesEnabled.tooltip.0": "Whether Weapon Types should be used for providing new default stats.",
"text.config.combatify-beta.option.weaponTypesEnabled.tooltip.1": " Note: Means that items will possess their vanilla stats by default.",
"text.config.combatify-beta.option.weaponTypesEnabled.tooltip.2": " Note: Does not override Items Config.",

"text.config.combatify-beta.option.shieldDelay": "Shield Delay",
"text.config.combatify-beta.option.shieldDelay.tooltip.0": "Time, in ticks, for which shields will have to be held before being able to protect the user.",
Expand Down

0 comments on commit 411015c

Please sign in to comment.