Giter Club home page Giter Club logo

dragonfly's Introduction

image

Dragonfly

Dragonfly is a heavily asynchronous server software for Minecraft: Bedrock Edition written in Go. It was written with scalability and simplicity in mind and aims to make the process of setting up a server and modifying it easy. Unlike other Minecraft server software, Dragonfly is generally used as a library to extend.

Discord Banner 2

Getting started

Running Dragonfly requires at least Go 1.21. After starting the server through one of the methods below, ctrl+c may be used to shut down the server. Also check out the wiki for more detailed info.

Installation as library

go mod init github.com/user/module
go get github.com/df-mc/dragonfly

SetupLibrary

Installation of the latest commit

git clone https://github.com/df-mc/dragonfly
cd dragonfly
go run main.go

SetupClone

Developer info

Go Reference

Dragonfly features a well-documented codebase with an easy-to-use API. Documentation may be found here and in the subpackages found by clicking Directories.

Publishing your project on GitHub? Consider adding the #df-mc topic to your repository and opening a pull request at df-wiki adding your project as a Community Project to improve its visibility.

Contributing

Contributions are very welcome! Issues, pull requests and feature requests are highly appreciated. Opening a pull request? Consider joining our Discord server to discuss your changes! Also have a read through the CONTRIBUTING.md for more info.

dragonfly's People

Contributors

aimjel avatar alvin0319 avatar andreashgk avatar daft0175 avatar dapigguy avatar denielworld avatar eminarican avatar endermanbugzjfc avatar erkam246 avatar flonja avatar hashimthearab avatar hochbaum avatar imdarealani avatar justtaldevelops avatar mmm545 avatar nonono697 avatar provsalt avatar restartfu avatar sandertv avatar ssaini123456 avatar t14raptor avatar thunder33345 avatar tristanmorgan avatar twistedasylummc avatar unickorn avatar unknownore avatar uramnoil avatar wqrro avatar x4caa avatar xnatsuri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dragonfly's Issues

Implement floating text

At the moment, there is no floating text in dragonfly. Since a lot of servers use these, it would be a great addition for dragonfly to have built-in support for these somewhere in the future!

Server freezes on shutdown

After commit c42fbe9, the server consistently freezes on shutdown after the message Saving chunks in memory to disk. This has to be resolved in one way or another before release.

Sort block hashes generated in the hash.go file

cmd/blockhash currently generates the hash.go file in a completely random order by simply iterating over the created map. This causes every commit implementing a new block to have a massive diff and often results in merge conflicts when two people implement different blocks at the same time. Sorting these hashes alphabetically by the types' names should resolve this issue.

Implement projectiles

There's no projectile on DF for the moment and.. for servers like mine where pvp is based on splashing potions we're kind of stuck and can't really release my server.

Placeable consumable items have problems

Implementing the Consumable and UseOnBlock interface causes the UseBlockOn to not place the block.
If the consumable item is used on a block it also doesn't stop consuming the item

Implement runtime command updating

Commands currently cannot be updated during runtime. Having some system that could do this would make commands much more useful. This would also include enum updating. One way to do this might be to periodically do updates where needed: Have a ticker and build the available commands packet every time. Compare vs the last available commands packet, and check if there were changes. If so, send the updated packet.

Implement entity saving to disk

Right now, entity saving is still a TODO. Would probably work to have an EncodeNBT method for entities or something along those lines.

Block breaking not correctly handled server-side

Attempting to break blocks in survival mode with a tool in hand is not handled correctly by the server. The error message *packet.PlayerAuthInput: unknown value '9' for enum type 'stack request action type' is shown.

Have an interface that blocks that can have vegetation on them can implement

Currently blocks that can have vegetation (grass, dirt) are hardcoded. If we add an interface with a method like such:

type <SomeNameForBlocksThatServeAsSoilForVegetation> interface {
    SoilFor(b world.Block) bool
}

this is more flexible for new blocks and allows us to implement the same interface for blocks that can have different blocks they can be planted on, such as nether roots and mushrooms.

