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

Commit

Permalink
Bump geary, small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Jan 6, 2024
1 parent 73e466c commit c2c57be
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 19 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins {
repositories {
maven("https://repo.mineinabyss.com/snapshots")
maven("https://jitpack.io")
mavenLocal()
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=com.mineinabyss
version=0.12
idofrontVersion=0.20.6
idofrontVersion=0.21.0
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.27.0"
gearyPaper = "0.29-SNAPSHOT"

[libraries]
geary-papermc = { module = "com.mineinabyss:geary-papermc", version.ref = "gearyPaper" }
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pluginManagement {
gradlePluginPortal()
maven("https://repo.mineinabyss.com/releases")
maven("https://repo.papermc.io/repository/maven-public/")
mavenLocal()
}

val idofrontVersion: String by settings
Expand All @@ -21,6 +22,7 @@ dependencyResolutionManagement {

repositories {
maven("https://repo.mineinabyss.com/releases")
mavenLocal()
}

versionCatalogs {
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/com/mineinabyss/looty/LootyPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class LootyPlugin : JavaPlugin() {
}

override fun onEnable() {
service<SerializablePrefabItemService>(LootySerializablePrefabItemService())
LootyCommands() //Register commands

listeners(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.mineinabyss.looty.features.nointeraction

import com.mineinabyss.geary.autoscan.AutoScan
import com.mineinabyss.geary.datatypes.family.family
import com.mineinabyss.geary.papermc.bridge.components.Interacted
import com.mineinabyss.geary.systems.GearyListener
import com.mineinabyss.geary.systems.accessors.Pointers
import org.bukkit.event.Cancellable
Expand All @@ -11,7 +10,7 @@ import org.bukkit.event.Event
@AutoScan
class DisableItemInteractionsSystem : GearyListener() {
private val Pointers.bukkit by get<Event>().map { (it as? Cancellable) }.on(event)
private val Pointers.interacted by family { has<Interacted>() }.on(event)
// private val Pointers.interacted by family { has<Interacted>() }.on(event)
private val Pointers.noVanilla by family { has<DisableItemInteractions>() }.on(target)

override fun Pointers.handle() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class ItemRecipeQuery : GearyQuery() {
val discoveredRecipes = mutableSetOf<NamespacedKey>()

forEach { pointer ->
val result: ItemStack? = pointer.recipes.result?.toItemStackOrNull() ?: gearyItems.createItem(pointer.prefabKey)
val result: ItemStack? = runCatching { pointer.recipes.result?.toItemStackOrNull() ?: gearyItems.createItem(pointer.prefabKey) }
.getOrNull()

if (result == null) {
looty.plugin.logger.warning("Recipe ${pointer.prefabKey.key} is missing result item")
Expand Down

0 comments on commit c2c57be

Please sign in to comment.