This commit is contained in:
parent
c83476225d
commit
066418d7b2
@ -21,7 +21,6 @@ fun <R : Recipe<*>> RecipeSerializer<R>.codec(context: Codec2RecipeSerializer<*>
|
|||||||
val buffer = FriendlyByteBuf(UnpooledByteBufAllocator.DEFAULT.heapBuffer())
|
val buffer = FriendlyByteBuf(UnpooledByteBufAllocator.DEFAULT.heapBuffer())
|
||||||
buffer.writeResourceLocation(input.recipe.id)
|
buffer.writeResourceLocation(input.recipe.id)
|
||||||
toNetwork(buffer, input.recipe)
|
toNetwork(buffer, input.recipe)
|
||||||
buffer.writerIndex(0)
|
|
||||||
buffer.readerIndex(0)
|
buffer.readerIndex(0)
|
||||||
val array = ByteBuffer.allocate(buffer.readableBytes())
|
val array = ByteBuffer.allocate(buffer.readableBytes())
|
||||||
buffer.readBytes(array)
|
buffer.readBytes(array)
|
||||||
@ -38,7 +37,6 @@ fun <R : Recipe<*>> RecipeSerializer<R>.codec(context: Codec2RecipeSerializer<*>
|
|||||||
it.position(0)
|
it.position(0)
|
||||||
val buffer = FriendlyByteBuf(UnpooledByteBufAllocator.DEFAULT.heapBuffer())
|
val buffer = FriendlyByteBuf(UnpooledByteBufAllocator.DEFAULT.heapBuffer())
|
||||||
buffer.writeBytes(it)
|
buffer.writeBytes(it)
|
||||||
buffer.writerIndex(0)
|
|
||||||
buffer.readerIndex(0)
|
buffer.readerIndex(0)
|
||||||
Pair(RecipePair(fromNetwork(buffer.readResourceLocation(), buffer)!!, JsonObject()), ops.empty())
|
Pair(RecipePair(fromNetwork(buffer.readResourceLocation(), buffer)!!, JsonObject()), ops.empty())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user