-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from banchen19/main
"Added some data packets."
- Loading branch information
Showing
17 changed files
with
291 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use bedrockrs_core::{ | ||
int::{LE, VAR}, | ||
Vec3, | ||
}; | ||
use bedrockrs_proto_derive::ProtoCodec; | ||
use bedrockrs_shared::{actor_runtime_id::ActorRuntimeID, actor_unique_id::ActorUniqueID}; | ||
|
||
#[derive(ProtoCodec, Debug, Clone)] | ||
pub struct AddPaintingPacket { | ||
pub target_actor_id: ActorUniqueID, | ||
pub target_runtime_id: ActorRuntimeID, | ||
pub position: Vec3<LE<f32>>, | ||
pub direction: VAR<i32>, | ||
pub motif: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use bedrockrs_proto_derive::ProtoCodec; | ||
use bedrockrs_shared::actor_unique_id::ActorUniqueID; | ||
|
||
#[derive(ProtoCodec, Debug, Clone)] | ||
pub struct CameraPacket { | ||
pub camera_id: ActorUniqueID, | ||
pub target_player_id: ActorUniqueID, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use bedrockrs_proto_derive::ProtoCodec; | ||
use bedrockrs_shared::actor_unique_id::ActorUniqueID; | ||
|
||
use crate::types::{ | ||
container_id::ContainerID, container_type::ContainerType, network_block_pos::NetworkBlockPos, | ||
}; | ||
#[derive(ProtoCodec, Debug, Clone)] | ||
pub struct ContainerOpenPacket { | ||
pub container_id: ContainerID, | ||
pub container_type: ContainerType, | ||
pub position: NetworkBlockPos, | ||
pub target_actor_id: ActorUniqueID, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use bedrockrs_proto_derive::ProtoCodec; | ||
use bedrockrs_shared::actor_unique_id::ActorUniqueID; | ||
|
||
#[derive(ProtoCodec, Debug, Clone)] | ||
pub struct DebugInfoPacket { | ||
pub actor_id: ActorUniqueID, | ||
pub data: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use bedrockrs_core::int::VAR; | ||
use bedrockrs_proto_derive::ProtoCodec; | ||
|
||
use crate::types::network_item_stack_descriptor::NetworkItemStackDescriptor; | ||
|
||
#[derive(ProtoCodec, Debug, Clone)] | ||
pub struct InventoryContentPacket { | ||
pub inventory_id: VAR<u32>, | ||
#[len_repr(VAR::<u32>)] | ||
pub slots: Vec<NetworkItemStackDescriptor>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use bedrockrs_core::int::VAR; | ||
use bedrockrs_proto_derive::ProtoCodec; | ||
|
||
use crate::types::network_item_stack_descriptor::NetworkItemStackDescriptor; | ||
|
||
#[derive(ProtoCodec, Debug, Clone)] | ||
pub struct MobEquipmentPacket { | ||
pub runtime_id: VAR<i32>, | ||
pub item_stack_descriptor: NetworkItemStackDescriptor, | ||
pub slot: u8, | ||
pub selected_slot: u8, | ||
pub container: u8, | ||
} |
Oops, something went wrong.