Quality of life fixes for commands

Having one command usage with an optional argument and one without that argument will always cause one of the two to be executed. What should happen here? Make sure to document whatever behavior we decide on.

  • Retain values of unexported fields.
  • Reject commands in the above case.

Improve the README

The README has out of date information on it and doesn't look very appealing to new visitors. It should probably also have the "Chat on Discord" button higher up so people see the button more quickly.

Fall damage only gets applied after manually moving

When I fall down, my player does not take fall damge. However, once I move the player around the fall damage does apply.
It seems like this issue occurs after switching from creative mode to survival mode

Steps to reproduce
These are the exact steps I followed in order to get this issue:

  • set gamemode to creative and fly up
  • change gamemode to survival, causing the player to fall
  • land on the ground without taking damage
  • move around, the player will suddenly take damage

Version
This was tested on the latest commit at this time ( a52f18e )

Chunks are sometimes not loaded properly

Rarely, chunks will not be loaded or sent to the client properly. A way to reproduce it sometimes seems to be by setting your view distance to the max first, letting chunks load, then setting it to the minimum and setting it back to the maximum again. Chunks will fail to load sometimes. It seems more complicated chunks (more (different?) blocks) have this issue more often, but that has not yet been confirmed.

Goroutine blocking when player provider is disabled

  • Expected result: Server works as usual after disabling the player provider in config.toml
  • Actually result: Player spawn under bedrock, server stop responding to events like block breaking / placing, player movements...

Dumped goroutine


Goroutine 1
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.chanrecv (/usr/local/go/src/runtime/chan.go:576)
  runtime.chanrecv2 (/usr/local/go/src/runtime/chan.go:444)
  github.com/df-mc/dragonfly/server.(*Server).Accept (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/server.go:103)
  main.main (/Users/Eurus/Documents/Development/DragonFly/ZSMC-df/main.go:41)
  runtime.main (/usr/local/go/src/runtime/proc.go:225)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.rt0_go (/usr/local/go/src/runtime/asm_amd64.s:226)

Goroutine 2
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.goparkunlock (/usr/local/go/src/runtime/proc.go:342)
  runtime.forcegchelper (/usr/local/go/src/runtime/proc.go:276)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.init.6 (/usr/local/go/src/runtime/proc.go:264)

Goroutine 3
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.gcBgMarkWorker (/usr/local/go/src/runtime/mgc.go:1911)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.gcBgMarkStartWorkers (/usr/local/go/src/runtime/mgc.go:1835)

Goroutine 4
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/sandertv/gophertunnel/minecraft.(*Listener).listen.func1 (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/listener.go:177)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/sandertv/gophertunnel/minecraft.(*Listener).listen (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/listener.go:173)

Goroutine 5
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.chanrecv (/usr/local/go/src/runtime/chan.go:576)
  runtime.chanrecv2 (/usr/local/go/src/runtime/chan.go:444)
  github.com/sandertv/gophertunnel/minecraft.newConn.func1 (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/conn.go:155)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/sandertv/gophertunnel/minecraft.newConn (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/conn.go:152)

Goroutine 6
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/sandertv/go-raknet.(*Conn).ReadPacket (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/conn.go:282)
  github.com/sandertv/gophertunnel/minecraft/protocol/packet.(*Decoder).Decode (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/protocol/packet/decoder.go:82)
  github.com/sandertv/gophertunnel/minecraft.(*Listener).handleConn (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/listener.go:243)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/sandertv/gophertunnel/minecraft.(*Listener).createConn (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/listener.go:220)

Goroutine 8
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/dragonfly/server/session.(*Session).sendChunks (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/session/session.go:249)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/dragonfly/server/session.(*Session).handlePackets (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/session/session.go:228)

Goroutine 18
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.goparkunlock (/usr/local/go/src/runtime/proc.go:342)
  runtime.bgsweep (/usr/local/go/src/runtime/mgcsweep.go:182)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.gcenable (/usr/local/go/src/runtime/mgc.go:217)

