添加无线收发器频道设置、样板供应器状态控制提示、映射文件、命令翻译键
This commit is contained in:
parent
19cf58a7e4
commit
85b85aed73
|
|
@ -75,8 +75,8 @@ public class SetWirelessFrequencyC2SPacket {
|
||||||
|
|
||||||
// 发送反馈消息
|
// 发送反馈消息
|
||||||
player.displayClientMessage(
|
player.displayClientMessage(
|
||||||
Component.literal("频道已设置为:" + te.getFrequency()),
|
Component.translatable("extendedae_plus.chat.wireless_transceiver.channel_set", te.getFrequency()),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
ctx.get().setPacketHandled(true);
|
ctx.get().setPacketHandled(true);
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,7 @@ public class GlobalToggleProviderModesC2SPacket {
|
||||||
|
|
||||||
int affected = applyToAllProviders(grid, msg);
|
int affected = applyToAllProviders(grid, msg);
|
||||||
// 向发起玩家反馈影响数量,便于判断按钮是否生效
|
// 向发起玩家反馈影响数量,便于判断按钮是否生效
|
||||||
player.displayClientMessage(Component.literal("E+ 全局切换已应用到 " + affected + " 个样板供应器"), true);
|
player.displayClientMessage(Component.translatable("extendedae_plus.chat.pattern_provider.global_toggle_applied", affected), true); });
|
||||||
});
|
|
||||||
ctx.setPacketHandled(true);
|
ctx.setPacketHandled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ public class InfinityDiskGiveCommand {
|
||||||
try {
|
try {
|
||||||
ServerPlayer player = source.getPlayerOrException();
|
ServerPlayer player = source.getPlayerOrException();
|
||||||
if (player.level() == null || !(player.level() instanceof ServerLevel)) {
|
if (player.level() == null || !(player.level() instanceof ServerLevel)) {
|
||||||
source.sendFailure(Component.literal("This command must be run on server side."));
|
source.sendFailure(Component.translatable("extendedae_plus.command.server_side_only"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
InfinityStorageManager mgr = ExtendedAEPlus.STORAGE_INSTANCE;
|
InfinityStorageManager mgr = ExtendedAEPlus.STORAGE_INSTANCE;
|
||||||
if (mgr == null) {
|
if (mgr == null) {
|
||||||
source.sendFailure(Component.literal("InfinityStorageManager is not initialized."));
|
source.sendFailure(Component.translatable("extendedae_plus.command.storage_manager_not_initialized"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,13 +50,11 @@ public class InfinityDiskGiveCommand {
|
||||||
given++;
|
given++;
|
||||||
}
|
}
|
||||||
final int finalGiven = given;
|
final int finalGiven = given;
|
||||||
source.sendSuccess(() -> Component.literal("Gave " + finalGiven + " infinity disks."), false);
|
source.sendSuccess(() -> Component.translatable("extendedae_plus.command.gave_infinity_disks", finalGiven), false);
|
||||||
return given;
|
return given;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
source.sendFailure(Component.literal("Error: " + ex.getMessage()));
|
source.sendFailure(Component.translatable("extendedae_plus.command.error", ex.getMessage()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -181,8 +181,7 @@ public final class RecipeTypeNameConfig {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (IOException | JsonSyntaxException e) {
|
} catch (IOException | JsonSyntaxException e) {
|
||||||
sendPlayerMessage(Component.literal("ExtendedAE_Plus: 配置文件更新失败: " + e.getMessage()));
|
sendPlayerMessage(Component.translatable("extendedae_plus.message.config_update_failed", e.getMessage())); return false;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,7 +229,7 @@ public final class RecipeTypeNameConfig {
|
||||||
}
|
}
|
||||||
return toRemove.size();
|
return toRemove.size();
|
||||||
} catch (IOException | JsonSyntaxException e) {
|
} catch (IOException | JsonSyntaxException e) {
|
||||||
sendPlayerMessage(Component.literal("ExtendedAE_Plus: 配置文件删除失败: " + e.getMessage()));
|
sendPlayerMessage(Component.translatable("extendedae_plus.message.config_delete_failed", e.getMessage()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,10 @@
|
||||||
"extendedae_plus.chat.wireless_transceiver.mode_slave": "Slave",
|
"extendedae_plus.chat.wireless_transceiver.mode_slave": "Slave",
|
||||||
"extendedae_plus.chat.wireless_transceiver.locked_status": "Transceiver Locked",
|
"extendedae_plus.chat.wireless_transceiver.locked_status": "Transceiver Locked",
|
||||||
"extendedae_plus.chat.wireless_transceiver.unlocked_status": "Transceiver Unlocked",
|
"extendedae_plus.chat.wireless_transceiver.unlocked_status": "Transceiver Unlocked",
|
||||||
|
"extendedae_plus.chat.wireless_transceiver.channel_set": "Channel set to: %s",
|
||||||
|
"extendedae_plus.chat.pattern_provider.global_toggle_applied": "Global toggle applied to %s pattern providers",
|
||||||
|
"extendedae_plus.message.config_update_failed": "Mapping file update failed: %s",
|
||||||
|
"extendedae_plus.message.config_delete_failed": "Mapping file delete failed: %s",
|
||||||
|
|
||||||
"config.jade.plugin_extendedae_plus.wireless_transceiver_info": "Wireless Transceiver Info",
|
"config.jade.plugin_extendedae_plus.wireless_transceiver_info": "Wireless Transceiver Info",
|
||||||
"config.jade.plugin_extendedae_plus.wt_frequency": "Show Frequency",
|
"config.jade.plugin_extendedae_plus.wt_frequency": "Show Frequency",
|
||||||
|
|
@ -172,5 +176,10 @@
|
||||||
"extendedae_plus.jade.channels": "Channels: %s",
|
"extendedae_plus.jade.channels": "Channels: %s",
|
||||||
"extendedae_plus.jade.channels_of": "Channels: %s/%s",
|
"extendedae_plus.jade.channels_of": "Channels: %s/%s",
|
||||||
"extendedae_plus.jade.owner": "Owner: %s",
|
"extendedae_plus.jade.owner": "Owner: %s",
|
||||||
"extendedae_plus.jade.owner.public": "Owner: Public"
|
"extendedae_plus.jade.owner.public": "Owner: Public",
|
||||||
|
|
||||||
|
"extendedae_plus.command.server_side_only": "This command must be run on server side",
|
||||||
|
"extendedae_plus.command.storage_manager_not_initialized": "InfinityStorageManager is not initialized",
|
||||||
|
"extendedae_plus.command.gave_infinity_disks": "Gave %s infinity disks",
|
||||||
|
"extendedae_plus.command.error": "Error: %s"
|
||||||
}
|
}
|
||||||
|
|
@ -148,6 +148,10 @@
|
||||||
"extendedae_plus.chat.wireless_transceiver.mode_slave": "从端",
|
"extendedae_plus.chat.wireless_transceiver.mode_slave": "从端",
|
||||||
"extendedae_plus.chat.wireless_transceiver.locked_status": "已锁定收发器",
|
"extendedae_plus.chat.wireless_transceiver.locked_status": "已锁定收发器",
|
||||||
"extendedae_plus.chat.wireless_transceiver.unlocked_status": "已解锁收发器",
|
"extendedae_plus.chat.wireless_transceiver.unlocked_status": "已解锁收发器",
|
||||||
|
"extendedae_plus.chat.wireless_transceiver.channel_set": "频道已设置为:%s",
|
||||||
|
"extendedae_plus.chat.pattern_provider.global_toggle_applied": "全局切换已应用到 %s 个样板供应器",
|
||||||
|
"extendedae_plus.message.config_update_failed": "映射文件更新失败: %s",
|
||||||
|
"extendedae_plus.message.config_delete_failed": "映射文件删除失败: %s",
|
||||||
|
|
||||||
"config.jade.plugin_extendedae_plus.wireless_transceiver_info": "无线收发器信息",
|
"config.jade.plugin_extendedae_plus.wireless_transceiver_info": "无线收发器信息",
|
||||||
"config.jade.plugin_extendedae_plus.wt_frequency": "显示频率",
|
"config.jade.plugin_extendedae_plus.wt_frequency": "显示频率",
|
||||||
|
|
@ -172,5 +176,10 @@
|
||||||
"extendedae_plus.jade.channels": "频道: %s",
|
"extendedae_plus.jade.channels": "频道: %s",
|
||||||
"extendedae_plus.jade.channels_of": "频道: %s/%s",
|
"extendedae_plus.jade.channels_of": "频道: %s/%s",
|
||||||
"extendedae_plus.jade.owner": "所有者: %s",
|
"extendedae_plus.jade.owner": "所有者: %s",
|
||||||
"extendedae_plus.jade.owner.public": "所有者: 公共"
|
"extendedae_plus.jade.owner.public": "所有者: 公共",
|
||||||
|
|
||||||
|
"extendedae_plus.command.server_side_only": "此命令必须在服务器端执行",
|
||||||
|
"extendedae_plus.command.storage_manager_not_initialized": "InfinityStorageManager未初始化",
|
||||||
|
"extendedae_plus.command.gave_infinity_disks": "已发放 %s 个无限磁盘",
|
||||||
|
"extendedae_plus.command.error": "错误: %s"
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user