up3
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package item
|
||||
|
||||
import (
|
||||
"github.com/df-mc/dragonfly/server/world"
|
||||
"time"
|
||||
)
|
||||
|
||||
// DriedKelp is a food item that can be quickly eaten by the player.
|
||||
type DriedKelp struct{}
|
||||
|
||||
// AlwaysConsumable ...
|
||||
func (DriedKelp) AlwaysConsumable() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// ConsumeDuration ...
|
||||
func (DriedKelp) ConsumeDuration() time.Duration {
|
||||
return DefaultConsumeDuration / 2
|
||||
}
|
||||
|
||||
// Consume ...
|
||||
func (DriedKelp) Consume(_ *world.Tx, c Consumer) Stack {
|
||||
c.Saturate(1, 0.2)
|
||||
return Stack{}
|
||||
}
|
||||
|
||||
// CompostChance ...
|
||||
func (DriedKelp) CompostChance() float64 {
|
||||
return 0.3
|
||||
}
|
||||
|
||||
// EncodeItem ...
|
||||
func (DriedKelp) EncodeItem() (name string, meta int16) {
|
||||
return "minecraft:dried_kelp", 0
|
||||
}
|
||||
Reference in New Issue
Block a user