Skip to content

Commit 82084fc

Browse files
committed
add documentation
1 parent d32d712 commit 82084fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/valence_protocol/src/item.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ impl ItemStack {
4444
self
4545
}
4646

47+
/// This function takes the "Value" of the skin you want to apply to a PlayerHead.
48+
/// The "Value" is a Base64-encoded JSON object that is usually provided by websites.
49+
/// To learn more: https://minecraft.wiki/w/Item_format#Player_Heads
50+
///
51+
/// # Errors
52+
/// This function returns an error if the [ItemStack] you call it on isn't a PlayerHead
4753
#[must_use]
4854
pub fn with_playerhead_texture_value(
4955
mut self,

0 commit comments

Comments
 (0)