update deps

This commit is contained in:
creeper123123321 2021-11-03 19:38:38 -03:00
parent 68e790f06c
commit 2a67ba713a
2 changed files with 12 additions and 12 deletions

View File

@ -58,9 +58,9 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
val vvVer = "4.1.0-21w43a-SNAPSHOT"
val vbVer = "4.1.0-21w42a-SNAPSHOT"
val vrVer = "8a668a8"
val vvVer = "4.1.0-21w44a-SNAPSHOT"
val vbVer = "4.1.0-21w44a-SNAPSHOT"
val vrVer = "d93606d"
implementation("com.viaversion:viaversion:$vvVer") { isTransitive = false }
implementation("com.viaversion:viabackwards:$vbVer") { 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.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-websockets:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")

View File

@ -10,7 +10,7 @@ object MetadataRewriter {
fun transform(type: Entity1_10Types.EntityType?, list: MutableList<Metadata>) {
for (entry in ArrayList(list)) {
try {
val value = entry.value
val oldValue = entry.value
val metaIndex = MetaIndex1_8to1_7_6_10.searchIndex(type, entry.id())
if (metaIndex == null || metaIndex.newType == MetaType1_8.NonExistent) {
@ -18,11 +18,11 @@ object MetadataRewriter {
continue
}
entry.setMetaType(metaIndex.newType)
entry.setId(metaIndex.newIndex)
entry.setMetaTypeUnsafe(metaIndex.newType)
when (metaIndex.newType) {
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) {
val cape = byteValue.toInt() == 2
@ -30,11 +30,11 @@ object MetadataRewriter {
}
entry.value = byteValue
}
MetaType1_8.Int -> entry.value = (value as Number).toInt()
MetaType1_8.Short -> entry.value = (value as Number).toShort()
MetaType1_8.Float -> entry.value = (value as Number).toFloat()
MetaType1_8.String -> entry.value = value.toString()
MetaType1_8.Slot, MetaType1_8.Position, MetaType1_8.Rotation -> entry.value = value
MetaType1_8.Int -> entry.value = (oldValue as Number).toInt()
MetaType1_8.Short -> entry.value = (oldValue as Number).toShort()
MetaType1_8.Float -> entry.value = (oldValue as Number).toFloat()
MetaType1_8.String -> entry.value = oldValue.toString()
MetaType1_8.Slot, MetaType1_8.Position, MetaType1_8.Rotation -> entry.value = oldValue
else -> throw Exception("unknown metatype ${metaIndex.newType}")
}
} catch (e: Exception) {