Documentation
¶
Index ¶
- Constants
- Variables
- func Chunk2Img(c *chunk.Chunk) *image.RGBA
- type MapUI
- type RenderElem
- type TPlayerPos
- type WorldCMD
- type WorldState
- func (w *WorldState) OnConnect(proxy *utils.ProxyContext)
- func (w *WorldState) ProcessAnimate(pk *packet.Animate)
- func (w *WorldState) ProcessChangeDimension(pk *packet.ChangeDimension)
- func (w *WorldState) ProcessLevelChunk(pk *packet.LevelChunk)
- func (w *WorldState) ProcessPacketClient(pk packet.Packet) (packet.Packet, bool)
- func (w *WorldState) ProcessPacketServer(pk packet.Packet) (packet.Packet, bool)
- func (w *WorldState) ProcessSubChunk(pk *packet.SubChunk)
- func (w *WorldState) Reset()
- func (w *WorldState) SaveAndReset()
- func (w *WorldState) SetPlayerPos(Position mgl32.Vec3, Pitch, Yaw, HeadYaw float32)
Constants ¶
View Source
const VIEW_MAP_ID = 0x424242
Variables ¶
View Source
var MAP_ITEM_PACKET packet.InventoryContent = packet.InventoryContent{ WindowID: 119, Content: []protocol.ItemInstance{ { StackNetworkID: 1, Stack: protocol.ItemStack{ ItemType: protocol.ItemType{ NetworkID: 420, MetadataValue: 0, }, BlockRuntimeID: 0, Count: 1, NBTData: map[string]interface{}{ "map_uuid": int64(VIEW_MAP_ID), }, }, }, }, }
packet to tell the client that it has a map with id 0x424242 in the offhand
View Source
var (
Offset_table [24]protocol.SubChunkOffset
)
Functions ¶
Types ¶
type MapUI ¶
type MapUI struct {
// contains filtered or unexported fields
}
func NewMapUI ¶
func NewMapUI(w *WorldState) *MapUI
func (*MapUI) ChangeZoom ¶
func (m *MapUI) ChangeZoom()
ChangeZoom adds to the zoom value and goes around to 32 once it hits 128
func (*MapUI) SchedRedraw ¶
func (m *MapUI) SchedRedraw()
SchedRedraw tells the map to redraw the next time its sent
type RenderElem ¶
type RenderElem struct {
// contains filtered or unexported fields
}
type TPlayerPos ¶
type WorldCMD ¶
type WorldCMD struct { Address string // contains filtered or unexported fields }
func (*WorldCMD) Execute ¶
func (c *WorldCMD) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
type WorldState ¶
type WorldState struct { Dim world.Dimension WorldName string ServerName string PlayerPos TPlayerPos // contains filtered or unexported fields }
func NewWorldState ¶
func NewWorldState() *WorldState
func (*WorldState) OnConnect ¶
func (w *WorldState) OnConnect(proxy *utils.ProxyContext)
func (*WorldState) ProcessAnimate ¶
func (w *WorldState) ProcessAnimate(pk *packet.Animate)
func (*WorldState) ProcessChangeDimension ¶
func (w *WorldState) ProcessChangeDimension(pk *packet.ChangeDimension)
func (*WorldState) ProcessLevelChunk ¶
func (w *WorldState) ProcessLevelChunk(pk *packet.LevelChunk)
func (*WorldState) ProcessPacketClient ¶
func (*WorldState) ProcessPacketServer ¶
func (*WorldState) ProcessSubChunk ¶
func (w *WorldState) ProcessSubChunk(pk *packet.SubChunk)
func (*WorldState) Reset ¶
func (w *WorldState) Reset()
func (*WorldState) SaveAndReset ¶
func (w *WorldState) SaveAndReset()
writes the world to a folder, resets all the chunks
func (*WorldState) SetPlayerPos ¶
func (w *WorldState) SetPlayerPos(Position mgl32.Vec3, Pitch, Yaw, HeadYaw float32)
Click to show internal directories.
Click to hide internal directories.