func (i *GroundItem) SpawnedTime() time.Time {
	return i.VarTime("spawnTime")
}
SpawnedTime Returns: the time this item was spawned into the game world.
package world
import (
	"fmt"
	"math"
	"sort"
	"strconv"
	"sync"
	"time"
	"go.uber.org/atomic"
	"github.com/spkaeros/rscgo/pkg/definitions"
	"github.com/spkaeros/rscgo/pkg/errors"
	"github.com/spkaeros/rscgo/pkg/game/entity"
	"github.com/spkaeros/rscgo/pkg/log"
	"github.com/spkaeros/rscgo/pkg/strutil"
	"github.com/spkaeros/rscgo/pkg/tasks"
)
const DefaultDrop = 20
type ItemBubble struct {
	Owner *Player
	Item  int
}
type Item struct {
	ID     int
	Amount int
	Worn   bool
	Index  int
}
func NewItem(id, amt, idx int, worn bool) *Item {
	return &Item { id, amt, worn, idx }
}
func (i *Item) Name() string {
	if i.ID >= len(definitions.Items) || i.ID < 0 {
		return "nil"
	}
	return definitions.Items[i.ID].Name
}
type Price int
func (i *Item) Price() Price {
	if i.ID >= len(definitions.Items) || i.ID < 0 {
		return -1
	}
	return Price(definitions.Items[i.ID].BasePrice)
}
func (i *Item) DeltaAmount(o *Item) int {
	return o.Amount - i.Amount
}
func (i *Item) ScalePrice(percent int) int {
	return int(i.Price().Scale(percent))
}
func (p Price) Scale(percent int) Price {
	return Price(int(math.Max(10, float64(percent)))*int(p)) / 100
}
func (i *Item) Command() string {
	if i.ID >= len(definitions.Items) || i.ID < 0 {
		return "nil"
	}
	return definitions.Items[i.ID].Command
}
func (i *Item) WieldPos() int {
	if i.ID >= len(definitions.Items) || i.ID < 0 {
		return -1
	}
	def := definitions.Equip(i.ID)
	if def == nil {
		return -1
	}
	return def.Position
}
func (i *Item) Stackable() bool {
	if i.ID >= len(definitions.Items) || i.ID < 0 {
		return false
	}
	return definitions.Items[i.ID].Stackable
}
type GroundItem struct {
	ID, Amount int
	Owner      string
	*entity.AttributeList
	Entity
}
var ItemIndexer = atomic.NewUint32(0)
func (i *GroundItem) Visibility() int {
	return i.VarInt("visibility", 0)
}