src/world/layer: make BlockInfo fields public

There were left private by accident.
This commit is contained in:
Matthias Schiffer 2023-03-03 20:35:43 +01:00
parent e6e1f55fe9
commit 26555f1745
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 48 additions and 3 deletions

44
Cargo.lock generated
View file

@ -114,6 +114,12 @@ dependencies = [
"cc", "cc",
] ]
[[package]]
name = "color_quant"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]] [[package]]
name = "crc32fast" name = "crc32fast"
version = "1.3.2" version = "1.3.2"
@ -205,6 +211,20 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
[[package]]
name = "image"
version = "0.24.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945"
dependencies = [
"bytemuck",
"byteorder",
"color_quant",
"num-rational",
"num-traits",
"png",
]
[[package]] [[package]]
name = "io-lifetimes" name = "io-lifetimes"
version = "1.0.5" version = "1.0.5"
@ -278,6 +298,7 @@ dependencies = [
"enumflags2", "enumflags2",
"fastnbt", "fastnbt",
"flate2", "flate2",
"image",
"itertools", "itertools",
"num-integer", "num-integer",
"serde", "serde",
@ -303,6 +324,17 @@ dependencies = [
"num-traits", "num-traits",
] ]
[[package]]
name = "num-rational"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.15" version = "0.2.15"
@ -330,6 +362,18 @@ version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "png"
version = "0.17.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638"
dependencies = [
"bitflags",
"crc32fast",
"flate2",
"miniz_oxide",
]
[[package]] [[package]]
name = "proc-macro-error" name = "proc-macro-error"
version = "1.0.4" version = "1.0.4"

View file

@ -15,6 +15,7 @@ clap = { version = "4.1.4", features = ["derive"] }
enumflags2 = "0.7.5" enumflags2 = "0.7.5"
fastnbt = "2.3.2" fastnbt = "2.3.2"
flate2 = "1.0.25" flate2 = "1.0.25"
image = { version = "0.24.5", default-features = false, features = ["png"] }
itertools = "0.10.5" itertools = "0.10.5"
num-integer = "0.1.45" num-integer = "0.1.45"
serde = "1.0.152" serde = "1.0.152"

View file

@ -27,9 +27,9 @@ impl BlockHeight {
#[derive(Debug, Clone, Copy, Serialize, Deserialize)] #[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub struct BlockInfo { pub struct BlockInfo {
block_type: BlockType, pub block_type: BlockType,
y: BlockHeight, pub y: BlockHeight,
depth: Option<BlockHeight>, pub depth: Option<BlockHeight>,
} }
/// Helper methods for [BlockInfo] /// Helper methods for [BlockInfo]