mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-18 16:24:32 +02:00
Clean up code, filter version numbers for NeoForge as well as Forge
NeoForge doesn't seem to have an update checker JSON yet, so we can't determine the recommended version
This commit is contained in:
18
core/pack.go
18
core/pack.go
@@ -191,7 +191,7 @@ func (pack Pack) GetPackName() string {
|
||||
}
|
||||
}
|
||||
|
||||
func (pack Pack) GetLoaders() (loaders []string) {
|
||||
func (pack Pack) GetCompatibleLoaders() (loaders []string) {
|
||||
if _, hasQuilt := pack.Versions["quilt"]; hasQuilt {
|
||||
loaders = append(loaders, "quilt")
|
||||
loaders = append(loaders, "fabric") // Backwards-compatible; for now (could be configurable later)
|
||||
@@ -206,3 +206,19 @@ func (pack Pack) GetLoaders() (loaders []string) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (pack Pack) GetLoaders() (loaders []string) {
|
||||
if _, hasQuilt := pack.Versions["quilt"]; hasQuilt {
|
||||
loaders = append(loaders, "quilt")
|
||||
}
|
||||
if _, hasFabric := pack.Versions["fabric"]; hasFabric {
|
||||
loaders = append(loaders, "fabric")
|
||||
}
|
||||
if _, hasNeoForge := pack.Versions["neoforge"]; hasNeoForge {
|
||||
loaders = append(loaders, "neoforge")
|
||||
}
|
||||
if _, hasForge := pack.Versions["forge"]; hasForge {
|
||||
loaders = append(loaders, "forge")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user