Versions in this module Expand all Collapse all v0 v0.0.4 Jan 4, 2021 Changes in this version + const DefaultConsumeDuration + func RegisterCreativeItem(item Stack) + func RegisterEnchantment(id int, enchantment Enchantment) + type Apple struct + func (a Apple) AlwaysConsumable() bool + func (a Apple) Consume(_ *world.World, c Consumer) Stack + func (a Apple) ConsumeDuration() time.Duration + func (a Apple) EncodeItem() (id int32, meta int16) + type ArmourContainer interface + Boots func() Stack + Chestplate func() Stack + Helmet func() Stack + Leggings func() Stack + SetBoots func(boots Stack) + SetChestplate func(chestplate Stack) + SetHelmet func(helmet Stack) + SetLeggings func(leggings Stack) + type Armoured interface + Armour func() ArmourContainer + type Axe struct + Tier tool.Tier + func (a Axe) AttackDamage() float64 + func (a Axe) BaseMiningEfficiency(world.Block) float64 + func (a Axe) DurabilityInfo() DurabilityInfo + func (a Axe) EncodeItem() (id int32, meta int16) + func (a Axe) HarvestLevel() int + func (a Axe) MaxCount() int + func (a Axe) ToolType() tool.Type + func (a Axe) UseOnBlock(pos world.BlockPos, _ world.Face, _ mgl64.Vec3, w *world.World, _ User, ...) bool + type BeaconPayment interface + PayableForBeacon func() bool + type Beetroot struct + func (b Beetroot) AlwaysConsumable() bool + func (b Beetroot) Consume(_ *world.World, c Consumer) Stack + func (b Beetroot) ConsumeDuration() time.Duration + func (b Beetroot) EncodeItem() (id int32, meta int16) + type BoneMeal struct + func (b BoneMeal) EncodeItem() (id int32, meta int16) + func (b BoneMeal) UseOnBlock(pos world.BlockPos, _ world.Face, _ mgl64.Vec3, w *world.World, _ User, ...) bool + type Boots struct + Tier armour.Tier + func (b Boots) DefencePoints() float64 + func (b Boots) DurabilityInfo() DurabilityInfo + func (b Boots) EncodeItem() (id int32, meta int16) + func (b Boots) KnockBackResistance() float64 + func (b Boots) MaxCount() int + func (b Boots) Use(_ *world.World, user User, _ *UseContext) bool + type Brick struct + func (b Brick) EncodeItem() (id int32, meta int16) + type Bucket struct + Content bucket.Content + func (b Bucket) Empty() bool + func (b Bucket) EncodeItem() (id int32, meta int16) + func (b Bucket) MaxCount() int + func (b Bucket) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, _ User, ...) bool + type Carrier interface + HeldItems func() (mainHand, offHand Stack) + type Chestplate struct + Tier armour.Tier + func (c Chestplate) DefencePoints() float64 + func (c Chestplate) DurabilityInfo() DurabilityInfo + func (c Chestplate) EncodeItem() (id int32, meta int16) + func (c Chestplate) KnockBackResistance() float64 + func (c Chestplate) MaxCount() int + func (c Chestplate) Use(_ *world.World, user User, _ *UseContext) bool + type ClayBall struct + func (ClayBall) EncodeItem() (id int32, meta int16) + type Clock struct + func (w Clock) EncodeItem() (id int32, meta int16) + type Coal struct + func (Coal) EncodeItem() (id int32, meta int16) + type Collector interface + Collect func(stack Stack) (n int) + type Consumable interface + AlwaysConsumable func() bool + Consume func(w *world.World, c Consumer) Stack + ConsumeDuration func() time.Duration + type Consumer interface + AddEffect func(e effect.Effect) + Saturate func(food int, saturation float64) + type Diamond struct + func (Diamond) EncodeItem() (id int32, meta int16) + func (Diamond) PayableForBeacon() bool + type DurabilityInfo struct + AttackDurability int + BreakDurability int + BrokenItem func() Stack + MaxDurability int + type Durable interface + DurabilityInfo func() DurabilityInfo + type Emerald struct + func (Emerald) EncodeItem() (id int32, meta int16) + func (Emerald) PayableForBeacon() bool + type EnchantedApple struct + func (e EnchantedApple) AlwaysConsumable() bool + func (e EnchantedApple) Consume(_ *world.World, c Consumer) Stack + func (e EnchantedApple) ConsumeDuration() time.Duration + func (e EnchantedApple) EncodeItem() (id int32, meta int16) + type Enchantment interface + CompatibleWith func(s Stack) bool + Level func() int + MaxLevel func() int + Name func() string + WithLevel func(level int) Enchantment + type Flint struct + func (f Flint) EncodeItem() (id int32, meta int16) + type FlintAndSteel struct + func (f FlintAndSteel) DurabilityInfo() DurabilityInfo + func (f FlintAndSteel) EncodeItem() (id int32, meta int16) + func (f FlintAndSteel) MaxCount() int + func (f FlintAndSteel) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, _ User, ...) bool + type GlassBottle struct + func (g GlassBottle) EncodeItem() (id int32, meta int16) + func (g GlassBottle) UseOnBlock(pos world.BlockPos, _ world.Face, _ mgl64.Vec3, w *world.World, _ User, ...) bool + type GlowstoneDust struct + func (g GlowstoneDust) EncodeItem() (id int32, meta int16) + type GoldIngot struct + func (GoldIngot) EncodeItem() (id int32, meta int16) + func (GoldIngot) PayableForBeacon() bool + type GoldNugget struct + func (GoldNugget) EncodeItem() (id int32, meta int16) + type GoldenApple struct + func (e GoldenApple) AlwaysConsumable() bool + func (e GoldenApple) Consume(_ *world.World, c Consumer) Stack + func (e GoldenApple) ConsumeDuration() time.Duration + func (e GoldenApple) EncodeItem() (id int32, meta int16) + type Helmet struct + Tier armour.Tier + func (h Helmet) DefencePoints() float64 + func (h Helmet) DurabilityInfo() DurabilityInfo + func (h Helmet) EncodeItem() (id int32, meta int16) + func (h Helmet) KnockBackResistance() float64 + func (h Helmet) MaxCount() int + func (h Helmet) Use(_ *world.World, user User, _ *UseContext) bool + type Hoe struct + Tier tool.Tier + func (h Hoe) AttackDamage() float64 + func (h Hoe) BaseMiningEfficiency(world.Block) float64 + func (h Hoe) DurabilityInfo() DurabilityInfo + func (h Hoe) EncodeItem() (id int32, meta int16) + func (h Hoe) MaxCount() int + func (h Hoe) ToolType() tool.Type + func (h Hoe) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) bool + type IronIngot struct + func (IronIngot) EncodeItem() (id int32, meta int16) + func (IronIngot) PayableForBeacon() bool + type LapisLazuli struct + func (LapisLazuli) EncodeItem() (id int32, meta int16) + type Leather struct + func (Leather) EncodeItem() (id int32, meta int16) + type Leggings struct + Tier armour.Tier + func (l Leggings) DefencePoints() float64 + func (l Leggings) DurabilityInfo() DurabilityInfo + func (l Leggings) EncodeItem() (id int32, meta int16) + func (l Leggings) KnockBackResistance() float64 + func (l Leggings) MaxCount() int + func (l Leggings) Use(_ *world.World, user User, _ *UseContext) bool + type MagmaCream struct + func (m MagmaCream) EncodeItem() (id int32, meta int16) + type MaxCounter interface + MaxCount func() int + type MelonSlice struct + func (m MelonSlice) AlwaysConsumable() bool + func (m MelonSlice) Consume(_ *world.World, c Consumer) Stack + func (m MelonSlice) ConsumeDuration() time.Duration + func (m MelonSlice) EncodeItem() (id int32, meta int16) + type NetherQuartz struct + func (NetherQuartz) EncodeItem() (id int32, meta int16) + type NetheriteIngot struct + func (NetheriteIngot) EncodeItem() (id int32, meta int16) + func (NetheriteIngot) PayableForBeacon() bool + type Pickaxe struct + Tier tool.Tier + func (p Pickaxe) AttackDamage() float64 + func (p Pickaxe) BaseMiningEfficiency(world.Block) float64 + func (p Pickaxe) DurabilityInfo() DurabilityInfo + func (p Pickaxe) EncodeItem() (id int32, meta int16) + func (p Pickaxe) HarvestLevel() int + func (p Pickaxe) MaxCount() int + func (p Pickaxe) ToolType() tool.Type + type PoisonousPotato struct + func (p PoisonousPotato) AlwaysConsumable() bool + func (p PoisonousPotato) Consume(_ *world.World, c Consumer) Stack + func (p PoisonousPotato) ConsumeDuration() time.Duration + func (p PoisonousPotato) EncodeItem() (id int32, meta int16) + type Potion struct + Type potion.Potion + func (p Potion) AlwaysConsumable() bool + func (p Potion) Consume(_ *world.World, c Consumer) Stack + func (p Potion) ConsumeDuration() time.Duration + func (p Potion) EncodeItem() (id int32, meta int16) + func (p Potion) MaxCount() int + type PrismarineCrystals struct + func (p PrismarineCrystals) EncodeItem() (id int32, meta int16) + type Pufferfish struct + func (p Pufferfish) AlwaysConsumable() bool + func (p Pufferfish) Consume(_ *world.World, c Consumer) Stack + func (p Pufferfish) ConsumeDuration() time.Duration + func (p Pufferfish) EncodeItem() (id int32, meta int16) + type Shears struct + func (s Shears) BaseMiningEfficiency(b world.Block) float64 + func (s Shears) DurabilityInfo() DurabilityInfo + func (s Shears) EncodeItem() (id int32, meta int16) + func (s Shears) HarvestLevel() int + func (s Shears) MaxCount() int + func (s Shears) ToolType() tool.Type + func (s Shears) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, _ User, ...) bool + type Shovel struct + Tier tool.Tier + func (s Shovel) AttackDamage() float64 + func (s Shovel) BaseMiningEfficiency(world.Block) float64 + func (s Shovel) DurabilityInfo() DurabilityInfo + func (s Shovel) EncodeItem() (id int32, meta int16) + func (s Shovel) HarvestLevel() int + func (s Shovel) MaxCount() int + func (s Shovel) ToolType() tool.Type + func (s Shovel) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, _ User, ...) bool + type Stack struct + func CreativeItems() []Stack + func NewStack(t world.Item, count int) Stack + func (s Stack) AddStack(s2 Stack) (a, b Stack) + func (s Stack) AttackDamage() float64 + func (s Stack) Comparable(s2 Stack) bool + func (s Stack) Count() int + func (s Stack) CustomName() string + func (s Stack) Damage(d int) Stack + func (s Stack) Durability() int + func (s Stack) Empty() bool + func (s Stack) Enchantment(enchant Enchantment) (Enchantment, bool) + func (s Stack) Enchantments() []Enchantment + func (s Stack) Equal(s2 Stack) bool + func (s Stack) Grow(n int) Stack + func (s Stack) Item() world.Item + func (s Stack) Lore() []string + func (s Stack) MaxCount() int + func (s Stack) MaxDurability() int + func (s Stack) String() string + func (s Stack) Value(key string) (val interface{}, ok bool) + func (s Stack) WithCustomName(a ...interface{}) Stack + func (s Stack) WithDurability(d int) Stack + func (s Stack) WithEnchantment(ench Enchantment) Stack + func (s Stack) WithLore(lines ...string) Stack + func (s Stack) WithValue(key string, val interface{}) Stack + func (s Stack) WithoutEnchantment(enchant Enchantment) Stack + type Stick struct + func (s Stick) EncodeItem() (id int32, meta int16) + type Sword struct + Tier tool.Tier + func (s Sword) AttackDamage() float64 + func (s Sword) BaseMiningEfficiency(world.Block) float64 + func (s Sword) DurabilityInfo() DurabilityInfo + func (s Sword) EncodeItem() (id int32, meta int16) + func (s Sword) HarvestLevel() int + func (s Sword) MaxCount() int + func (s Sword) ToolType() tool.Type + type Usable interface + Use func(w *world.World, user User, ctx *UseContext) bool + type UsableOnBlock interface + UseOnBlock func(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) bool + type UsableOnEntity interface + UseOnEntity func(e world.Entity, w *world.World, user User, ctx *UseContext) bool + type UseContext struct + CountSub int + Damage int + IgnoreAABB bool + NewItem Stack + NewItemSurvivalOnly bool + func (ctx *UseContext) DamageItem(d int) + func (ctx *UseContext) SubtractFromCount(d int) + type User interface + Facing func() world.Direction + HeldItems func() (right, left Stack) + Pitch func() float64 + Position func() mgl64.Vec3 + SetHeldItems func(right, left Stack) + Yaw func() float64 + type Weapon interface + AttackDamage func() float64 + type Wheat struct + func (w Wheat) EncodeItem() (id int32, meta int16)