Goroutine 19
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.goparkunlock (/usr/local/go/src/runtime/proc.go:342)
  runtime.bgscavenge (/usr/local/go/src/runtime/mgcscavenge.go:314)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.gcenable (/usr/local/go/src/runtime/mgc.go:218)

Goroutine 20
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.gcBgMarkWorker (/usr/local/go/src/runtime/mgc.go:1911)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.gcBgMarkStartWorkers (/usr/local/go/src/runtime/mgc.go:1835)

Goroutine 21
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.gcBgMarkWorker (/usr/local/go/src/runtime/mgc.go:1911)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.gcBgMarkStartWorkers (/usr/local/go/src/runtime/mgc.go:1835)

Goroutine 22
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/dragonfly/server/world.(*World).startTicking (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/world/world.go:1093)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/dragonfly/server/world.New (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/world/world.go:102)

Goroutine 23
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/dragonfly/server/world.(*World).chunkCacheJanitor (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/world/world.go:1782)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/dragonfly/server/world.New (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/world/world.go:103)

Goroutine 24
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  runtime.ensureSigM.func1 (/usr/local/go/src/runtime/signal_unix.go:889)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.ensureSigM (/usr/local/go/src/runtime/signal_unix.go:872)

Goroutine 25
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/goleveldb/leveldb.(*DB).compactionError (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db_compaction.go:91)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/goleveldb/leveldb.openDB (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db.go:148)

Goroutine 26
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/goleveldb/leveldb.(*DB).mpoolDrain (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db_state.go:101)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/goleveldb/leveldb.openDB (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db.go:149)

Goroutine 27
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/goleveldb/leveldb.(*DB).tCompaction (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db_compaction.go:836)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/goleveldb/leveldb.openDB (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db.go:155)

Goroutine 28
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/goleveldb/leveldb.(*DB).mCompaction (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db_compaction.go:773)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/goleveldb/leveldb.openDB (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/db.go:156)

Goroutine 29
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.netpollblock (/usr/local/go/src/runtime/netpoll.go:438)
  internal/poll.runtime_pollWait (/usr/local/go/src/runtime/netpoll.go:222)
  internal/poll.(*pollDesc).wait (/usr/local/go/src/internal/poll/fd_poll_runtime.go:87)
  internal/poll.(*pollDesc).waitRead (/usr/local/go/src/internal/poll/fd_poll_runtime.go:92)
  internal/poll.(*FD).ReadFrom (/usr/local/go/src/internal/poll/fd_unix.go:222)
  net.(*netFD).readFrom (/usr/local/go/src/net/fd_posix.go:61)
  net.(*UDPConn).readFrom (/usr/local/go/src/net/udpsock_posix.go:47)
  net.(*UDPConn).ReadFrom (/usr/local/go/src/net/udpsock.go:118)
  github.com/sandertv/go-raknet.(*Listener).listen (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/listener.go:141)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/sandertv/go-raknet.ListenConfig.Listen (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/listener.go:76)

Goroutine 30
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.chanrecv (/usr/local/go/src/runtime/chan.go:576)
  runtime.chanrecv2 (/usr/local/go/src/runtime/chan.go:444)
  github.com/sandertv/go-raknet.(*Listener).Accept (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/listener.go:95)
  github.com/sandertv/gophertunnel/minecraft.(*Listener).listen (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/listener.go:191)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/sandertv/gophertunnel/minecraft.ListenConfig.Listen (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/listener.go:108)

Goroutine 31
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.chanrecv (/usr/local/go/src/runtime/chan.go:576)
  runtime.chanrecv2 (/usr/local/go/src/runtime/chan.go:444)
  github.com/sandertv/gophertunnel/minecraft.(*Listener).Accept (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/listener.go:128)
  github.com/df-mc/dragonfly/server.(*Server).run (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/server.go:332)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/dragonfly/server.(*Server).Start (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/server.go:155)

Goroutine 34
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.goparkunlock (/usr/local/go/src/runtime/proc.go:342)
  runtime.runfinq (/usr/local/go/src/runtime/mfinal.go:175)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.createfing (/usr/local/go/src/runtime/mfinal.go:156)

