mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
Make things public (#71)
* Make struct data pub * Add derives * Rename packet fields * Make Palette structs pub
This commit is contained in:
parent
71308ee0a3
commit
d88ca2d865
7 changed files with 8 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
|||
use crate::{BlockPos, Direction, Vec3};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct BlockHitResult {
|
||||
pub location: Vec3,
|
||||
pub direction: Direction,
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
|
||||
use azalea_buf::{BufReadError, McBufReadable, McBufWritable};
|
||||
|
||||
#[derive(Hash, Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Hash, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum Difficulty {
|
||||
PEACEFUL = 0,
|
||||
EASY = 1,
|
||||
|
|
|
@ -97,7 +97,7 @@ impl McBufWritable for GameType {
|
|||
/// Rust doesn't let us `impl McBufReadable for Option<GameType>` so we have to
|
||||
/// make a new type :(
|
||||
#[derive(Hash, Copy, Clone, Debug)]
|
||||
pub struct OptionalGameType(Option<GameType>);
|
||||
pub struct OptionalGameType(pub Option<GameType>);
|
||||
|
||||
impl From<Option<GameType>> for OptionalGameType {
|
||||
fn from(game_type: Option<GameType>) -> Self {
|
||||
|
|
|
@ -18,7 +18,7 @@ pub struct Tags {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct TagMap(HashMap<ResourceLocation, Vec<Tags>>);
|
||||
pub struct TagMap(pub HashMap<ResourceLocation, Vec<Tags>>);
|
||||
|
||||
impl McBufReadable for TagMap {
|
||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||
|
|
|
@ -4,5 +4,5 @@ use azalea_protocol_macros::ServerboundGamePacket;
|
|||
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
|
||||
pub struct ServerboundChatAckPacket {
|
||||
#[var]
|
||||
pub offset: u32,
|
||||
pub messages: u32,
|
||||
}
|
||||
|
|
|
@ -15,6 +15,6 @@ pub struct ServerboundChatPacket {
|
|||
#[derive(Clone, Debug, McBuf, Default)]
|
||||
pub struct LastSeenMessagesUpdate {
|
||||
#[var]
|
||||
pub offset: u32,
|
||||
pub messages: u32,
|
||||
pub acknowledged: FixedBitSet<20>,
|
||||
}
|
||||
|
|
|
@ -7,13 +7,13 @@ mod bit_storage;
|
|||
mod chunk_storage;
|
||||
mod container;
|
||||
pub mod entity;
|
||||
mod palette;
|
||||
pub mod palette;
|
||||
mod world;
|
||||
|
||||
use std::backtrace::Backtrace;
|
||||
|
||||
pub use bit_storage::BitStorage;
|
||||
pub use chunk_storage::{Chunk, ChunkStorage, PartialChunkStorage};
|
||||
pub use chunk_storage::{Chunk, ChunkStorage, PartialChunkStorage, Section};
|
||||
pub use container::*;
|
||||
use thiserror::Error;
|
||||
pub use world::*;
|
||||
|
|
Loading…
Add table
Reference in a new issue