Compare commits
2 commits
2d42669545
...
158228c11d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
158228c11d | ||
|
|
52a49f554e |
7 changed files with 19 additions and 22 deletions
|
|
@ -2,8 +2,8 @@ plugins {
|
|||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'idea'
|
||||
id 'net.neoforged.moddev' version '2.0.80'
|
||||
id 'org.jetbrains.kotlin.jvm' version '2.0.0'
|
||||
id 'net.neoforged.moddev' version '2.0.141'
|
||||
id 'org.jetbrains.kotlin.jvm' version '2.3.0'
|
||||
}
|
||||
|
||||
version = mod_version
|
||||
|
|
@ -103,7 +103,7 @@ sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|||
|
||||
|
||||
dependencies {
|
||||
implementation 'thedarkcolour:kotlinforforge-neoforge:5.3.0'
|
||||
implementation 'thedarkcolour:kotlinforforge-neoforge:5.11.0'
|
||||
|
||||
// Example mod dependency with JEI
|
||||
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
|
||||
|
|
|
|||
|
|
@ -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.194
|
||||
neo_version=21.1.227
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ 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줄 건너뛰기)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
plugins {
|
||||
id("net.neoforged.moddev") version "2.0.80"
|
||||
kotlin("jvm") version "2.0.0"
|
||||
kotlin("plugin.serialization") version "2.0.0"
|
||||
id("net.neoforged.moddev") version "2.0.141"
|
||||
kotlin("jvm") version "2.3.0"
|
||||
kotlin("plugin.serialization") version "2.3.0"
|
||||
}
|
||||
|
||||
version = project.property("mod_version") as String
|
||||
|
|
|
|||
|
|
@ -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.77
|
||||
neo_version=21.1.227
|
||||
neo_version_range=[21.1.0,)
|
||||
loader_version_range=[4,)
|
||||
|
||||
# Kotlin 버전
|
||||
kotlin_version=2.0.0
|
||||
kotlin_for_forge_version=5.6.0
|
||||
kotlin_version=2.3.0
|
||||
kotlin_for_forge_version=5.11.0
|
||||
|
||||
# Gradle
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
|
|
|
|||
|
|
@ -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 ?: return@forEach
|
||||
val blockId = BuiltInRegistries.BLOCK.getKey(block).path
|
||||
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 ?: return@forEach
|
||||
val itemId = BuiltInRegistries.ITEM.getKey(item).path
|
||||
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 ?: return@forEach
|
||||
val itemId = BuiltInRegistries.ITEM.getKey(item).path
|
||||
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 ?: return@forEach
|
||||
val itemId = BuiltInRegistries.ITEM.getKey(item).path
|
||||
itemStats.getOrPut(itemId) { ItemStat() }.crafted = crafted
|
||||
}
|
||||
}
|
||||
|
|
@ -91,9 +91,7 @@ class PlayerStatsCollector {
|
|||
try {
|
||||
val killed = statsManager.getValue(Stats.ENTITY_KILLED.get(entityType))
|
||||
if (killed > 0) {
|
||||
val entityId =
|
||||
BuiltInRegistries.ENTITY_TYPE.getKey(entityType)?.path
|
||||
?: return@forEach
|
||||
val entityId = BuiltInRegistries.ENTITY_TYPE.getKey(entityType).path
|
||||
mobStats.getOrPut(entityId) { MobStat() }.killed = killed
|
||||
}
|
||||
} catch (e: Exception) {}
|
||||
|
|
@ -104,9 +102,7 @@ class PlayerStatsCollector {
|
|||
try {
|
||||
val killedBy = statsManager.getValue(Stats.ENTITY_KILLED_BY.get(entityType))
|
||||
if (killedBy > 0) {
|
||||
val entityId =
|
||||
BuiltInRegistries.ENTITY_TYPE.getKey(entityType)?.path
|
||||
?: return@forEach
|
||||
val entityId = BuiltInRegistries.ENTITY_TYPE.getKey(entityType).path
|
||||
mobStats.getOrPut(entityId) { MobStat() }.killedBy = killedBy
|
||||
}
|
||||
} catch (e: Exception) {}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import com.beemer.serverstatus.ServerStatusMod
|
|||
import java.io.DataOutputStream
|
||||
import java.io.File
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.net.URI
|
||||
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 = URL("$backendUrl/api/admin/logs/upload")
|
||||
val url = URI("$backendUrl/api/admin/logs/upload").toURL()
|
||||
val boundary = "----FormBoundary${System.currentTimeMillis()}"
|
||||
|
||||
val connection = url.openConnection() as HttpURLConnection
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue