27 lines
724 B
Rust
27 lines
724 B
Rust
use crate::VarInt;
|
|
use pumpkin_data::packet::clientbound::PLAY_TAKE_ITEM_ENTITY;
|
|
use pumpkin_macros::java_packet;
|
|
use serde::Serialize;
|
|
|
|
#[derive(Serialize)]
|
|
#[java_packet(PLAY_TAKE_ITEM_ENTITY)]
|
|
pub struct CTakeItemEntity {
|
|
/// The entity id of the item entity.
|
|
pub entity_id: VarInt,
|
|
/// The entity id of the entity who is collecting the item.
|
|
pub collector_entity_id: VarInt,
|
|
/// The Number of items in the Stack
|
|
pub stack_amount: VarInt,
|
|
}
|
|
|
|
impl CTakeItemEntity {
|
|
#[must_use]
|
|
pub const fn new(entity_id: VarInt, collector_entity_id: VarInt, stack_amount: VarInt) -> Self {
|
|
Self {
|
|
entity_id,
|
|
collector_entity_id,
|
|
stack_amount,
|
|
}
|
|
}
|
|
}
|