mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-11 16:36:58 -04:00
network: 23w43a, 23w43b, 23w44a
23w43a changed jigsaw packet and added tick debugging packets Commit also fixes broken snapshot ids
This commit is contained in:
parent
b4ed972efd
commit
b295905fb1
@ -14,7 +14,8 @@ package de.bixilon.minosoft.protocol.packets.c2s.play.block
|
||||
|
||||
import de.bixilon.kotlinglm.vec3.Vec3i
|
||||
import de.bixilon.minosoft.protocol.packets.c2s.PlayC2SPacket
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_20W13A
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_23W43A
|
||||
import de.bixilon.minosoft.protocol.protocol.buffers.play.PlayOutByteBuffer
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
import de.bixilon.minosoft.util.logging.LogLevels
|
||||
@ -28,21 +29,28 @@ class JigsawBlockC2SP(
|
||||
var name: String,
|
||||
var target: String,
|
||||
var jointType: String,
|
||||
var selectionPriority: Int,
|
||||
var placementPriority: Int,
|
||||
) : PlayC2SPacket {
|
||||
|
||||
override fun write(buffer: PlayOutByteBuffer) {
|
||||
buffer.writeBlockPosition(position)
|
||||
if (buffer.versionId < ProtocolVersions.V_20W13A) {
|
||||
if (buffer.versionId < V_20W13A) {
|
||||
buffer.writeString(attachmentType)
|
||||
buffer.writeString(targetPool)
|
||||
buffer.writeString(finalState)
|
||||
} else {
|
||||
buffer.writeString(name)
|
||||
buffer.writeString(target)
|
||||
buffer.writeString(targetPool)
|
||||
buffer.writeString(finalState)
|
||||
}
|
||||
buffer.writeString(targetPool)
|
||||
buffer.writeString(finalState)
|
||||
|
||||
if (buffer.versionId >= V_20W13A) {
|
||||
buffer.writeString(jointType)
|
||||
}
|
||||
if (buffer.versionId >= V_23W43A) {
|
||||
buffer.writeVarInt(selectionPriority)
|
||||
buffer.writeVarInt(placementPriority)
|
||||
}
|
||||
}
|
||||
|
||||
override fun log(reducedLog: Boolean) {
|
||||
|
@ -110,6 +110,8 @@ import de.bixilon.minosoft.protocol.packets.s2c.play.tab.LegacyTabListS2CP
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.play.tab.TabListRemoveS2CP
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.play.tab.TabListS2CP
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.play.tab.TabListTextS2CP
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.play.tick.TickRateS2CP
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.play.tick.TickStepS2CP
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.play.title.*
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.play.world.*
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.status.PongS2CP
|
||||
@ -385,6 +387,9 @@ object DefaultPackets {
|
||||
registerPlay("tab_list", ::TabListS2CP, threadSafe = false)
|
||||
registerPlay("tab_list_text", ::TabListTextS2CP, threadSafe = false)
|
||||
|
||||
registerPlay("tick_rate", ::TickRateS2CP, threadSafe = false)
|
||||
registerPlay("tick_step", ::TickStepS2CP, threadSafe = false)
|
||||
|
||||
registerPlay("clear_title", ClearTitleS2CF, threadSafe = false)
|
||||
registerPlay("hotbar_text", ::HotbarTextS2CP, threadSafe = false)
|
||||
registerPlay("subtitle", ::SubtitleS2CP, threadSafe = false)
|
||||
|
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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.tick
|
||||
|
||||
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 TickRateS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||
val rate = buffer.readFloat()
|
||||
val frozen = buffer.readBoolean()
|
||||
|
||||
override fun log(reducedLog: Boolean) {
|
||||
Log.log(LogMessageType.NETWORK_IN, LogLevels.VERBOSE) { "Tick rate (rate=$rate, frozen=$frozen)" }
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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.tick
|
||||
|
||||
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 TickStepS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||
val count = buffer.readVarInt()
|
||||
|
||||
override fun log(reducedLog: Boolean) {
|
||||
Log.log(LogMessageType.NETWORK_IN, LogLevels.VERBOSE) { "Tick step (count=$count)" }
|
||||
}
|
||||
}
|
@ -14,6 +14,9 @@ package de.bixilon.minosoft.protocol.protocol
|
||||
|
||||
@Suppress("UNUSED")
|
||||
object ProtocolVersions {
|
||||
const val V_23W44A = 921
|
||||
const val V_23W43B = 920
|
||||
const val V_23W43A = 919
|
||||
const val V_23W42A = 918
|
||||
const val V_23W41A = 917
|
||||
const val V_23W40A = 916
|
||||
|
@ -1,7 +1,31 @@
|
||||
{
|
||||
"921": {
|
||||
"name": "23w44a",
|
||||
"protocol_id": 1073741985,
|
||||
"packets": 919
|
||||
},
|
||||
"920": {
|
||||
"name": "23w43b",
|
||||
"protocol_id": 1073741984,
|
||||
"packets": 919
|
||||
},
|
||||
"919": {
|
||||
"name": "23w43a",
|
||||
"protocol_id": 1073741983,
|
||||
"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", "tick_rate", "tick_step", "advancements", "entity_attributes", "entity_effect", "recipes", "tags"],
|
||||
"configuration": ["channel", "kick", "ready", "heartbeat", "ping", "registries", "resourcepack", "features", "tags"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"918": {
|
||||
"name": "23w42a",
|
||||
"protocol_id": 1073741980,
|
||||
"protocol_id": 1073741981,
|
||||
"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"],
|
||||
@ -15,7 +39,7 @@
|
||||
},
|
||||
"917": {
|
||||
"name": "23w41a",
|
||||
"protocol_id": 1073741979,
|
||||
"protocol_id": 1073741980,
|
||||
"packets": 910
|
||||
},
|
||||
"916": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user