Skip to content

Commit

Permalink
Fix subtract -> removeAll
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Feb 6, 2024
1 parent c1a59c6 commit d097e70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ kotlin_version=1.9.22
fabric_kotlin_version=1.10.17+kotlin.1.9.22

# Mod Properties
mod_version=1.1.0
mod_version=1.1.1
maven_group=net.mcbrawls
mod_id=packmanager
10 changes: 5 additions & 5 deletions src/main/kotlin/net/mcbrawls/packmanager/PackManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object PackManager : DedicatedServerModInitializer {

// server resource packs applied at configuration phase
if (server is ResourcePackEnvironment) {
subtract(server.resourcePacks)
removeAll(server.resourcePacks)
}
}

Expand Down Expand Up @@ -87,11 +87,11 @@ object PackManager : DedicatedServerModInitializer {
// remove old packs
val packsToRemove = buildSet {
addAll(originPacks)
subtract(destinationPacks)
removeAll(destinationPacks)

// server resource packs do not need to be modified here
if (server is ResourcePackEnvironment) {
subtract(server.resourcePacks)
removeAll(server.resourcePacks)
}
}

Expand All @@ -103,11 +103,11 @@ object PackManager : DedicatedServerModInitializer {
// add new packs
val packsToAdd = buildSet {
addAll(destinationPacks)
subtract(originPacks)
removeAll(originPacks)

// server resource packs do not need to be modified here
if (server is ResourcePackEnvironment) {
subtract(server.resourcePacks)
removeAll(server.resourcePacks)
}
}

Expand Down

0 comments on commit d097e70

Please sign in to comment.