Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ players/*
.DS_Store
.fleet/
.vscode.code-workspace
example/spectrum/spectrum.exe
example/spectrum/logs/*
example/default/logs/*
example/default/proxy.exe
example/default/proxy.exe
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Oomph implements a server authoritative system for movement and combat, allowing

## Dependencies
- [Dragonfly](https://github.com/oomph-ac/dragonfly)
- [Spectrum](https://github.com/oomph-ac/spectrum)
- (For your PM server) [Spectrum-PM](https://github.com/oomph-ac/spectrum-pm)
- [OConfig](https://github.com/oomph-ac/oconfig)
The multi-version will not be going public at the moment, you may remove the dependency from `go.mod`.

Expand Down Expand Up @@ -65,4 +63,3 @@ Logic for combat, setting the client & server tick, and lag compensating entitie
* [JustTalDevelops](https://github.com/JustTalDevelops) - Created the base of Oomph, making it able to intercept packets, and avoiding pesky import cycle.
* [هاشم](https://github.com/hashimthearab) - Created the base of Oomph
* [cjmustard](https://www.github.com/cjmustard) - Moral support

26 changes: 22 additions & 4 deletions example/default/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ func handleConn(conn *minecraft.Conn, listener *minecraft.Listener) {
completion := make(chan struct{}, 1)
go func() {
defer listener.Disconnect(conn, "connection lost")
defer serverConn.Close()
defer func() {
completion <- struct{}{}
}()
Expand All @@ -149,7 +148,15 @@ func handleConn(conn *minecraft.Conn, listener *minecraft.Listener) {
continue
}

if err := serverConn.WritePacket(pk); err != nil {
currentServerConn := p.ServerConn()
if currentServerConn == nil {
return
}

if err := currentServerConn.WritePacket(pk); err != nil {
if latestServerConn := p.ServerConn(); latestServerConn != nil && latestServerConn != currentServerConn {
continue
}
var disc minecraft.DisconnectError
if ok := errors.As(err, &disc); ok {
fmt.Println(err, "Client -> Server")
Expand All @@ -160,15 +167,26 @@ func handleConn(conn *minecraft.Conn, listener *minecraft.Listener) {
}
}()
go func() {
defer serverConn.Close()
defer listener.Disconnect(conn, "connection lost")
defer func() {
completion <- struct{}{}
}()

for {
pk, err := serverConn.ReadPacket()
currentServerConn := p.ServerConn()
if currentServerConn == nil {
return
}
currentMinecraftServerConn, ok := currentServerConn.(*minecraft.Conn)
if !ok {
return
}

pk, err := currentMinecraftServerConn.ReadPacket()
if err != nil {
if latestServerConn := p.ServerConn(); latestServerConn != nil && latestServerConn != currentServerConn {
continue
}
var disc minecraft.DisconnectError
if ok := errors.As(err, &disc); ok {
fmt.Println(err, "Server -> Client")
Expand Down
188 changes: 0 additions & 188 deletions example/spectrum/spectrum.go

This file was deleted.

27 changes: 8 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,44 @@ module github.com/oomph-ac/oomph
go 1.25.1

require (
github.com/akmalfairuz/legacy-version v1.5.4
github.com/chewxy/math32 v1.10.1
github.com/cooldogedev/spectrum v0.0.40-0.20250527034552-55ddfe1bba67
github.com/df-mc/dragonfly v0.10.9
github.com/ethaniccc/float32-cube v0.0.0-20250511224129-7af1f8c4ee12
github.com/getsentry/sentry-go v0.40.0
github.com/go-echarts/statsview v0.4.2
github.com/go-gl/mathgl v1.2.0
github.com/oomph-ac/oconfig v0.0.0-20250315200330-e36f34d634e5
github.com/sandertv/go-raknet v1.15.0
github.com/sandertv/gophertunnel v1.52.3-0.20260103191303-85f94a5d3b01
github.com/sandertv/go-raknet v1.15.1-0.20260112202637-beca0b10c217
github.com/sandertv/gophertunnel v1.54.0
github.com/zeebo/xxh3 v1.0.2
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9
)

require (
github.com/brentp/intintmap v0.0.0-20190211203843-30dc0ade9af9 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cooldogedev/spectral v0.0.5 // indirect
github.com/coreos/go-oidc/v3 v3.17.0 // indirect
github.com/df-mc/go-playfab v1.0.0 // indirect
github.com/df-mc/go-xsapi v1.0.1 // indirect
github.com/df-mc/goleveldb v1.1.9 // indirect
github.com/df-mc/jsonc v1.0.5 // indirect
github.com/df-mc/worldupgrader v1.0.20 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/go-echarts/go-echarts/v2 v2.5.1 // indirect
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/go-version v1.8.0 // indirect
github.com/hjson/hjson-go/v4 v4.4.0 // indirect
github.com/klauspost/compress v1.18.2 // indirect
github.com/klauspost/compress v1.18.4 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/onsi/gomega v1.36.3 // indirect
github.com/quic-go/quic-go v0.55.0 // indirect
github.com/rs/cors v1.11.0 // indirect
github.com/samber/lo v1.49.1 // indirect
github.com/scylladb/go-set v1.0.2 // indirect
github.com/segmentio/fasthash v1.0.3 // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/mod v0.31.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
golang.org/x/net v0.48.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/text v0.32.0 // indirect
golang.org/x/tools v0.40.0 // indirect
)

//replace github.com/sandertv/go-raknet => github.com/tedacmc/tedac-raknet v0.0.4
Expand All @@ -60,8 +53,4 @@ require (

replace github.com/df-mc/dragonfly => ../dragonfly

replace github.com/cooldogedev/spectrum => ../spectrum

replace github.com/oomph-ac/oconfig => ../oconfig

replace github.com/akmalfairuz/legacy-version => ../legacy-version
Loading