diff options
-rw-r--r-- | src/v1_15_2.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/v1_15_2.rs b/src/v1_15_2.rs index c3ca3b2..150fbe6 100644 --- a/src/v1_15_2.rs +++ b/src/v1_15_2.rs @@ -3035,6 +3035,16 @@ impl EntityMetadata { None } + + pub fn get_mut(&mut self, index: u8) -> Option<&mut EntityMetadataFieldData> { + for field in &mut self.fields { + if field.index == index { + return Some(&mut field.data); + } + } + + None + } } impl<'a> core::iter::IntoIterator for &'a EntityMetadata { |