mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-26 22:21:29 +01:00
update deps
This commit is contained in:
parent
68e790f06c
commit
2a67ba713a
@ -58,9 +58,9 @@ dependencies {
|
|||||||
implementation(kotlin("stdlib-jdk8"))
|
implementation(kotlin("stdlib-jdk8"))
|
||||||
implementation(kotlin("reflect"))
|
implementation(kotlin("reflect"))
|
||||||
|
|
||||||
val vvVer = "4.1.0-21w43a-SNAPSHOT"
|
val vvVer = "4.1.0-21w44a-SNAPSHOT"
|
||||||
val vbVer = "4.1.0-21w42a-SNAPSHOT"
|
val vbVer = "4.1.0-21w44a-SNAPSHOT"
|
||||||
val vrVer = "8a668a8"
|
val vrVer = "d93606d"
|
||||||
implementation("com.viaversion:viaversion:$vvVer") { isTransitive = false }
|
implementation("com.viaversion:viaversion:$vvVer") { isTransitive = false }
|
||||||
implementation("com.viaversion:viabackwards:$vbVer") { isTransitive = false }
|
implementation("com.viaversion:viabackwards:$vbVer") { isTransitive = false }
|
||||||
implementation("com.github.ViaVersion.ViaRewind:viarewind-all:$vrVer") { isTransitive = false }
|
implementation("com.github.ViaVersion.ViaRewind:viarewind-all:$vrVer") { isTransitive = false }
|
||||||
@ -85,7 +85,7 @@ dependencies {
|
|||||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||||
implementation("org.slf4j:slf4j-api:$slf4jVer")
|
implementation("org.slf4j:slf4j-api:$slf4jVer")
|
||||||
|
|
||||||
val ktorVersion = "1.6.4"
|
val ktorVersion = "1.6.5"
|
||||||
implementation("io.ktor:ktor-network-tls-certificates:$ktorVersion")
|
implementation("io.ktor:ktor-network-tls-certificates:$ktorVersion")
|
||||||
implementation("io.ktor:ktor-websockets:$ktorVersion")
|
implementation("io.ktor:ktor-websockets:$ktorVersion")
|
||||||
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
||||||
|
@ -10,7 +10,7 @@ object MetadataRewriter {
|
|||||||
fun transform(type: Entity1_10Types.EntityType?, list: MutableList<Metadata>) {
|
fun transform(type: Entity1_10Types.EntityType?, list: MutableList<Metadata>) {
|
||||||
for (entry in ArrayList(list)) {
|
for (entry in ArrayList(list)) {
|
||||||
try {
|
try {
|
||||||
val value = entry.value
|
val oldValue = entry.value
|
||||||
val metaIndex = MetaIndex1_8to1_7_6_10.searchIndex(type, entry.id())
|
val metaIndex = MetaIndex1_8to1_7_6_10.searchIndex(type, entry.id())
|
||||||
|
|
||||||
if (metaIndex == null || metaIndex.newType == MetaType1_8.NonExistent) {
|
if (metaIndex == null || metaIndex.newType == MetaType1_8.NonExistent) {
|
||||||
@ -18,11 +18,11 @@ object MetadataRewriter {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
entry.setMetaType(metaIndex.newType)
|
|
||||||
entry.setId(metaIndex.newIndex)
|
entry.setId(metaIndex.newIndex)
|
||||||
|
entry.setMetaTypeUnsafe(metaIndex.newType)
|
||||||
when (metaIndex.newType) {
|
when (metaIndex.newType) {
|
||||||
MetaType1_8.Byte -> {
|
MetaType1_8.Byte -> {
|
||||||
var byteValue = (value as Number).toByte()
|
var byteValue = (oldValue as Number).toByte()
|
||||||
|
|
||||||
if (metaIndex == MetaIndex1_8to1_7_6_10.HUMAN_SKIN_FLAGS) {
|
if (metaIndex == MetaIndex1_8to1_7_6_10.HUMAN_SKIN_FLAGS) {
|
||||||
val cape = byteValue.toInt() == 2
|
val cape = byteValue.toInt() == 2
|
||||||
@ -30,11 +30,11 @@ object MetadataRewriter {
|
|||||||
}
|
}
|
||||||
entry.value = byteValue
|
entry.value = byteValue
|
||||||
}
|
}
|
||||||
MetaType1_8.Int -> entry.value = (value as Number).toInt()
|
MetaType1_8.Int -> entry.value = (oldValue as Number).toInt()
|
||||||
MetaType1_8.Short -> entry.value = (value as Number).toShort()
|
MetaType1_8.Short -> entry.value = (oldValue as Number).toShort()
|
||||||
MetaType1_8.Float -> entry.value = (value as Number).toFloat()
|
MetaType1_8.Float -> entry.value = (oldValue as Number).toFloat()
|
||||||
MetaType1_8.String -> entry.value = value.toString()
|
MetaType1_8.String -> entry.value = oldValue.toString()
|
||||||
MetaType1_8.Slot, MetaType1_8.Position, MetaType1_8.Rotation -> entry.value = value
|
MetaType1_8.Slot, MetaType1_8.Position, MetaType1_8.Rotation -> entry.value = oldValue
|
||||||
else -> throw Exception("unknown metatype ${metaIndex.newType}")
|
else -> throw Exception("unknown metatype ${metaIndex.newType}")
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
Loading…
Reference in New Issue
Block a user