Skip to content

Commit

Permalink
config screen
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoLezury committed Jul 28, 2024
1 parent c2e8a42 commit ecb5bd5
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ minecraft_version=1.21
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.21,1.21.1)
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.0.109-beta
neo_version=21.0.140-beta
# The Neo version range can use any version of Neo as bounds
neo_version_range=[21.0.0-beta,)
# The loader version range can only use the major version of FML as bounds
Expand All @@ -39,4 +39,4 @@ mod_group_id=team.leomc.assortedarmaments
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=PHVictor, LeoLezury
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=A minecraft mod that adds more types of weapons
mod_description=A Minecraft mod that adds more types of weapons
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21 2024-07-27T18:17:17.9907487 Languages: en_us for mod: assorted_armaments
ff350f66c8f4d491c19b2203c10bec93a040f10d assets/assorted_armaments/lang/en_us.json
// 1.21 2024-07-28T12:13:49.762495 Languages: en_us for mod: assorted_armaments
2833a3c34e77fcb13d1ab5c219dabc4008b94982 assets/assorted_armaments/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21 2024-07-27T18:17:17.9907487 Languages: zh_cn for mod: assorted_armaments
cfe63087b401f7108dba47cfb36c5341cba7294e assets/assorted_armaments/lang/zh_cn.json
// 1.21 2024-07-28T12:13:49.762495 Languages: zh_cn for mod: assorted_armaments
e4393033239b758971bd2805ad0b50ee07261a2e assets/assorted_armaments/lang/zh_cn.json
10 changes: 10 additions & 0 deletions src/generated/resources/assets/assorted_armaments/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"assorted_armaments.configuration.armorBasedAttackDamagePercentage": "Armor Based Attack Damage Percentage",
"assorted_armaments.configuration.blockWalkSpeedModifier": "Block Walk Speed Modifier",
"assorted_armaments.configuration.flailMaxUseDuration": "Maximum Flail Use Duration",
"assorted_armaments.configuration.flailSpinCooldown": "Flail Spin Cooldown",
"assorted_armaments.configuration.flailSpinDamageFactor": "Flail Spin Damage Factor",
"assorted_armaments.configuration.flailSpinKnockbackFactor": "Flail Spin Knockback Factor",
"assorted_armaments.configuration.flailThrowMinUseDuration": "Minimum Use Duration to Throw a Flail",
"assorted_armaments.configuration.piglinUseWeaponChance": "Chance of a Piglin Using a Modded Weapon",
"assorted_armaments.configuration.zombieUseWeaponChance": "Chance of a Zombie Using a Modded Weapon",
"desc.assorted_armaments.armor_based_damage": "Deals extra damage to enemies with armor",
"desc.assorted_armaments.can_block": "Can be used to block melee damage that is equal to half of the weapon's damage",
"desc.assorted_armaments.disables_blocking_on_attack": "Disables the target's ability to block",
Expand All @@ -8,6 +17,7 @@
"desc.assorted_armaments.shift": "Hold [SHIFT] for more information",
"desc.assorted_armaments.two_handed": "Disables offhand items when held in main hand",
"entity.assorted_armaments.flail": "Flail",
"fml.menu.mods.info.description.assorted_armaments": "A Minecraft mod that adds more types of weapons",
"item.assorted_armaments.diamond_claymore": "Diamond Claymore",
"item.assorted_armaments.diamond_flail": "Diamond Flail",
"item.assorted_armaments.diamond_mace": "Diamond Mace",
Expand Down
10 changes: 10 additions & 0 deletions src/generated/resources/assets/assorted_armaments/lang/zh_cn.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"assorted_armaments.configuration.armorBasedAttackDamagePercentage": "基于盔甲的伤害百分比",
"assorted_armaments.configuration.blockWalkSpeedModifier": "格挡行走速度因数",
"assorted_armaments.configuration.flailMaxUseDuration": "流星锤最长使用时间",
"assorted_armaments.configuration.flailSpinCooldown": "流星锤旋转冷却",
"assorted_armaments.configuration.flailSpinDamageFactor": "流星锤旋转伤害因数",
"assorted_armaments.configuration.flailSpinKnockbackFactor": "流星锤旋转击退因数",
"assorted_armaments.configuration.flailThrowMinUseDuration": "投掷流星锤最短所需时间",
"assorted_armaments.configuration.piglinUseWeaponChance": "猪灵使用模组武器几率",
"assorted_armaments.configuration.zombieUseWeaponChance": "僵尸使用模组武器几率",
"desc.assorted_armaments.armor_based_damage": "对有护甲的敌人造成额外伤害",
"desc.assorted_armaments.can_block": "可以格挡武器伤害一半大小的近战伤害",
"desc.assorted_armaments.disables_blocking_on_attack": "攻击被格挡时使目标失去格挡能力",
Expand All @@ -8,6 +17,7 @@
"desc.assorted_armaments.shift": "按[SHIFT]查看更多信息",
"desc.assorted_armaments.two_handed": "拿在主手时禁用副手物品",
"entity.assorted_armaments.flail": "流星锤",
"fml.menu.mods.info.description.assorted_armaments": "一个添加更多类型武器的模组",
"item.assorted_armaments.diamond_claymore": "钻石大剑",
"item.assorted_armaments.diamond_flail": "钻石流星锤",
"item.assorted_armaments.diamond_mace": "钻石钉头锤",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package team.leomc.assortedarmaments;

