mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
Fix crash with new CurseForge metadata (added NeoForge)
This commit is contained in:
parent
39b9c300cc
commit
9c856e3d54
@ -253,7 +253,7 @@ func filterLoaderTypeIndex(packLoaders []string, modLoaderType modloaderType) (m
|
|||||||
// No loaders are specified: allow all files
|
// No loaders are specified: allow all files
|
||||||
return modloaderTypeAny, true
|
return modloaderTypeAny, true
|
||||||
} else {
|
} else {
|
||||||
if slices.Contains(packLoaders, modloaderIds[modLoaderType]) {
|
if int(modLoaderType) < len(modloaderIds) && slices.Contains(packLoaders, modloaderIds[modLoaderType]) {
|
||||||
// Pack contains this loader, pass through
|
// Pack contains this loader, pass through
|
||||||
return modLoaderType, true
|
return modLoaderType, true
|
||||||
} else {
|
} else {
|
||||||
|
@ -116,6 +116,7 @@ const (
|
|||||||
modloaderTypeLiteloader
|
modloaderTypeLiteloader
|
||||||
modloaderTypeFabric
|
modloaderTypeFabric
|
||||||
modloaderTypeQuilt
|
modloaderTypeQuilt
|
||||||
|
modloaderTypeNeoForge
|
||||||
)
|
)
|
||||||
|
|
||||||
var modloaderNames = [...]string{
|
var modloaderNames = [...]string{
|
||||||
@ -125,6 +126,7 @@ var modloaderNames = [...]string{
|
|||||||
"Liteloader",
|
"Liteloader",
|
||||||
"Fabric",
|
"Fabric",
|
||||||
"Quilt",
|
"Quilt",
|
||||||
|
"NeoForge",
|
||||||
}
|
}
|
||||||
|
|
||||||
var modloaderIds = [...]string{
|
var modloaderIds = [...]string{
|
||||||
@ -134,6 +136,7 @@ var modloaderIds = [...]string{
|
|||||||
"liteloader",
|
"liteloader",
|
||||||
"fabric",
|
"fabric",
|
||||||
"quilt",
|
"quilt",
|
||||||
|
"neoforge",
|
||||||
}
|
}
|
||||||
|
|
||||||
type hashAlgo uint8
|
type hashAlgo uint8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user