mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 00:15:35 +00:00
update ConfigPack#getVersion to use Strata version
This commit is contained in:
parent
8773c414c5
commit
bcdfb42fa1
@ -7,6 +7,7 @@
|
||||
|
||||
package com.dfsek.terra.api.config;
|
||||
|
||||
import ca.solostudios.strata.version.Version;
|
||||
import ca.solostudios.strata.version.VersionRange;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
@ -49,7 +50,7 @@ public interface ConfigPack extends LoaderRegistrar, LoaderHolder, RegistryHolde
|
||||
|
||||
String getAuthor();
|
||||
|
||||
String getVersion();
|
||||
Version getVersion();
|
||||
|
||||
<T> ConfigPack registerShortcut(Type clazz, String shortcut, ShortcutLoader<T> loader);
|
||||
|
||||
|
@ -41,6 +41,6 @@ public class PacksCommand implements CommandTemplate {
|
||||
sender.sendMessage("No packs installed");
|
||||
return;
|
||||
}
|
||||
registry.entries().forEach(configPack -> sender.sendMessage(" - " + configPack.getID() + "@" + configPack.getVersion()));
|
||||
registry.entries().forEach(configPack -> sender.sendMessage(" - " + configPack.getID() + "@" + configPack.getVersion().getFormatted()));
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package com.dfsek.terra.config.pack;
|
||||
|
||||
import ca.solostudios.strata.version.Version;
|
||||
import ca.solostudios.strata.version.VersionRange;
|
||||
import com.dfsek.tectonic.api.TypeRegistry;
|
||||
import com.dfsek.tectonic.api.config.Configuration;
|
||||
@ -319,7 +320,7 @@ public class ConfigPackImpl implements ConfigPack {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
public Version getVersion() {
|
||||
return template.getVersion();
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package com.dfsek.terra.config.pack;
|
||||
|
||||
import ca.solostudios.strata.version.Version;
|
||||
import com.dfsek.tectonic.api.config.template.ConfigTemplate;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
@ -79,8 +80,7 @@ public class ConfigPackTemplate implements ConfigTemplate {
|
||||
private @Meta List<@Meta GenerationStage> stages;
|
||||
|
||||
@Value("version")
|
||||
@Default
|
||||
private String version = "0.1.0";
|
||||
private Version version;
|
||||
|
||||
@Value("disable.carvers")
|
||||
@Default
|
||||
@ -153,7 +153,7 @@ public class ConfigPackTemplate implements ConfigTemplate {
|
||||
return stages;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
public Version getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user