9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-28 03:19:14 +00:00

refactor(core): 撤销一些修改

This commit is contained in:
jhqwqmc
2025-05-06 15:47:36 +08:00
parent 8ac944edea
commit 2ba21c2dce
3 changed files with 2 additions and 10 deletions

View File

@@ -293,5 +293,4 @@ warning.config.conflict_matcher.all_of.missing_terms: "<yellow>Issue found in co
warning.config.conflict_matcher.any_of.missing_terms: "<yellow>Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'terms' argument for 'any_of' matcher.</yellow>"
warning.config.conflict_resolution.missing_type: "<yellow>Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'type' argument for one of the resolutions.</yellow>"
warning.config.conflict_resolution.invalid_type: "<yellow>Issue found in config.yml at 'resource-pack.duplicated-files-handler' - One of the resolutions is using the invalid type '<arg:0>'.</yellow>"
warning.config.function.command.missing_command: "<yellow>Issue found in file <arg:0> - The config '<arg:1>' is missing the required 'command' argument for 'command' function.</yellow>"
warning.resource_pack.generation_in_progress: "<yellow>Resource pack generation is already in progress. Please wait until it finishes.</yellow>"
warning.config.function.command.missing_command: "<yellow>Issue found in file <arg:0> - The config '<arg:1>' is missing the required 'command' argument for 'command' function.</yellow>"

View File

@@ -294,5 +294,4 @@ warning.config.conflict_matcher.inverted.missing_term: "<yellow>在 config.yml
warning.config.conflict_matcher.all_of.missing_terms: "<yellow>在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 全匹配器缺少必需的 'terms' 参数</yellow>"
warning.config.conflict_matcher.any_of.missing_terms: "<yellow>在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 任一匹配器缺少必需的 'terms' 参数</yellow>"
warning.config.conflict_resolution.missing_type: "<yellow>在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案缺少必需的 'type' 参数</yellow>"
warning.config.conflict_resolution.invalid_type: "<yellow>在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案使用了无效类型 '<arg:0>'</yellow>"
warning.resource_pack.generation_in_progress: "<yellow>资源包正在生成中, 请等待完成再试</yellow>"
warning.config.conflict_resolution.invalid_type: "<yellow>在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案使用了无效类型 '<arg:0>'</yellow>"

View File

@@ -74,7 +74,6 @@ public abstract class AbstractPackManager implements PackManager {
private final TreeMap<ConfigSectionParser, List<CachedConfig>> cachedConfigs = new TreeMap<>();
protected BiConsumer<Path, Path> zipGenerator;
protected ResourcePackHost resourcePackHost;
private boolean generateResourcePack = false;
public AbstractPackManager(CraftEngine plugin, BiConsumer<Path, Path> eventDispatcher) {
this.plugin = plugin;
@@ -519,10 +518,6 @@ public abstract class AbstractPackManager implements PackManager {
@Override
public void generateResourcePack() {
if (this.generateResourcePack) {
throw new LocalizedException("warning.resource_pack.generation_in_progress");
}
this.generateResourcePack = true;
this.plugin.logger().info("Generating resource pack...");
long start = System.currentTimeMillis();
// get the target location
@@ -584,7 +579,6 @@ public abstract class AbstractPackManager implements PackManager {
long end = System.currentTimeMillis();
this.plugin.logger().info("Finished generating resource pack in " + (end - start) + "ms");
this.eventDispatcher.accept(generatedPackPath, zipFile);
this.generateResourcePack = false;
}
private void generateParticle(Path generatedPackPath) {