修改配置名称
This commit is contained in:
parent
11729e259a
commit
56ec3f2766
5 changed files with 11 additions and 11 deletions
|
@ -91,7 +91,7 @@ public class ClickHandler {
|
|||
event.setCanceled(true);
|
||||
|
||||
if (stack.is(ModTags.Items.GUN) && !stack.is(ModTags.Items.CANNOT_RELOAD) && stack.getOrCreateTag().getInt("ammo") <= 0) {
|
||||
if (ReloadConfig.EMPTY_AUTO_RELOAD.get()) {
|
||||
if (ReloadConfig.LEFT_CLICK_RELOAD.get()) {
|
||||
ModUtils.PACKET_HANDLER.sendToServer(new ReloadMessage(0));
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -12,10 +12,10 @@ public class ReloadClothConfig {
|
|||
ConfigCategory category = root.getOrCreateCategory(Component.translatable("config.superbwarfare.client.reload"));
|
||||
|
||||
category.addEntry(entryBuilder
|
||||
.startBooleanToggle(Component.translatable("config.superbwarfare.client.reload.empty_auto_reload"), ReloadConfig.EMPTY_AUTO_RELOAD.get())
|
||||
.startBooleanToggle(Component.translatable("config.superbwarfare.client.reload.left_click_reload"), ReloadConfig.LEFT_CLICK_RELOAD.get())
|
||||
.setDefaultValue(true)
|
||||
.setSaveConsumer(ReloadConfig.EMPTY_AUTO_RELOAD::set)
|
||||
.setTooltip(Component.translatable("config.superbwarfare.client.reload.empty_auto_reload.des")).build()
|
||||
.setSaveConsumer(ReloadConfig.LEFT_CLICK_RELOAD::set)
|
||||
.setTooltip(Component.translatable("config.superbwarfare.client.reload.left_click_reload.des")).build()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@ import net.minecraftforge.common.ForgeConfigSpec;
|
|||
|
||||
public class ReloadConfig {
|
||||
|
||||
public static ForgeConfigSpec.BooleanValue EMPTY_AUTO_RELOAD;
|
||||
public static ForgeConfigSpec.BooleanValue LEFT_CLICK_RELOAD;
|
||||
|
||||
public static void init(ForgeConfigSpec.Builder builder) {
|
||||
builder.push("reload");
|
||||
|
||||
builder.comment("Set TRUE if you want to reload guns when ammo is empty");
|
||||
EMPTY_AUTO_RELOAD = builder.define("empty_auto_reload", true);
|
||||
builder.comment("Set TRUE if you want to reload guns when ammo is empty by clicking left button");
|
||||
LEFT_CLICK_RELOAD = builder.define("left_click_reload", true);
|
||||
|
||||
builder.pop();
|
||||
}
|
||||
|
|
|
@ -346,8 +346,8 @@
|
|||
|
||||
"config.superbwarfare.title": "卓越前线:配置",
|
||||
"config.superbwarfare.client.reload": "换弹配置",
|
||||
"config.superbwarfare.client.reload.empty_auto_reload": "自动换弹",
|
||||
"config.superbwarfare.client.reload.empty_auto_reload.des": "在当前弹匣为空时,点击开火键以进行换弹",
|
||||
"config.superbwarfare.client.reload.left_click_reload": "开火换弹",
|
||||
"config.superbwarfare.client.reload.left_click_reload.des": "在当前弹匣为空时,点击开火键以进行换弹",
|
||||
"config.superbwarfare.client.kill_message": "击杀信息配置",
|
||||
"config.superbwarfare.client.kill_message.show_kill_message": "显示击杀信息",
|
||||
"config.superbwarfare.client.kill_message.show_kill_message.des": "开启时,在屏幕右上角显示击杀信息",
|
||||
|
|
|
@ -345,8 +345,8 @@
|
|||
|
||||
"config.superbwarfare.title": "卓越前线",
|
||||
"config.superbwarfare.client.reload": "换弹配置",
|
||||
"config.superbwarfare.client.reload.empty_auto_reload": "自动换弹",
|
||||
"config.superbwarfare.client.reload.empty_auto_reload.des": "在当前弹匣为空时,点击开火键以进行换弹",
|
||||
"config.superbwarfare.client.reload.left_click_reload": "开火换弹",
|
||||
"config.superbwarfare.client.reload.left_click_reload.des": "在当前弹匣为空时,点击开火键以进行换弹",
|
||||
"config.superbwarfare.client.kill_message": "击杀信息配置",
|
||||
"config.superbwarfare.client.kill_message.show_kill_message": "显示击杀信息",
|
||||
"config.superbwarfare.client.kill_message.show_kill_message.des": "开启时,在屏幕右上角显示击杀信息",
|
||||
|
|
Loading…
Add table
Reference in a new issue