github.com/df-mc/dragonfly@v0.9.13/server/item/arrow.go (about) 1 package item 2 3 import "github.com/df-mc/dragonfly/server/item/potion" 4 5 // Arrow is used as ammunition for bows, crossbows, and dispensers. Arrows can be modified to 6 // imbue status effects on players and mobs. 7 type Arrow struct { 8 // Tip is the potion effect that is tipped on the arrow. 9 Tip potion.Potion 10 } 11 12 // EncodeItem ... 13 func (a Arrow) EncodeItem() (name string, meta int16) { 14 if tip := a.Tip.Uint8(); tip > 4 { 15 return "minecraft:arrow", int16(tip + 1) 16 } 17 return "minecraft:arrow", 0 18 }