support for 1.17.1-pre2

This commit is contained in:
Bixilon 2021-06-29 21:55:20 +02:00
parent 28c78707ae
commit fcd6dca0ce
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
8 changed files with 10 additions and 10 deletions

View File

@ -81,7 +81,6 @@ class MinecraftAssetsManager(
}
}
Log.log(LogMessageType.ASSETS, LogLevels.INFO) { "Generating client.jar assets for ${assetVersion.version}" }
Log.log(LogMessageType.ASSETS, LogLevels.INFO) { "Generating client.jar assets for ${assetVersion.version}" }
// download jar
downloadAsset(String.format(ProtocolDefinition.MOJANG_LAUNCHER_URL_PACKAGES, this.assetVersion.clientJarHash, "client.jar"), this.assetVersion.clientJarHash!!, true)

View File

@ -23,7 +23,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
class ContainerSlotClickC2SP(
val containerId: Byte,
val todo1: Int,
val revision: Int,
val slot: Int,
val action: InventoryActions,
val actionNumber: Int,
@ -33,7 +33,7 @@ class ContainerSlotClickC2SP(
override fun write(buffer: PlayOutByteBuffer) {
buffer.writeByte(containerId)
if (buffer.versionId >= V_1_17_1_PRE_1) {
buffer.writeVarInt(todo1)
buffer.writeVarInt(revision)
}
buffer.writeShort(slot)
buffer.writeByte(action.button)
@ -43,6 +43,6 @@ class ContainerSlotClickC2SP(
}
override fun log() {
Log.log(LogMessageType.NETWORK_PACKETS_OUT, LogLevels.VERBOSE) { "Container slot click (containerId=$containerId, todo1=$todo1, slot=$slot, action=$action, actionNumber=$actionNumber, clickedItem=$clickedItem)" }
Log.log(LogMessageType.NETWORK_PACKETS_OUT, LogLevels.VERBOSE) { "Container slot click (containerId=$containerId, todo1=$revision, slot=$slot, action=$action, actionNumber=$actionNumber, clickedItem=$clickedItem)" }
}
}

View File

@ -23,7 +23,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
class ContainerItemSetS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
val containerId = buffer.readUnsignedByte()
val todo1: Int = if (buffer.versionId >= V_1_17_1_PRE_1) {
val revision: Int = if (buffer.versionId >= V_1_17_1_PRE_1) {
buffer.readVarInt()
} else {
-1

View File

@ -25,7 +25,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
class ContainerItemsSetS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
val containerId = buffer.readUnsignedByte()
val todo1: Int = if (buffer.versionId >= V_1_17_1_PRE_1) {
val revision: Int = if (buffer.versionId >= V_1_17_1_PRE_1) {
buffer.readVarInt()
} else {
-1
@ -35,7 +35,7 @@ class ContainerItemsSetS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
} else {
buffer.readUnsignedShort()
})
val todo2 = if (buffer.versionId >= V_1_17_1_PRE_1) {
val cursor = if (buffer.versionId >= V_1_17_1_PRE_1) {
buffer.readItemStack()
} else {
null

View File

@ -16,6 +16,7 @@ package de.bixilon.minosoft.protocol.protocol;
@SuppressWarnings("unused")
public class ProtocolVersions {
public static final int
V_1_17_1_PRE_2 = 790,
V_1_17_1_PRE_1 = 789,
V_1_17 = 788,
V_1_17_RC2 = 787,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long