aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--azalea-world/src/bit_storage.rs1
-rw-r--r--azalea-world/src/palette/container.rs1
-rw-r--r--azalea-world/src/palette/mod.rs1
3 files changed, 3 insertions, 0 deletions
diff --git a/azalea-world/src/bit_storage.rs b/azalea-world/src/bit_storage.rs
index cefc0aeb..4e858413 100644
--- a/azalea-world/src/bit_storage.rs
+++ b/azalea-world/src/bit_storage.rs
@@ -167,6 +167,7 @@ impl BitStorage {
///
/// This function will panic if the given index is greater than or equal to
/// the size of this storage.
+ #[inline]
pub fn get(&self, index: usize) -> u64 {
assert!(
index < self.size,
diff --git a/azalea-world/src/palette/container.rs b/azalea-world/src/palette/container.rs
index 43262a3d..2cef4dd6 100644
--- a/azalea-world/src/palette/container.rs
+++ b/azalea-world/src/palette/container.rs
@@ -177,6 +177,7 @@ impl<S: PalletedContainerKind> PalettedContainer<S> {
/// This function panics if the index is greater than or equal to the number
/// of things in the storage. For example, for block states, it must be less
/// than 4096.
+ #[inline]
pub fn get_at_index(&self, index: usize) -> S {
// first get the palette id
let paletted_value = self.storage.get(index);
diff --git a/azalea-world/src/palette/mod.rs b/azalea-world/src/palette/mod.rs
index 067c68c4..4fa81adc 100644
--- a/azalea-world/src/palette/mod.rs
+++ b/azalea-world/src/palette/mod.rs
@@ -24,6 +24,7 @@ pub enum Palette<S: PalletedContainerKind> {
}
impl<S: PalletedContainerKind> Palette<S> {
+ #[inline]
pub fn value_for(&self, id: usize) -> S {
match self {
Palette::SingleValue(v) => *v,