Skip to content

Commit 35e7f5b

Browse files
committed
impl: remove RecipeManager load lock
1 parent bf87012 commit 35e7f5b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

common/src/main/kotlin/com/wolfyscript/customcrafting/recipes/RecipeManagerCommon.kt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ class RecipeManagerCommon(val customCrafting: CustomCraftingCommon) : RecipeMana
4242
val invalidRecipes: MutableList<VerificationResult<CustomRecipe<*, *>>> = mutableListOf()
4343
val scafall = ScafallProvider.get()
4444

45-
val loadLock = Any()
46-
4745
init {
4846
scafall.dependencyManager.onDependencyInitialized {
4947
verifyRecipesAndLoad()
@@ -96,12 +94,10 @@ class RecipeManagerCommon(val customCrafting: CustomCraftingCommon) : RecipeMana
9694
* How recipes should be loaded on startup
9795
*/
9896
override fun onInitialLoad(resourceLoader: ResourceLoader) {
99-
synchronized(loadLock) {
100-
resourceLoader.sources.forEach { dest ->
101-
dest.load {
102-
customCrafting.logger.info("${LOG_PREFIX}loaded: ${it.key} -> ${it.recipe}")
103-
awaitingVerificationRecipes.add(it)
104-
}
97+
resourceLoader.sources.forEach { dest ->
98+
dest.load {
99+
customCrafting.logger.info("${LOG_PREFIX}loaded: ${it.key} -> ${it.recipe}")
100+
awaitingVerificationRecipes.add(it)
105101
}
106102
}
107103
}

0 commit comments

Comments
 (0)