Goroutine 35
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.gcBgMarkWorker (/usr/local/go/src/runtime/mgc.go:1911)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: runtime.gcBgMarkStartWorkers (/usr/local/go/src/runtime/mgc.go:1835)

Goroutine 36
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/sandertv/go-raknet.(*Conn).startTicking (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/conn.go:125)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/sandertv/go-raknet.newConn (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/conn.go:113)

Goroutine 38
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/sandertv/gophertunnel/minecraft.(*Conn).ReadPacket (/Users/Eurus/go/pkg/mod/github.com/sandertv/[email protected]/minecraft/conn.go:335)
  github.com/df-mc/dragonfly/server/session.(*Session).handlePackets (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/session/session.go:230)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/dragonfly/server/session.(*Session).Start (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/session/session.go:147)

Goroutine 50
  runtime.asmcgocall (/usr/local/go/src/runtime/asm_amd64.s:653)
  runtime.libcCall (/usr/local/go/src/runtime/sys_libc.go:48)
  runtime.read (:0)
  runtime.sigNoteSleep (/usr/local/go/src/runtime/os_darwin.go:120)
  os/signal.signal_recv (/usr/local/go/src/runtime/sigqueue.go:165)
  os/signal.loop (/usr/local/go/src/os/signal/signal_unix.go:23)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: os/signal.Notify.func1.1 (/usr/local/go/src/os/signal/signal.go:151)

Goroutine 51
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.chanrecv (/usr/local/go/src/runtime/chan.go:576)
  runtime.chanrecv1 (/usr/local/go/src/runtime/chan.go:439)
  github.com/df-mc/dragonfly/server.(*Server).CloseOnProgramEnd.func1 (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/server.go:295)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/dragonfly/server.(*Server).CloseOnProgramEnd (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/server/server.go:294)

Goroutine 52
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/goleveldb/leveldb/util.(*BufferPool).drain (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/util/buffer_pool.go:206)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/goleveldb/leveldb/util.NewBufferPool (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/util/buffer_pool.go:237)

Goroutine 53
  runtime.gopark (/usr/local/go/src/runtime/proc.go:337)
  runtime.selectgo (/usr/local/go/src/runtime/select.go:327)
  github.com/df-mc/goleveldb/leveldb.(*session).refLoop (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/session_util.go:189)
  runtime.goexit (/usr/local/go/src/runtime/asm_amd64.s:1371)
  created at: github.com/df-mc/goleveldb/leveldb.newSession (/Users/Eurus/go/pkg/mod/github.com/df-mc/[email protected]/leveldb/session.go:93)

Environment

  • DragonFly: 0.1.0 4b13a4f and 0.1.1 6c0574a
  • OS: macOS Big Sur (Intel) version 11.4
  • Go: 1.16
  • Client: 1.17.2

Implement crafting

Right now there isn't any crafting which is a part of the game minecraft which is pretty problematic

World loading / closing got stuck (on mac os)

The world neither loads nor close successfully.

When a player joins, no chunks will be sent to the client.

IMG_4E7FB10EE251-1

When the server shuts down, it stuck at the closing world state.

image

Not sure if this is an issue with macOS or this will also happen to other operating systems.

How to reproduce

  1. Git clone https://github.com/df-mc/template
  2. Execute command go run main.go
  3. Join the server with an MCBE client
  4. Press ctrl+c

Environment

DragonFly: v0.0.5 (e073ce8)
Operating system: macOS Big Sur 11.4
Minecraft Bedrock Edition: 1.16.221 (Protocol 431)

config.toml

[Network]
  Address = ":19132"

[Server]
  AuthEnabled = true
  JoinMessage = "%v has joined the game"
  MaximumPlayers = 0
  Name = "Dragonfly Server"
  QuitMessage = "%v has left the game"
  ShutdownMessage = "Server closed."

