mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-04 15:41:38 +00:00
修复错误的弩模板
This commit is contained in:
@@ -314,7 +314,7 @@ templates#models#crossbow:
|
||||
threshold: 0.58
|
||||
- model:
|
||||
type: minecraft:model
|
||||
path: "{pulling_2_path}"
|
||||
path: "{pulling_2_model}"
|
||||
threshold: 1.0
|
||||
fallback:
|
||||
type: minecraft:model
|
||||
|
||||
@@ -3,6 +3,7 @@ package net.momirealms.craftengine.core.plugin.config.template;
|
||||
import net.momirealms.craftengine.core.pack.LoadingSequence;
|
||||
import net.momirealms.craftengine.core.pack.Pack;
|
||||
import net.momirealms.craftengine.core.plugin.config.ConfigSectionParser;
|
||||
import net.momirealms.craftengine.core.plugin.locale.LocalizedResourceConfigException;
|
||||
import net.momirealms.craftengine.core.plugin.locale.TranslationManager;
|
||||
import net.momirealms.craftengine.core.util.GsonHelper;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
@@ -62,8 +63,7 @@ public class TemplateManagerImpl implements TemplateManager {
|
||||
@Override
|
||||
public void addTemplate(Pack pack, Path path, Key id, Object obj) {
|
||||
if (this.templates.containsKey(id)) {
|
||||
TranslationManager.instance().log("warning.config.template.duplicated", path.toString(), id.toString());
|
||||
return;
|
||||
throw new LocalizedResourceConfigException("warning.config.template.duplicated", path.toString(), id.toString());
|
||||
}
|
||||
this.templates.put(id, obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user