Port to 1.21.4

This commit is contained in:
Snowiiii
2024-12-03 23:34:59 +01:00
parent c52b770214
commit 35afc0bfb9
18 changed files with 31 additions and 26 deletions

View File

@@ -5,7 +5,7 @@
![CI](https://github.com/Snowiiii/Pumpkin/actions/workflows/rust.yml/badge.svg)
[![Discord](https://img.shields.io/discord/1268592337445978193.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/wT8XjrjKkf)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Current version)](https://img.shields.io/badge/current_version-1.21.3-blue)
![Current version)](https://img.shields.io/badge/current_version-1.21.4-blue)
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"serverbound":{"handshake":["intention"],"status":["status_request","ping_request"],"login":["hello","key","custom_query_answer","login_acknowledged","cookie_response"],"config":["client_information","cookie_response","custom_payload","finish_configuration","keep_alive","pong","resource_pack","select_known_packs"],"play":["accept_teleportation","block_entity_tag_query","bundle_item_selected","change_difficulty","chat_ack","chat_command","chat_command_signed","chat","chat_session_update","chunk_batch_received","client_command","client_tick_end","client_information","command_suggestion","configuration_acknowledged","container_button_click","container_click","container_close","container_slot_state_changed","cookie_response","custom_payload","debug_sample_subscription","edit_book","entity_tag_query","interact","jigsaw_generate","keep_alive","lock_difficulty","move_player_pos","move_player_pos_rot","move_player_rot","move_player_status_only","move_vehicle","paddle_boat","pick_item","ping_request","place_recipe","player_abilities","player_action","player_command","player_input","pong","recipe_book_change_settings","recipe_book_seen_recipe","rename_item","resource_pack","seen_advancements","select_trade","set_beacon","set_carried_item","set_command_block","set_command_minecart","set_creative_mode_slot","set_jigsaw_block","set_structure_block","sign_update","swing","teleport_to_entity","use_item_on","use_item"]},"clientbound":{"status":["status_response","pong_response"],"login":["login_disconnect","hello","login_finished","login_compression","custom_query","cookie_request"],"config":["cookie_request","custom_payload","disconnect","finish_configuration","keep_alive","ping","reset_chat","registry_data","resource_pack_pop","resource_pack_push","store_cookie","transfer","update_enabled_features","update_tags","select_known_packs","custom_report_details","server_links"],"play":["bundle_delimiter","add_entity","add_experience_orb","animate","award_stats","block_changed_ack","block_destruction","block_entity_data","block_event","block_update","boss_event","change_difficulty","chunk_batch_finished","chunk_batch_start","chunks_biomes","clear_titles","command_suggestions","commands","container_close","container_set_content","container_set_data","container_set_slot","cookie_request","cooldown","custom_chat_completions","custom_payload","damage_event","debug_sample","delete_chat","disconnect","disguised_chat","entity_event","entity_position_sync","explode","forget_level_chunk","game_event","horse_screen_open","hurt_animation","initialize_border","keep_alive","level_chunk_with_light","level_event","level_particles","light_update","login","map_item_data","merchant_offers","move_entity_pos","move_entity_pos_rot","move_minecart_along_track","move_entity_rot","move_vehicle","open_book","open_screen","open_sign_editor","ping","pong_response","place_ghost_recipe","player_abilities","player_chat","player_combat_end","player_combat_enter","player_combat_kill","player_info_remove","player_info_update","player_look_at","player_position","player_rotation","recipe_book_add","recipe_book_remove","recipe_book_settings","remove_entities","remove_mob_effect","reset_score","resource_pack_pop","resource_pack_push","respawn","rotate_head","section_blocks_update","select_advancements_tab","server_data","set_action_bar_text","set_border_center","set_border_lerp_size","set_border_size","set_border_warning_delay","set_border_warning_distance","set_camera","set_chunk_cache_center","set_chunk_cache_radius","set_cursor_item","set_default_spawn_position","set_display_objective","set_entity_data","set_entity_link","set_entity_motion","set_equipment","set_experience","set_health","set_held_slot","set_objective","set_passengers","set_player_inventory","set_player_team","set_score","set_simulation_distance","set_subtitle_text","set_time","set_title_text","set_titles_animation","sound_entity","sound","start_configuration","stop_sound","store_cookie","system_chat","tab_list","tag_query","take_item_entity","teleport_entity","ticking_state","ticking_step","transfer","update_advancements","update_attributes","update_mob_effect","update_recipes","update_tags","projectile_power","custom_report_details","server_links"]}}
{"serverbound":{"handshake":["intention"],"status":["status_request","ping_request"],"login":["hello","key","custom_query_answer","login_acknowledged","cookie_response"],"config":["client_information","cookie_response","custom_payload","finish_configuration","keep_alive","pong","resource_pack","select_known_packs"],"play":["accept_teleportation","block_entity_tag_query","bundle_item_selected","change_difficulty","chat_ack","chat_command","chat_command_signed","chat","chat_session_update","chunk_batch_received","client_command","client_tick_end","client_information","command_suggestion","configuration_acknowledged","container_button_click","container_click","container_close","container_slot_state_changed","cookie_response","custom_payload","debug_sample_subscription","edit_book","entity_tag_query","interact","jigsaw_generate","keep_alive","lock_difficulty","move_player_pos","move_player_pos_rot","move_player_rot","move_player_status_only","move_vehicle","paddle_boat","pick_item_from_block","pick_item_from_entity","ping_request","place_recipe","player_abilities","player_action","player_command","player_input","player_loaded","pong","recipe_book_change_settings","recipe_book_seen_recipe","rename_item","resource_pack","seen_advancements","select_trade","set_beacon","set_carried_item","set_command_block","set_command_minecart","set_creative_mode_slot","set_jigsaw_block","set_structure_block","sign_update","swing","teleport_to_entity","use_item_on","use_item"]},"clientbound":{"status":["status_response","pong_response"],"login":["login_disconnect","hello","login_finished","login_compression","custom_query","cookie_request"],"config":["cookie_request","custom_payload","disconnect","finish_configuration","keep_alive","ping","reset_chat","registry_data","resource_pack_pop","resource_pack_push","store_cookie","transfer","update_enabled_features","update_tags","select_known_packs","custom_report_details","server_links"],"play":["bundle_delimiter","add_entity","add_experience_orb","animate","award_stats","block_changed_ack","block_destruction","block_entity_data","block_event","block_update","boss_event","change_difficulty","chunk_batch_finished","chunk_batch_start","chunks_biomes","clear_titles","command_suggestions","commands","container_close","container_set_content","container_set_data","container_set_slot","cookie_request","cooldown","custom_chat_completions","custom_payload","damage_event","debug_sample","delete_chat","disconnect","disguised_chat","entity_event","entity_position_sync","explode","forget_level_chunk","game_event","horse_screen_open","hurt_animation","initialize_border","keep_alive","level_chunk_with_light","level_event","level_particles","light_update","login","map_item_data","merchant_offers","move_entity_pos","move_entity_pos_rot","move_minecart_along_track","move_entity_rot","move_vehicle","open_book","open_screen","open_sign_editor","ping","pong_response","place_ghost_recipe","player_abilities","player_chat","player_combat_end","player_combat_enter","player_combat_kill","player_info_remove","player_info_update","player_look_at","player_position","player_rotation","recipe_book_add","recipe_book_remove","recipe_book_settings","remove_entities","remove_mob_effect","reset_score","resource_pack_pop","resource_pack_push","respawn","rotate_head","section_blocks_update","select_advancements_tab","server_data","set_action_bar_text","set_border_center","set_border_lerp_size","set_border_size","set_border_warning_delay","set_border_warning_distance","set_camera","set_chunk_cache_center","set_chunk_cache_radius","set_cursor_item","set_default_spawn_position","set_display_objective","set_entity_data","set_entity_link","set_entity_motion","set_equipment","set_experience","set_health","set_held_slot","set_objective","set_passengers","set_player_inventory","set_player_team","set_score","set_simulation_distance","set_subtitle_text","set_time","set_title_text","set_titles_animation","sound_entity","sound","start_configuration","stop_sound","store_cookie","system_chat","tab_list","tag_query","take_item_entity","teleport_entity","ticking_state","ticking_step","transfer","update_advancements","update_attributes","update_mob_effect","update_recipes","update_tags","projectile_power","custom_report_details","server_links"]}}

View File

@@ -1 +1 @@
["angry_villager","block","block_marker","bubble","cloud","crit","damage_indicator","dragon_breath","dripping_lava","falling_lava","landing_lava","dripping_water","falling_water","dust","dust_color_transition","effect","elder_guardian","enchanted_hit","enchant","end_rod","entity_effect","explosion_emitter","explosion","gust","small_gust","gust_emitter_large","gust_emitter_small","sonic_boom","falling_dust","firework","fishing","flame","infested","cherry_leaves","sculk_soul","sculk_charge","sculk_charge_pop","soul_fire_flame","soul","flash","happy_villager","composter","heart","instant_effect","item","vibration","trail","item_slime","item_cobweb","item_snowball","large_smoke","lava","mycelium","note","poof","portal","rain","smoke","white_smoke","sneeze","spit","squid_ink","sweep_attack","totem_of_undying","underwater","splash","witch","bubble_pop","current_down","bubble_column_up","nautilus","dolphin","campfire_cosy_smoke","campfire_signal_smoke","dripping_honey","falling_honey","landing_honey","falling_nectar","falling_spore_blossom","ash","crimson_spore","warped_spore","spore_blossom_air","dripping_obsidian_tear","falling_obsidian_tear","landing_obsidian_tear","reverse_portal","white_ash","small_flame","snowflake","dripping_dripstone_lava","falling_dripstone_lava","dripping_dripstone_water","falling_dripstone_water","glow_squid_ink","glow","wax_on","wax_off","electric_spark","scrape","shriek","egg_crack","dust_plume","trial_spawner_detection","trial_spawner_detection_ominous","vault_connection","dust_pillar","ominous_spawning","raid_omen","trial_omen","block_crumble"]
["angry_villager","block","block_marker","bubble","cloud","crit","damage_indicator","dragon_breath","dripping_lava","falling_lava","landing_lava","dripping_water","falling_water","dust","dust_color_transition","effect","elder_guardian","enchanted_hit","enchant","end_rod","entity_effect","explosion_emitter","explosion","gust","small_gust","gust_emitter_large","gust_emitter_small","sonic_boom","falling_dust","firework","fishing","flame","infested","cherry_leaves","pale_oak_leaves","sculk_soul","sculk_charge","sculk_charge_pop","soul_fire_flame","soul","flash","happy_villager","composter","heart","instant_effect","item","vibration","trail","item_slime","item_cobweb","item_snowball","large_smoke","lava","mycelium","note","poof","portal","rain","smoke","white_smoke","sneeze","spit","squid_ink","sweep_attack","totem_of_undying","underwater","splash","witch","bubble_pop","current_down","bubble_column_up","nautilus","dolphin","campfire_cosy_smoke","campfire_signal_smoke","dripping_honey","falling_honey","landing_honey","falling_nectar","falling_spore_blossom","ash","crimson_spore","warped_spore","spore_blossom_air","dripping_obsidian_tear","falling_obsidian_tear","landing_obsidian_tear","reverse_portal","white_ash","small_flame","snowflake","dripping_dripstone_lava","falling_dripstone_lava","dripping_dripstone_water","falling_dripstone_water","glow_squid_ink","glow","wax_on","wax_off","electric_spark","scrape","shriek","egg_crack","dust_plume","trial_spawner_detection","trial_spawner_detection_ominous","vault_connection","dust_pillar","ominous_spawning","raid_omen","trial_omen","block_crumble"]

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

File diff suppressed because one or more lines are too long

View File

@@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.3
yarn_mappings=1.21.3+build.2
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.1
loader_version=0.16.9
kotlin_loader_version=1.12.3+kotlin.2.0.21
# Mod Properties
@@ -13,4 +13,4 @@ maven_group=de.snowii
archives_base_name=extractor
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.108.0+1.21.3
fabric_version=0.110.5+1.21.4

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
use crate::*;
use bytes::{Buf, BytesMut};
use bytes::Buf;
use serde::de::{self, DeserializeSeed, MapAccess, SeqAccess, Visitor};
use serde::{forward_to_deserialize_any, Deserialize};
use std::io::Cursor;
@@ -24,7 +24,7 @@ impl<'de, T: Buf> Deserializer<'de, T> {
}
/// Deserializes struct using Serde Deserializer from unnamed (network) NBT
pub fn from_bytes<'a, T>(s: &'a mut BytesMut) -> Result<T>
pub fn from_bytes<'a, T>(s: &'a mut impl Buf) -> Result<T>
where
T: Deserialize<'a>,
{
@@ -41,7 +41,7 @@ where
}
/// Deserializes struct using Serde Deserializer from normal NBT
pub fn from_bytes_unnamed<'a, T>(s: &'a mut BytesMut) -> Result<T>
pub fn from_bytes_unnamed<'a, T>(s: &'a mut impl Buf) -> Result<T>
where
T: Deserialize<'a>,
{

View File

@@ -18,7 +18,7 @@ pub use var_long::*;
/// To current Minecraft protocol
/// Don't forget to change this when porting
pub const CURRENT_MC_PROTOCOL: u32 = 768;
pub const CURRENT_MC_PROTOCOL: u32 = 769;
pub const MAX_PACKET_SIZE: i32 = 2097152;
@@ -108,7 +108,7 @@ pub struct StatusResponse {
}
#[derive(Serialize)]
pub struct Version {
/// The current name of the Version (e.g. 1.21.3)
/// The current name of the Version (e.g. 1.21.4)
pub name: String,
/// The current Protocol Version (e.g. 767)
pub protocol: u32,

View File

@@ -30,8 +30,9 @@ struct BiomeEffects {
mood_sound: Option<MoodSound>,
#[serde(skip_serializing_if = "Option::is_none")]
additions_sound: Option<AdditionsSound>,
#[serde(skip_serializing_if = "Option::is_none")]
music: Option<Music>,
// #[serde(skip_serializing_if = "Option::is_none")]
// music: Option<Vec<DataPool<Music>>>,
music_volume: f32,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -47,13 +48,12 @@ struct ParticleOptions {
#[serde(skip_serializing_if = "Option::is_none")]
value: Option<VarInt>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct MoodSound {
block_search_extent: i32,
offset: f64,
sound: String,
tick_delay: i32,
block_search_extent: i32,
offset: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]

View File

@@ -71,6 +71,12 @@ pub enum DimensionType {
TheNether,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct DataPool<T> {
data: T,
weight: i32,
}
impl DimensionType {
pub fn name(&self) -> &str {
match self {

View File

@@ -4,6 +4,5 @@ use serde::{Deserialize, Serialize};
pub struct TrimMaterial {
asset_name: String,
ingredient: String,
item_model_index: f32,
// description: TextComponent<'static>,
}

View File

@@ -137,7 +137,7 @@ async fn handle_packet(
session_id: packet.session_id,
hostname: CString::new(BASIC_CONFIG.motd.as_str())?,
version: CString::new(CURRENT_MC_VERSION)?,
plugins: CString::new("Pumpkin on 1.21.3")?, // TODO: Fill this with plugins when plugins are working
plugins: CString::new("Pumpkin on 1.21.4")?, // TODO: Fill this with plugins when plugins are working
map: CString::new("world")?, // TODO: Get actual world name
num_players: server.get_player_count().await,
max_players: BASIC_CONFIG.max_players as usize,

View File

@@ -33,7 +33,7 @@ mod connection_cache;
mod key_store;
pub mod ticker;
pub const CURRENT_MC_VERSION: &str = "1.21.3";
pub const CURRENT_MC_VERSION: &str = "1.21.4";
/// Represents a Minecraft server instance.
pub struct Server {