Skip to content

Commit

Permalink
chore: bump idofront
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed May 13, 2024
1 parent 824d882 commit 6adf882
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fun CachedQuery<ItemRecipeQuery>.registerRecipes(): Set<NamespacedKey> {
runCatching {
val key = NamespacedKey(prefabKey.namespace, "${prefabKey.key}$i")
// Register recipe only if not present
Bukkit.getRecipe(key) ?: recipe.toRecipe(key, result, recipes.group).register()
Bukkit.getRecipe(key) ?: recipe.toRecipe(key, result, recipes.group, recipes.category).register()
if (recipes.discoverRecipes) discoveredRecipes += key
}.onFailure {
geary.logger.w { "Failed to register recipe ${prefabKey.key} #$i, ${it.message}" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class SetRecipes(
val recipes: List<SerializableRecipeIngredients>,
val discoverRecipes: Boolean = false,
val group: String = "",
val category: String = "MISC",
val removeRecipes: List<String> = listOf(),
val result: SerializableItemStack? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ class GearyPluginImpl : GearyPlugin() {

DI.add<SerializablePrefabItemService>(
object : SerializablePrefabItemService {
override fun encodeFromPrefab(item: ItemStack, prefabName: String) {
override fun encodeFromPrefab(item: ItemStack, prefabName: String): ItemStack {
val result = gearyItems.createItem(PrefabKey.of(prefabName), item)
require(result != null) { "Failed to create serializable ItemStack from $prefabName, does the prefab exist and have a geary:set.item component?" }
return result
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GearyItemProvider {
item.editMeta {
it.persistentDataContainer.encodePrefabs(listOf(prefabKey))
}
return item.takeIf { it.type != Material.AIR }
return item.takeUnless { it.isEmpty }
}

/**
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kotlin.code.style=official
group=com.mineinabyss
version=0.30
idofrontVersion=0.24.0-dev.7
idofrontVersion=0.24.0-dev.9
gearyVersion=0.26.0-dev.26

0 comments on commit 6adf882

Please sign in to comment.