network: 1.19.4-pre1, 1.19.4-pre2

This commit is contained in:
Bixilon 2023-02-28 13:35:47 +01:00
parent 43754d2f7e
commit c427964306
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
7 changed files with 63 additions and 5 deletions

View File

@ -0,0 +1,43 @@
/*
* Minosoft
* Copyright (C) 2020-2023 Moritz Zwerger
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
*/
package de.bixilon.minosoft.protocol.packets.s2c.play.chunk
import de.bixilon.kotlinglm.vec2.Vec2i
import de.bixilon.minosoft.protocol.packets.factory.LoadPacket
import de.bixilon.minosoft.protocol.packets.s2c.PlayS2CPacket
import de.bixilon.minosoft.protocol.protocol.buffers.play.PlayInByteBuffer
import de.bixilon.minosoft.util.logging.Log
import de.bixilon.minosoft.util.logging.LogLevels
import de.bixilon.minosoft.util.logging.LogMessageType
@LoadPacket
class ChunkBiomeS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val data = buffer.readArray { ChunkBiomeData(buffer.readLongChunkPosition(), buffer.readByteArray()) }
class ChunkBiomeData(
val position: Vec2i,
val data: ByteArray,
)
private fun PlayInByteBuffer.readLongChunkPosition(): Vec2i {
val long = readLong()
return Vec2i(long.toInt(), (long shr 32).toInt())
}
// TODO: handle
override fun log(reducedLog: Boolean) {
Log.log(LogMessageType.NETWORK_PACKETS_IN, level = LogLevels.VERBOSE) { "Chunk biome (data=$data)" }
}
}

View File

@ -22,7 +22,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
@LoadPacket
class ChunkCenterS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
private val position: Vec2i = Vec2i(buffer.readVarInt(), buffer.readVarInt())
val position: Vec2i = Vec2i(buffer.readVarInt(), buffer.readVarInt())
override fun log(reducedLog: Boolean) {
Log.log(LogMessageType.NETWORK_PACKETS_IN, level = LogLevels.VERBOSE) { "Chunk center (position=$position)" }

View File

@ -46,7 +46,7 @@ class PositionRotationS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
if (buffer.versionId >= ProtocolVersions.V_15W42A) {
teleportId = buffer.readVarInt()
}
if (buffer.versionId >= ProtocolVersions.V_21W05A) {
if (buffer.versionId >= ProtocolVersions.V_21W05A && buffer.versionId < ProtocolVersions.V_1_19_4_PRE1) {
dismountVehicle = buffer.readBoolean()
}
}

View File

@ -14,6 +14,8 @@ package de.bixilon.minosoft.protocol.protocol
@Suppress("UNUSED")
object ProtocolVersions {
const val V_1_19_4_PRE2 = 881
const val V_1_19_4_PRE1 = 880
const val V_23W07A = 879
const val V_23W06A = 878
const val V_23W05A = 877

View File

@ -15,10 +15,10 @@ package de.bixilon.minosoft.protocol.protocol
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_13W41B
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_19_3
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_23W07A
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_19_4_PRE2
object VersionSupport {
const val MINIMUM_VERSION = V_13W41B
const val LATEST_VERSION = V_23W07A
const val LATEST_VERSION = V_1_19_4_PRE2
const val LATEST_RELEASE = V_1_19_3
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,17 @@
{
"881": {
"name": "1.19.4-pre2",
"protocol_id": 1073741945,
"packets": 880
},
"880": {
"name": "1.19.4-pre1",
"protocol_id": 1073741944,
"packets": {
"c2s": ["confirm_teleport", "block_nbt", "difficulty", "message_acknowledgement", "command", "signed_chat_message", "session_data", "client_action", "settings", "command_suggestions", "container_button", "container_click", "close_container", "channel", "book", "entity_nbt", "entity_interact", "generate_structure", "heartbeat", "lock_difficulty", "position", "position_rotation", "rotation", "ground_change", "move_vehicle", "steer_boat", "item_pick", "crafting_recipe", "toggle_fly", "player_action", "entity_action", "steer_vehicle", "pong", "displayed_recipe", "recipe_book", "anvil_item_name", "resourcepack", "advancement_tab", "trade", "beacon_effect", "hotbar_slot", "command_block", "minecart_command_block", "item_stack_create", "jigsaw_block", "structure_block", "sign_text", "swing_arm", "entity_spectate", "block_interact", "use_item"],
"s2c": ["bundle", "entity_object_spawn", "entity_experience_orb", "entity_player", "entity_animation", "statistics", "block_break", "block_break_animation", "block_data", "block_action", "block", "bossbar", "difficulty", "chunk_biome", "clear_title", "command_suggestions", "commands", "close_container", "container_items", "container_properties", "container_item", "item_cooldown", "chat_suggestions", "channel", "entity_damage", "hide_message", "kick", "unsigned_chat_message", "entity_status", "explosion", "unload_chunk", "game_event", "open_horse_container", "damage_tilt", "initialize_world_border", "heartbeat", "chunk", "world_event", "particle", "chunk_light", "initialize", "map", "villager_trades", "relative_move", "movement_rotation", "rotation", "move_vehicle", "book", "open_container", "sign_editor", "ping", "crafting_recipe", "player_abilities", "signed_chat_message", "end_combat_event", "enter_combat_event", "kill_combat_event", "tab_list_remove", "tab_list", "player_face", "position_rotation", "unlock_recipes", "entity_destroy", "entity_remove_effect", "resourcepack", "respawn", "head_rotation", "blocks", "advancement_tab", "play_status", "hotbar_text", "center_world_border", "interpolate_world_border", "size_world_border", "warn_time_world_border", "warn_blocks_world_border", "camera", "hotbar_slot", "chunk_center", "view_distance", "compass_position", "objective_position", "entity_data", "entity_attach", "velocity", "entity_equipment", "experience", "health", "objective", "entity_passenger", "teams", "scoreboard_score", "simulation_distance", "subtitle", "time", "title_text", "title_times", "entity_sound", "sound_event", "stop_sound", "chat_message", "tab_list_text", "nbt_response", "entity_collect", "teleport", "advancements", "entity_attributes", "features", "entity_effect", "recipes", "tags"]
}
},
"879": {
"name": "23w07a",
"protocol_id": 1073741943,