Add Serverbound Confirm Teleportation

This commit is contained in:
Snowiiii committed 2024-08-03 13:25:28 +02:00
1 parent f111c7881c
commit a45a43397c
7 files changed
+81 -27

No files matched your search

+19 -15
View File
@@ -64,19 +64,23 @@ const NAMES: &[&str] = &[
];
pub(super) fn entires() -> Vec<RegistryEntry> {
let items: Vec<_> = NAMES
.iter()
.map(|name| RegistryEntry {
entry_id: (*name).into(),
data: fastnbt::to_bytes_with_opts(&DamageType {
exhaustion: 0.1,
message_id: "inFire".into(),
scaling: "when_caused_by_living_non_player".into(),
death_message_type: None,
effects: None,
}, SerOpts::network_nbt()).unwrap(),
})
.collect();
let items: Vec<_> = NAMES
.iter()
.map(|name| RegistryEntry {
entry_id: (*name).into(),
data: fastnbt::to_bytes_with_opts(
&DamageType {
exhaustion: 0.1,
message_id: "inFire".into(),
scaling: "when_caused_by_living_non_player".into(),
death_message_type: None,
effects: None,
},
SerOpts::network_nbt(),
)
.unwrap(),
})
.collect();
items
}
items
}
+12 -9
View File
@@ -30,15 +30,18 @@ impl Registry {
};
let biomes = Registry {
registry_id: "minecraft:worldgen/biome".to_string(),
registry_entries: vec![RegistryEntry {
entry_id: "minecraft:snowy_taiga".to_string(),
data: fastnbt::to_bytes_with_opts(&Biome::default(), SerOpts::network_nbt())
.unwrap(),
}, RegistryEntry {
entry_id: "minecraft:plains".to_string(),
data: fastnbt::to_bytes_with_opts(&Biome::default(), SerOpts::network_nbt())
.unwrap(),
}]
registry_entries: vec![
RegistryEntry {
entry_id: "minecraft:snowy_taiga".to_string(),
data: fastnbt::to_bytes_with_opts(&Biome::default(), SerOpts::network_nbt())
.unwrap(),
},
RegistryEntry {
entry_id: "minecraft:plains".to_string(),
data: fastnbt::to_bytes_with_opts(&Biome::default(), SerOpts::network_nbt())
.unwrap(),
},
],
};
let wolf_variants = Registry {
registry_id: "minecraft:wolf_variant".to_string(),