Fix multiplayer RecipeSerializer.codec
This commit is contained in:
parent
5971db9a24
commit
d710b23223
@ -154,6 +154,7 @@ dependencies {
|
||||
// runtimeOnly(fg.deobf("ru.dbotthepony:particle-collider:0.4.5"))
|
||||
|
||||
implementation(fg.deobf("curse.maven:jade-324717:${jade_id}"))
|
||||
implementation(fg.deobf("curse.maven:spit-it-out-857141:4888738"))
|
||||
//runtimeOnly(fg.deobf("curse.maven:configured-457570:${configured_id}"))
|
||||
|
||||
compileOnly(fg.deobf("curse.maven:resourceful-lib-570073:${resourceful_lib_id}"))
|
||||
|
@ -21,7 +21,6 @@ fun <R : Recipe<*>> RecipeSerializer<R>.codec(context: Codec2RecipeSerializer<*>
|
||||
val buffer = FriendlyByteBuf(UnpooledByteBufAllocator.DEFAULT.heapBuffer())
|
||||
buffer.writeResourceLocation(input.recipe.id)
|
||||
toNetwork(buffer, input.recipe)
|
||||
buffer.writerIndex(0)
|
||||
buffer.readerIndex(0)
|
||||
val array = ByteBuffer.allocate(buffer.readableBytes())
|
||||
buffer.readBytes(array)
|
||||
@ -38,7 +37,6 @@ fun <R : Recipe<*>> RecipeSerializer<R>.codec(context: Codec2RecipeSerializer<*>
|
||||
it.position(0)
|
||||
val buffer = FriendlyByteBuf(UnpooledByteBufAllocator.DEFAULT.heapBuffer())
|
||||
buffer.writeBytes(it)
|
||||
buffer.writerIndex(0)
|
||||
buffer.readerIndex(0)
|
||||
Pair(RecipePair(fromNetwork(buffer.readResourceLocation(), buffer)!!, JsonObject()), ops.empty())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user