Documentation ¶
Index ¶
- func VelocityFromLook(look LookDegrees, speed float64) AbsVelocity
- type IBlockQuerier
- type PointObject
- func (obj *PointObject) Init(position *AbsXyz, velocity *AbsVelocity)
- func (obj *PointObject) Position() *AbsXyz
- func (obj *PointObject) ReadNbt(tag nbt.ITag) (err os.Error)
- func (obj *PointObject) SendUpdate(writer io.Writer, entityId EntityId, look *LookBytes) (err os.Error)
- func (obj *PointObject) Tick(blockQuerier IBlockQuerier) (leftChunk bool)
- func (obj *PointObject) WriteIntoNbt(tag *nbt.Compound)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VelocityFromLook ¶
func VelocityFromLook(look LookDegrees, speed float64) AbsVelocity
Create a velocity from a look (yaw and pitch) and a momentum.
Types ¶
type IBlockQuerier ¶
type PointObject ¶
type PointObject struct { // Used in knowing what to send as client updates LastSentPosition AbsIntXyz LastSentVelocity Velocity // contains filtered or unexported fields }
func (*PointObject) Init ¶
func (obj *PointObject) Init(position *AbsXyz, velocity *AbsVelocity)
func (*PointObject) Position ¶
func (obj *PointObject) Position() *AbsXyz
func (*PointObject) SendUpdate ¶
func (obj *PointObject) SendUpdate(writer io.Writer, entityId EntityId, look *LookBytes) (err os.Error)
Generates any packets needed to update clients as to the position and velocity of the object. It assumes that the clients have either been sent packets via this method before, or that the previous position/velocity sent was generated from the LastSentPosition and LastSentVelocity attributes.
func (*PointObject) Tick ¶
func (obj *PointObject) Tick(blockQuerier IBlockQuerier) (leftChunk bool)
func (*PointObject) WriteIntoNbt ¶
func (obj *PointObject) WriteIntoNbt(tag *nbt.Compound)
Click to show internal directories.
Click to hide internal directories.