Documentation ¶
Index ¶
- Variables
- type Controller
- type Entity
- type EntityLiving
- func (e *EntityLiving) GetDisplayName() string
- func (e *EntityLiving) GetEyePos() maths.Vec3d
- func (e *EntityLiving) GetHealth(absorption bool) float32
- func (e *EntityLiving) GetName() string
- func (e *EntityLiving) GetPotionEffect(effect effects.Effect) effects.EffectStatus
- func (e *EntityLiving) IsDead() bool
- func (e *EntityLiving) IsLivingEntity() bool
- func (e *EntityLiving) IsPotionActive(effect effects.Effect) bool
- func (e *EntityLiving) SetHealth(health float32) bool
- type EntityPlayer
- type PlayerEntry
- type PlayerList
- func (p *PlayerList) AddPlayers(players []PlayerEntry)
- func (p *PlayerList) GetPlayer(uuid uuid.UUID) PlayerEntry
- func (p *PlayerList) ReadFrom(r io.Reader) (int64, error)
- func (p *PlayerList) RemovePlayers(uuids []pk.UUID)
- func (p *PlayerList) UpdateDisplayName(uuid uuid.UUID, displayName pk.Optional[chat.Message, *chat.Message])
- func (p *PlayerList) UpdateGamemode(uuid uuid.UUID, gamemode int32)
- func (p *PlayerList) UpdatePing(uuid uuid.UUID, ping int32)
- type UnaliveEntity
- func (e *UnaliveEntity) Equals(other entity.TypeEntity) bool
- func (e *UnaliveEntity) GetBoundingBox() maths.AxisAlignedBB
- func (e *UnaliveEntity) GetDataManager() map[int32]interface{}
- func (e *UnaliveEntity) GetDisplayName() string
- func (e *UnaliveEntity) GetEyePosition() maths.Vec3d
- func (e *UnaliveEntity) GetHeight() float64
- func (e *UnaliveEntity) GetID() int32
- func (e *UnaliveEntity) GetMotion() maths.Vec3d
- func (e *UnaliveEntity) GetName() string
- func (e *UnaliveEntity) GetPassengers() []Entity
- func (e *UnaliveEntity) GetPosition() maths.Vec3d
- func (e *UnaliveEntity) GetRotation() maths.Vec2d
- func (e *UnaliveEntity) GetType() entity.TypeEntity
- func (e *UnaliveEntity) GetUUID() uuid.UUID
- func (e *UnaliveEntity) GetWidth() float64
- func (e *UnaliveEntity) IsLivingEntity() bool
- func (e *UnaliveEntity) IsPassenger() bool
- func (e *UnaliveEntity) IsPlayer() bool
- func (e *UnaliveEntity) IsVehicle() bool
- func (e *UnaliveEntity) SetMotion(x, y, z float64)
- func (e *UnaliveEntity) SetPosition(x, y, z float64)
- func (e *UnaliveEntity) SetRelativePosition(x, y, z float64)
- func (e *UnaliveEntity) SetRelativeRotation(yaw, pitch float64)
- func (e *UnaliveEntity) SetRotation(yaw, pitch float64)
- func (e *UnaliveEntity) SetSize(width, height float64)
Constants ¶
This section is empty.
Variables ¶
View Source
var EyePos = 1.62
View Source
var EyePosVec = maths.Vec3d{Y: 1.62}
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
Left, Right, Forward, Back float64
LeftImpulse, ForwardImpulse float64
Jump, Sneak, Sprint, Drop bool
}
func (*Controller) Reset ¶
func (c *Controller) Reset()
type Entity ¶
type Entity interface { GetName() string GetDisplayName() string GetType() entity.TypeEntity GetID() int32 GetUUID() uuid.UUID GetPosition() maths.Vec3d GetEyePosition() maths.Vec3d GetRotation() maths.Vec2d GetMotion() maths.Vec3d GetBoundingBox() maths.AxisAlignedBB GetWidth() float64 GetHeight() float64 GetDataManager() map[int32]interface{} IsLivingEntity() bool IsPlayer() bool SetPosition(x, y, z float64) SetRotation(yaw, pitch float64) SetMotion(x, y, z float64) SetSize(width, height float64) Equals(other entity.TypeEntity) bool IsPassenger() bool IsVehicle() bool GetPassengers() []Entity }
type EntityLiving ¶
type EntityLiving struct { *UnaliveEntity Health float32 MinHealth float32 MaxHealth float32 Food int32 MaxFood int32 Saturation float32 Absorption float32 ActiveItem *item.Item ActiveItemStackUseCount int32 ActivePotionEffects map[int32]effects.EffectStatus OnGround bool LastOnGround bool MoveStrafing float32 MoveForward float32 MoveVertical float32 }
func NewEntityLiving ¶
func (*EntityLiving) GetDisplayName ¶
func (e *EntityLiving) GetDisplayName() string
func (*EntityLiving) GetEyePos ¶
func (e *EntityLiving) GetEyePos() maths.Vec3d
func (*EntityLiving) GetHealth ¶
func (e *EntityLiving) GetHealth(absorption bool) float32
func (*EntityLiving) GetName ¶
func (e *EntityLiving) GetName() string
func (*EntityLiving) GetPotionEffect ¶
func (e *EntityLiving) GetPotionEffect(effect effects.Effect) effects.EffectStatus
func (*EntityLiving) IsDead ¶
func (e *EntityLiving) IsDead() bool
func (*EntityLiving) IsLivingEntity ¶
func (e *EntityLiving) IsLivingEntity() bool
func (*EntityLiving) IsPotionActive ¶
func (e *EntityLiving) IsPotionActive(effect effects.Effect) bool
func (*EntityLiving) SetHealth ¶
func (e *EntityLiving) SetHealth(health float32) bool
type EntityPlayer ¶
type EntityPlayer struct { *EntityLiving Username string }
func NewEntityPlayer ¶
func (*EntityPlayer) GetDisplayName ¶
func (e *EntityPlayer) GetDisplayName() string
func (*EntityPlayer) GetName ¶
func (e *EntityPlayer) GetName() string
func (*EntityPlayer) IsPlayer ¶
func (e *EntityPlayer) IsPlayer() bool
type PlayerEntry ¶
type PlayerList ¶
type PlayerList struct {
Players map[uuid.UUID]PlayerEntry
}
func NewPlayerList ¶
func NewPlayerList() *PlayerList
func (*PlayerList) AddPlayers ¶
func (p *PlayerList) AddPlayers(players []PlayerEntry)
func (*PlayerList) GetPlayer ¶
func (p *PlayerList) GetPlayer(uuid uuid.UUID) PlayerEntry
func (*PlayerList) RemovePlayers ¶
func (p *PlayerList) RemovePlayers(uuids []pk.UUID)
func (*PlayerList) UpdateDisplayName ¶
func (*PlayerList) UpdateGamemode ¶
func (p *PlayerList) UpdateGamemode(uuid uuid.UUID, gamemode int32)
func (*PlayerList) UpdatePing ¶
func (p *PlayerList) UpdatePing(uuid uuid.UUID, ping int32)
type UnaliveEntity ¶
type UnaliveEntity struct { Type entity.TypeEntity ID int32 UUID uuid.UUID Position maths.Vec3d LastPosition maths.Vec3d Rotation maths.Vec2d LastRotation maths.Vec2d Motion maths.Vec3d BoundingBox maths.AxisAlignedBB Width, Height float64 Vehicle Entity Passengers []Entity // contains filtered or unexported fields }
func (*UnaliveEntity) Equals ¶
func (e *UnaliveEntity) Equals(other entity.TypeEntity) bool
func (*UnaliveEntity) GetBoundingBox ¶
func (e *UnaliveEntity) GetBoundingBox() maths.AxisAlignedBB
func (*UnaliveEntity) GetDataManager ¶
func (e *UnaliveEntity) GetDataManager() map[int32]interface{}
func (*UnaliveEntity) GetDisplayName ¶
func (e *UnaliveEntity) GetDisplayName() string
func (*UnaliveEntity) GetEyePosition ¶
func (e *UnaliveEntity) GetEyePosition() maths.Vec3d
func (*UnaliveEntity) GetHeight ¶
func (e *UnaliveEntity) GetHeight() float64
func (*UnaliveEntity) GetID ¶
func (e *UnaliveEntity) GetID() int32
func (*UnaliveEntity) GetMotion ¶
func (e *UnaliveEntity) GetMotion() maths.Vec3d
func (*UnaliveEntity) GetName ¶
func (e *UnaliveEntity) GetName() string
func (*UnaliveEntity) GetPassengers ¶
func (e *UnaliveEntity) GetPassengers() []Entity
func (*UnaliveEntity) GetPosition ¶
func (e *UnaliveEntity) GetPosition() maths.Vec3d
func (*UnaliveEntity) GetRotation ¶
func (e *UnaliveEntity) GetRotation() maths.Vec2d
func (*UnaliveEntity) GetType ¶
func (e *UnaliveEntity) GetType() entity.TypeEntity
func (*UnaliveEntity) GetUUID ¶
func (e *UnaliveEntity) GetUUID() uuid.UUID
func (*UnaliveEntity) GetWidth ¶
func (e *UnaliveEntity) GetWidth() float64
func (*UnaliveEntity) IsLivingEntity ¶
func (e *UnaliveEntity) IsLivingEntity() bool
func (*UnaliveEntity) IsPassenger ¶
func (e *UnaliveEntity) IsPassenger() bool
func (*UnaliveEntity) IsPlayer ¶
func (e *UnaliveEntity) IsPlayer() bool
func (*UnaliveEntity) IsVehicle ¶
func (e *UnaliveEntity) IsVehicle() bool
func (*UnaliveEntity) SetMotion ¶
func (e *UnaliveEntity) SetMotion(x, y, z float64)
func (*UnaliveEntity) SetPosition ¶
func (e *UnaliveEntity) SetPosition(x, y, z float64)
func (*UnaliveEntity) SetRelativePosition ¶
func (e *UnaliveEntity) SetRelativePosition(x, y, z float64)
func (*UnaliveEntity) SetRelativeRotation ¶
func (e *UnaliveEntity) SetRelativeRotation(yaw, pitch float64)
func (*UnaliveEntity) SetRotation ¶
func (e *UnaliveEntity) SetRotation(yaw, pitch float64)
func (*UnaliveEntity) SetSize ¶
func (e *UnaliveEntity) SetSize(width, height float64)
Click to show internal directories.
Click to hide internal directories.