github.com/df-mc/dragonfly@v0.9.13/server/item/spider_eye.go (about) 1 package item 2 3 import ( 4 "github.com/df-mc/dragonfly/server/entity/effect" 5 "github.com/df-mc/dragonfly/server/world" 6 "time" 7 ) 8 9 // SpiderEye is a poisonous food and brewing item. 10 type SpiderEye struct { 11 defaultFood 12 } 13 14 // Consume ... 15 func (SpiderEye) Consume(_ *world.World, c Consumer) Stack { 16 c.Saturate(2, 3.2) 17 c.AddEffect(effect.New(effect.Poison{}, 1, time.Second*5)) 18 return Stack{} 19 } 20 21 // EncodeItem ... 22 func (SpiderEye) EncodeItem() (name string, meta int16) { 23 return "minecraft:spider_eye", 0 24 }