import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.gui.ConfigurationScreen;
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;

@OnlyIn(Dist.CLIENT)
@Mod(value = AssortedArmaments.ID, dist = Dist.CLIENT)
public class AssortedArmamentsClient {
public AssortedArmamentsClient(IEventBus modBus, ModContainer container) {
container.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ public AAChineseLanguageProvider(PackOutput output) {
@Override
protected void addTranslations() {
add("name." + AssortedArmaments.ID, "百般武艺");
add("fml.menu.mods.info.description." + AssortedArmaments.ID, "一个添加更多类型武器的模组");

add(AssortedArmaments.ID + ".configuration.blockWalkSpeedModifier", "格挡行走速度因数");
add(AssortedArmaments.ID + ".configuration.armorBasedAttackDamagePercentage", "基于盔甲的伤害百分比");
add(AssortedArmaments.ID + ".configuration.flailMaxUseDuration", "流星锤最长使用时间");
add(AssortedArmaments.ID + ".configuration.flailThrowMinUseDuration", "投掷流星锤最短所需时间");
add(AssortedArmaments.ID + ".configuration.flailSpinCooldown", "流星锤旋转冷却");
add(AssortedArmaments.ID + ".configuration.flailSpinDamageFactor", "流星锤旋转伤害因数");
add(AssortedArmaments.ID + ".configuration.flailSpinKnockbackFactor", "流星锤旋转击退因数");
add(AssortedArmaments.ID + ".configuration.zombieUseWeaponChance", "僵尸使用模组武器几率");
add(AssortedArmaments.ID + ".configuration.piglinUseWeaponChance", "猪灵使用模组武器几率");

add("desc." + AssortedArmaments.ID + ".shift", "按[SHIFT]查看更多信息");
add("desc." + AssortedArmaments.ID + ".can_block", "可以格挡武器伤害一半大小的近战伤害");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ public AAEnglishLanguageProvider(PackOutput output) {
@Override
protected void addTranslations() {
add("name." + AssortedArmaments.ID, "Assorted Armaments");
add("fml.menu.mods.info.description." + AssortedArmaments.ID, "A Minecraft mod that adds more types of weapons");

add(AssortedArmaments.ID + ".configuration.blockWalkSpeedModifier", "Block Walk Speed Modifier");
add(AssortedArmaments.ID + ".configuration.armorBasedAttackDamagePercentage", "Armor Based Attack Damage Percentage");
add(AssortedArmaments.ID + ".configuration.flailMaxUseDuration", "Maximum Flail Use Duration");
add(AssortedArmaments.ID + ".configuration.flailThrowMinUseDuration", "Minimum Use Duration to Throw a Flail");
add(AssortedArmaments.ID + ".configuration.flailSpinCooldown", "Flail Spin Cooldown");
add(AssortedArmaments.ID + ".configuration.flailSpinDamageFactor", "Flail Spin Damage Factor");
add(AssortedArmaments.ID + ".configuration.flailSpinKnockbackFactor", "Flail Spin Knockback Factor");
add(AssortedArmaments.ID + ".configuration.zombieUseWeaponChance", "Chance of a Zombie Using a Modded Weapon");
add(AssortedArmaments.ID + ".configuration.piglinUseWeaponChance", "Chance of a Piglin Using a Modded Weapon");

add("desc." + AssortedArmaments.ID + ".shift", "Hold [SHIFT] for more information");
add("desc." + AssortedArmaments.ID + ".can_block", "Can be used to block melee damage that is equal to half of the weapon's damage");
Expand Down

0 comments on commit ecb5bd5

Please sign in to comment.