[World]
  Folder = "world"
  MaximumChunkRadius = 32
  Name = "World"
  SimulationDistance = 8

world.zip

https://github.com/df-mc/dragonfly/files/6585096/world.zip
(Also tried deleting the world and generate a new one, but the issue still occurs)

Clean up tall grass block types

The tall grass block is a bit of a mess. The awkward fusion of blocks that can have a double block version and can't just does not work and is rather confusing. This should probably be split up into a couple of other types.

Add a method to strike lightning in the world

Lightning has traditionally been an entity, but it would probably be better if there was a simple method to strike lightning in a world. Something like (*world.World).StrikeLightning(pos) might work.

Cleaner main file

Hi, I feel like these functions should just be checked in the srv.Start() function, it would make the main file look less all over the place. I know I could just add this check into another function but I think it should be in the srv.Start() function by default.
image

Problem with player transfer.

edit: the code I used:
image

Hi, I found an issue with the player transfer function.
image

What I expect is: the player get transferred to the server I want (which in this case is nozzle.wtf:19132)

What actually happened: The transfer function closes player's session which disconnects the player with the message:
image

I tried removing the close function and everything was working! so I think we should either remove this function in the transfer or just find another way to close the session of the player without preventing the player from being transferred

Attacking a falling block directly after creating it kicks you

When letting a block, like sand, fall and punching the falling block entity while it falls, the server kicks you with the message:

DEBU[1341] failed processing packet from xx.xxx.xxx.xxx:xxxxx (Sandertv): *packet.InventoryTransaction: invalid entity interaction: no entity found with runtime ID 13 

It seems to be unable to find the entity that was spawned even though it should be present.

Entity registry system

This will be needed for entity saving (#143) and possibly for other things. Not too sure how this should look, but it should be put in the world package.

Make world height changeable with a constant

World height (and depth) is currently hardcoded in a large amount of places throughout the codebase. We should make all these places use constants so that we can make an easy transition in the event of a world height (or depth) change.

Add support for capes

This shouldn't be difficult at all, a struct for capes already exists, we just have to parse cape data from the player's client data and manage it like with skins.

Implement runtime player skin changing

Skin changes are currently not handled, so changing skin in-game won't allow other people to see it. *packet.PlayerSkin should have a handler to handle skin changes.

Skin changing should probably have a HandleSkinChange(old, new) method in the player.Handler so that people can listen for skin changes.

One thing to consider is that skin changes should be propagated to all players. We could either send the new skin to all connected sessions, or we could send a *packet.PlayerSkin only to viewers of the player that changes skin and always send a *packet.PlayerSkin when a player sees another player after it entering the view distance.

Finish sign implementation

The sign implementation at feature/signs requires some minor changes to the way the rotation + wall/standing is structured. With some other small changes this should be ready to be merged into master.

Varargs error

Hi, I found a little issue with Varargs, here's the whole error:

image

And here's my command:

image

Send world spawn to players when necessary

Currently the world spawn isn't sent to the player after its initial spawn. The spawn position should be updated on world change and when the position of the world that the player is in is changed.

Clean up chunk serialisation

Chunk serialisation is quite a mess at the moment. This should be improved both for performance reasons and readability.

Implement light updates

Light is currently calculated on chunk load, but never after that. With a more flexible implementation of light calculation, we should be able to do light updates relatively easily.

player.Player.Inventory().SetItem() on server.Server.Accept()

Error

DEBU[0092] failed processing packet from 
x.x.x.x:55750 (Endermanbugzjfc): *packet.InventoryTransaction: unhandled inventory transaction type *protocol.MismatchTransactionData
  • Expected result: Item got set and inventory is synchronous between server and client
  • Actual result: The error sometimes occur, depending on the network, delay of code execution, and of course luck

Reproduce

Run player.Player.Inventory().SetItem() right after server.Server.Accept()

Environment

  • DragonFly: 0.1.0 4b13a4f
  • OS: macOS Big Sur (Intel) version 11.4
  • Network: Shitty school WiFi
  • Go: 1.16
  • Client: 1.17.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.