fix lints
This commit is contained in:
parent
1bbadf7b50
commit
7818f83ea2
@ -44,8 +44,10 @@ pub enum WindowType {
|
|||||||
|
|
||||||
impl WindowType {
|
impl WindowType {
|
||||||
pub const fn default_title(&self) -> &'static str {
|
pub const fn default_title(&self) -> &'static str {
|
||||||
match self {
|
// TODO: Add titles here:
|
||||||
|
/*match self {
|
||||||
_ => "WINDOW TITLE",
|
_ => "WINDOW TITLE",
|
||||||
}
|
}*/
|
||||||
|
"WINDOW TITLE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ impl<'a> CSetContainerContent<'a> {
|
|||||||
Self {
|
Self {
|
||||||
window_id,
|
window_id,
|
||||||
state_id,
|
state_id,
|
||||||
count: slots.len().try_into().unwrap(),
|
count: slots.len().into(),
|
||||||
slot_data: slots,
|
slot_data: slots,
|
||||||
carried_item,
|
carried_item,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ use crate::VarInt;
|
|||||||
use pumpkin_world::item::Item;
|
use pumpkin_world::item::Item;
|
||||||
use serde::ser::SerializeSeq;
|
use serde::ser::SerializeSeq;
|
||||||
use serde::{
|
use serde::{
|
||||||
de::{self, SeqAccess, Visitor},
|
de::{self, SeqAccess},
|
||||||
Deserialize, Serialize, Serializer,
|
Deserialize, Serialize, Serializer,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -129,7 +129,6 @@ impl Serialize for Slot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
impl Slot {
|
impl Slot {
|
||||||
pub fn to_item(self) -> Option<Item> {
|
pub fn to_item(self) -> Option<Item> {
|
||||||
let item_id = self.item_id?.0.try_into().unwrap();
|
let item_id = self.item_id?.0.try_into().unwrap();
|
||||||
|
|||||||
@ -42,7 +42,6 @@ use pumpkin_protocol::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use pumpkin_inventory::WindowType;
|
use pumpkin_inventory::WindowType;
|
||||||
use pumpkin_protocol::bytebuf::ByteBuffer;
|
|
||||||
use pumpkin_protocol::client::play::COpenScreen;
|
use pumpkin_protocol::client::play::COpenScreen;
|
||||||
use pumpkin_protocol::slot::Slot;
|
use pumpkin_protocol::slot::Slot;
|
||||||
use pumpkin_world::item::Item;
|
use pumpkin_world::item::Item;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user