Compare commits

..

No commits in common. "158228c11d5b49f910ba7992b20a4e44483da697" and "2d42669545df936579427410efc1651ea06b618a" have entirely different histories.

7 changed files with 22 additions and 19 deletions

View file

@ -2,8 +2,8 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'idea'
id 'net.neoforged.moddev' version '2.0.141'
id 'org.jetbrains.kotlin.jvm' version '2.3.0'
id 'net.neoforged.moddev' version '2.0.80'
id 'org.jetbrains.kotlin.jvm' version '2.0.0'
}
version = mod_version
@ -103,7 +103,7 @@ sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies {
implementation 'thedarkcolour:kotlinforforge-neoforge:5.11.0'
implementation 'thedarkcolour:kotlinforforge-neoforge:5.3.0'
// Example mod dependency with JEI
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime

View file

@ -13,7 +13,7 @@ minecraft_version=1.21.1
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.21.1,1.22)
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.1.227
neo_version=21.1.194
# The Neo version range can use any version of Neo as bounds
neo_version_range=[21,)
# The loader version range can only use the major version of FML as bounds

View file

@ -281,7 +281,6 @@ fun createPageContainer(player: ServerPlayer, page: Int): SimpleContainer {
DataComponents.CUSTOM_MODEL_DATA,
net.minecraft.world.item.component.CustomModelData(1)
)
item.set(DataComponents.HIDE_ADDITIONAL_TOOLTIP, net.minecraft.util.Unit.INSTANCE)
container.setItem(9 + (i - startIdx), item) // 슬롯 9부터 시작 (1줄 건너뛰기)
}

View file

@ -1,7 +1,7 @@
plugins {
id("net.neoforged.moddev") version "2.0.141"
kotlin("jvm") version "2.3.0"
kotlin("plugin.serialization") version "2.3.0"
id("net.neoforged.moddev") version "2.0.80"
kotlin("jvm") version "2.0.0"
kotlin("plugin.serialization") version "2.0.0"
}
version = project.property("mod_version") as String

View file

@ -9,13 +9,13 @@ mod_authors=beemer
# NeoForge 버전
minecraft_version=1.21.1
minecraft_version_range=[1.21.1,1.22)
neo_version=21.1.227
neo_version=21.1.77
neo_version_range=[21.1.0,)
loader_version_range=[4,)
# Kotlin 버전
kotlin_version=2.3.0
kotlin_for_forge_version=5.11.0
kotlin_version=2.0.0
kotlin_for_forge_version=5.6.0
# Gradle
org.gradle.jvmargs=-Xmx3G

View file

@ -51,7 +51,7 @@ class PlayerStatsCollector {
BuiltInRegistries.BLOCK.forEach { block ->
val mined = statsManager.getValue(Stats.BLOCK_MINED.get(block))
if (mined > 0) {
val blockId = BuiltInRegistries.BLOCK.getKey(block).path
val blockId = BuiltInRegistries.BLOCK.getKey(block)?.path ?: return@forEach
itemStats.getOrPut(blockId) { ItemStat() }.mined = mined
}
}
@ -60,7 +60,7 @@ class PlayerStatsCollector {
BuiltInRegistries.ITEM.forEach { item ->
val picked = statsManager.getValue(Stats.ITEM_PICKED_UP.get(item))
if (picked > 0) {
val itemId = BuiltInRegistries.ITEM.getKey(item).path
val itemId = BuiltInRegistries.ITEM.getKey(item)?.path ?: return@forEach
itemStats.getOrPut(itemId) { ItemStat() }.pickedUp = picked
}
}
@ -69,7 +69,7 @@ class PlayerStatsCollector {
BuiltInRegistries.ITEM.forEach { item ->
val used = statsManager.getValue(Stats.ITEM_USED.get(item))
if (used > 0) {
val itemId = BuiltInRegistries.ITEM.getKey(item).path
val itemId = BuiltInRegistries.ITEM.getKey(item)?.path ?: return@forEach
itemStats.getOrPut(itemId) { ItemStat() }.used = used
}
}
@ -78,7 +78,7 @@ class PlayerStatsCollector {
BuiltInRegistries.ITEM.forEach { item ->
val crafted = statsManager.getValue(Stats.ITEM_CRAFTED.get(item))
if (crafted > 0) {
val itemId = BuiltInRegistries.ITEM.getKey(item).path
val itemId = BuiltInRegistries.ITEM.getKey(item)?.path ?: return@forEach
itemStats.getOrPut(itemId) { ItemStat() }.crafted = crafted
}
}
@ -91,7 +91,9 @@ class PlayerStatsCollector {
try {
val killed = statsManager.getValue(Stats.ENTITY_KILLED.get(entityType))
if (killed > 0) {
val entityId = BuiltInRegistries.ENTITY_TYPE.getKey(entityType).path
val entityId =
BuiltInRegistries.ENTITY_TYPE.getKey(entityType)?.path
?: return@forEach
mobStats.getOrPut(entityId) { MobStat() }.killed = killed
}
} catch (e: Exception) {}
@ -102,7 +104,9 @@ class PlayerStatsCollector {
try {
val killedBy = statsManager.getValue(Stats.ENTITY_KILLED_BY.get(entityType))
if (killedBy > 0) {
val entityId = BuiltInRegistries.ENTITY_TYPE.getKey(entityType).path
val entityId =
BuiltInRegistries.ENTITY_TYPE.getKey(entityType)?.path
?: return@forEach
mobStats.getOrPut(entityId) { MobStat() }.killedBy = killedBy
}
} catch (e: Exception) {}

View file

@ -4,7 +4,7 @@ import com.beemer.serverstatus.ServerStatusMod
import java.io.DataOutputStream
import java.io.File
import java.net.HttpURLConnection
import java.net.URI
import java.net.URL
import java.util.concurrent.Executors
/** 서버 시작 시 이전 로그 파일을 백엔드로 업로드하는 서비스 */
@ -69,7 +69,7 @@ object LogUploadService {
/** 파일 업로드 (multipart/form-data) */
private fun uploadFile(backendUrl: String, serverId: String, file: File) {
val url = URI("$backendUrl/api/admin/logs/upload").toURL()
val url = URL("$backendUrl/api/admin/logs/upload")
val boundary = "----FormBoundary${System.currentTimeMillis()}"
val connection = url.openConnection() as HttpURLConnection