Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Fix woopsie in versions.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz authored and Boy0000 committed Jan 22, 2024
1 parent 2045191 commit 723cab0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle/myLibs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
gearyPaper = 0.29.0
gearyPaper = "0.29.0"

[libraries]
geary-papermc = { module = "com.mineinabyss:geary-papermc", version.ref = "gearyPaper" }
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.mineinabyss.idofront.items.editItemMeta
import com.mineinabyss.idofront.messaging.broadcast
import com.mineinabyss.idofront.messaging.broadcastVal
import com.mineinabyss.idofront.nms.nbt.fastPDC
import com.mineinabyss.idofront.serialization.BaseSerializableItemStack
import com.mineinabyss.idofront.serialization.SerializableItemStack
import com.mineinabyss.idofront.serialization.toSerializable
import org.bukkit.Bukkit
Expand Down Expand Up @@ -62,13 +63,13 @@ class RecipeCraftingSystem : Listener {
val inputGearyEntity = equipment.fastPDC?.decodePrefabs()?.firstOrNull() ?: return
val smithingTransformRecipes = Bukkit.recipeIterator().asSequence().filter { (it as? SmithingTransformRecipe)?.result?.fastPDC?.hasComponentsEncoded == true }.filterIsInstance<SmithingTransformRecipe>()
val customRecipeResult = smithingTransformRecipes.filter { it.template.test(template) && it.addition.test(mineral) && it.base.itemStack.itemMeta?.persistentDataContainer?.decodePrefabs()?.firstOrNull() == inputGearyEntity }.firstOrNull()?.result
var recipeResultItem = (customRecipeResult ?: ItemStack.empty()).let { result?.toSerializable()?.toItemStack(it, EnumSet.of(SerializableItemStack.Properties.DISPLAY_NAME)) }
var recipeResultItem = (customRecipeResult ?: ItemStack.empty()).let { result?.toSerializable()?.toItemStack(it, EnumSet.of(BaseSerializableItemStack.Properties.DISPLAY_NAME)) }

recipeResultItem = recipeResultItem?.editItemMeta {
displayName(
equipment.fastPDC?.decode<SetItemIgnoredProperties>()?.let { properties ->
persistentDataContainer.encode(properties)
if (SerializableItemStack.Properties.DISPLAY_NAME in properties.ignore && result?.itemMeta?.hasDisplayName() == true)
if (BaseSerializableItemStack.Properties.DISPLAY_NAME in properties.ignore && result?.itemMeta?.hasDisplayName() == true)
result?.itemMeta?.displayName()?.compact()
else displayName()?.compact()
} ?: displayName()?.compact()
Expand Down

0 comments on commit 723cab0

Please sign in to comment.