network: 23w42a

This commit is contained in:
Moritz Zwerger 2023-10-19 17:48:57 +02:00
parent 40869235e9
commit cd26ce5d17
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
7 changed files with 52 additions and 4 deletions

View File

@ -312,6 +312,7 @@ object DefaultPackets {
registerPlay("container_item", ::ContainerItemS2CP, threadSafe = false)
registerPlay("container_items", ::ContainerItemsS2CP, threadSafe = false)
registerPlay("container_properties", ::ContainerPropertiesS2CP, threadSafe = false)
registerPlay("crafter_slot_lock", ::CrafterSlotLockS2CP, threadSafe = false)
registerPlay("open_container", ::OpenContainerS2CP, threadSafe = false)
registerPlay("open_entity_container", ::OpenEntityContainerS2CP, threadSafe = false)

View File

@ -18,13 +18,14 @@ import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnectionStates
import de.bixilon.minosoft.protocol.packets.s2c.PlayS2CPacket
import de.bixilon.minosoft.protocol.protocol.ProtocolStates
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_23W42A
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
class KickS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val reason: ChatComponent = if (buffer.connection.network.state == ProtocolStates.LOGIN) buffer.readChatComponent() else buffer.readNbtChatComponent()
val reason: ChatComponent = if (buffer.connection.network.state == ProtocolStates.LOGIN && buffer.versionId >= V_23W42A) buffer.readChatComponent() else buffer.readNbtChatComponent()
override fun handle(connection: PlayConnection) {
if (!connection.network.connected) {

View File

@ -0,0 +1,31 @@
/*
* 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.container
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
class CrafterSlotLockS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val slot = buffer.readVarInt()
val containerId = buffer.readVarInt()
val locked = buffer.readBoolean()
override fun log(reducedLog: Boolean) {
Log.log(LogMessageType.NETWORK_IN, LogLevels.VERBOSE) { "Crafter slot lock (slot=$slot, containerId=$containerId, locked=$locked)" }
}
}

View File

@ -14,6 +14,7 @@ package de.bixilon.minosoft.protocol.protocol
@Suppress("UNUSED")
object ProtocolVersions {
const val V_23W42A = 918
const val V_23W41A = 917
const val V_23W40A = 916
const val V_1_20_2 = 915

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_20_2
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_23W41A
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_23W42A
object VersionSupport {
const val MINIMUM_VERSION = V_13W41B
const val LATEST_VERSION = V_23W41A
const val LATEST_VERSION = V_23W42A
const val LATEST_RELEASE = V_1_20_2
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,18 @@
{
"918": {
"name": "23w42a",
"protocol_id": 1073741980,
"packets": {
"c2s": {
"play": ["confirm_teleport", "block_nbt", "difficulty", "message_acknowledgement", "command", "signed_chat_message", "session_data", "next_chunk_batch", "client_action", "settings", "command_suggestions", "reconfigure", "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", "ping", "crafting_recipe", "toggle_fly", "player_action", "entity_action", "vehicle_input", "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"],
"configuration": ["settings", "channel", "ready", "heartbeat", "pong", "resourcepack"]
},
"s2c": {
"play": ["bundle", "entity_object_spawn", "entity_experience_orb", "entity_animation", "statistics", "block_break", "block_break_animation", "block_data", "block_action", "block", "bossbar", "difficulty", "chunk_batch_done", "chunk_batch_start", "chunk_biome", "clear_title", "command_suggestions", "commands", "close_container", "crafter_slot_lock", "container_items", "container_properties", "container_item", "item_cooldown", "chat_suggestions", "channel", "entity_damage", "hide_message", "kick", "unsigned_chat_message", "entity_event", "explosion", "unload_chunk", "game_event", "open_entity_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", "pong", "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", "reconfigure", "stop_sound", "chat_message", "tab_list_text", "nbt_response", "entity_collect", "teleport", "advancements", "entity_attributes", "entity_effect", "recipes", "tags"],
"configuration": ["channel", "kick", "ready", "heartbeat", "ping", "registries", "resourcepack", "features", "tags"]
}
}
},
"917": {
"name": "23w41a",
"protocol_id": 1073741979,