refactored state_id to PlayerInventory

This commit is contained in:
Edvin Bryntesson committed 2024-09-06 17:53:23 +02:00
1 parent d07eec2245
commit 2acd1ed02a
6 files changed
+42 -96

No files matched your search

@@ -4,15 +4,15 @@ use pumpkin_macros::packet;
use serde::Serialize;
#[derive(Serialize)]
#[packet(0x15)]
pub struct CSetContainerSlot {
pub struct CSetContainerSlot<'a> {
window_id: i8,
state_id: VarInt,
slot: i16,
slot_data: Slot,
slot_data: &'a Slot,
}
impl CSetContainerSlot {
pub fn new(window_id: i8, state_id: i32, slot: usize, slot_data: Slot) -> Self {
impl<'a> CSetContainerSlot<'a> {
pub fn new(window_id: i8, state_id: i32, slot: usize, slot_data: &'a Slot) -> Self {
Self {
window_id,
state_id: state_id.into(),