Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ce983fb
fix: crap ton of changes and bug fixes
DuckySoLucky Feb 24, 2026
8cacc9c
feat: forgot to add texture here
DuckySoLucky Feb 24, 2026
bf20bf4
fix: 64x32 skulls being white
DuckySoLucky Feb 25, 2026
a20f15e
fix: back left being flipped
DuckySoLucky Feb 25, 2026
7fcdfc2
fix: openapi docs
DuckySoLucky Feb 26, 2026
05a756e
fix: endpoint
DuckySoLucky Feb 26, 2026
1da4032
chore: regenerate openapi schema
DarthGigi Feb 26, 2026
89fe057
refactor: small consistency fixes, add consumable secton
DuckySoLucky Feb 26, 2026
48f458e
feat: sort items based on the inventory index as well, not only rarit…
DuckySoLucky Feb 26, 2026
a09c70d
fix: sunflower garden milestone
DuckySoLucky Feb 26, 2026
41239d0
feat: add sea creatures
DuckySoLucky Feb 26, 2026
962ba87
fix: replacing entire accessory data for dupes
DuckySoLucky Feb 26, 2026
6fc085b
feat: add mutations
DuckySoLucky Feb 26, 2026
7a36fb5
feat: add attribute_shards endpoint
DuckySoLucky Mar 3, 2026
bb25c7a
perf: do not fetch if it's bot
DuckySoLucky Mar 3, 2026
c319d89
feat: add missing accessories
DuckySoLucky Mar 3, 2026
6fc6c4f
perf: better username resolving caching
DuckySoLucky Mar 4, 2026
8472f22
feat: add ability to toggle verbose logging & forensics
DuckySoLucky Mar 4, 2026
714f06d
feat: add new museum categories
DuckySoLucky Mar 4, 2026
41e46c6
Fix: Bukkit Case 351 damage 2 maps to cactus_green (#37)
JoonaFinland Mar 5, 2026
42698b7
perf: make startup a lot faster, especially dev
DuckySoLucky Mar 8, 2026
a115b8c
Fix: use green_dye instead of cactus_green for dye ID 351 (#38)
JoonaFinland Mar 8, 2026
4cad981
panic: failed to connect to Redis: could not connect to Redis: LOADIN…
DuckySoLucky Mar 8, 2026
05656e3
refactor: do not use go git
DuckySoLucky Mar 8, 2026
51dcf96
fix: start update loop only on main thread
DuckySoLucky Mar 8, 2026
03587e9
fix: update on all threads, forgot to add on last commit
DuckySoLucky Mar 8, 2026
1da304b
fix: trophy fish
DuckySoLucky Mar 9, 2026
d6ad2b8
feat(inventory): add sacks
DuckySoLucky Mar 9, 2026
b31a9c6
very important fix, trust me nocap
DuckySoLucky Mar 9, 2026
a5df7dd
fix: error
DuckySoLucky Mar 9, 2026
1d9a3b4
fix: hypixelCase at SkyCrypt, gen types
DuckySoLucky Mar 10, 2026
1d4e856
fix: consumables texture
DuckySoLucky Mar 10, 2026
a8b20cd
fix: foraging lvl cap
DuckySoLucky Mar 10, 2026
9a129af
fix: embed
DuckySoLucky Mar 12, 2026
c58fc4a
Merge branch 'prod' into dev
DuckySoLucky Mar 12, 2026
9b197a8
build: bump mongodb to v2
DuckySoLucky Mar 13, 2026
e7d80fd
fix: FS link
DuckySoLucky Mar 14, 2026
ade61f1
H+ link
DuckySoLucky Mar 14, 2026
1a2e321
feat: add rank to the embed
DuckySoLucky Mar 14, 2026
0071071
bump docs
DuckySoLucky Mar 14, 2026
423bc9a
disable bot detection to test smth
DuckySoLucky Mar 15, 2026
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
2 changes: 1 addition & 1 deletion assets/resourcepacks/FurfSky/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"name": "FurfSky Reborn",
"version": "v1.9.0",
"author": "The Reborn Team",
"url": "https://furfsky.net/"
"url": "https://modrinth.com/resourcepack/furfsky-reborn"
}
4 changes: 2 additions & 2 deletions assets/resourcepacks/Hypixel_Plus/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"name": "Hypixel Plus",
"version": "v0.23.4",
"author": "ic22487",
"url": "https://hypixel.net/threads/4174260/"
}
"url": "https://modrinth.com/resourcepack/hypixel-plus"
}
2 changes: 1 addition & 1 deletion docs/docs.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/swagger.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ components:
type: string
purse:
type: number
rank:
$ref: '#/components/schemas/models.RankOutput'
skills:
$ref: '#/components/schemas/models.EmbedDataSkills'
skyblock_level:
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gofiber/fiber/v2 v2.52.10
github.com/joho/godotenv v1.5.1
github.com/swaggo/swag/v2 v2.0.0-rc5
go.mongodb.org/mongo-driver v1.17.6
go.mongodb.org/mongo-driver/v2 v2.5.0
go.uber.org/zap v1.27.1
golang.org/x/sync v0.19.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
Expand Down Expand Up @@ -37,13 +37,11 @@ require (
github.com/go-openapi/swag/stringutils v0.25.4 // indirect
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/onsi/gomega v1.34.1 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/stretchr/testify v1.11.1 // indirect
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/gofiber/fiber/v2 v2.52.10 h1:jRHROi2BuNti6NYXmZ6gbNSfT3zj/8c0xy94GOU5elY=
github.com/gofiber/fiber/v2 v2.52.10/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
Expand Down Expand Up @@ -94,8 +92,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE=
github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
Expand Down Expand Up @@ -140,8 +136,8 @@ github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3i
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss=
go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
go.mongodb.org/mongo-driver/v2 v2.5.0 h1:yXUhImUjjAInNcpTcAlPHiT7bIXhshCTL3jVBkF3xaE=
go.mongodb.org/mongo-driver/v2 v2.5.0/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
Expand Down
10 changes: 5 additions & 5 deletions src/db/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync"
"time"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/v2/bson"
"go.mongodb.org/mongo-driver/v2/mongo"
"go.mongodb.org/mongo-driver/v2/mongo/options"
)

var mongoClient *mongo.Client
Expand All @@ -28,7 +28,7 @@ func InitMongo(uri string, dbName string) error {
defer cancel()

clientOptions := options.Client().ApplyURI(uri)
client, err := mongo.Connect(ctx, clientOptions)
client, err := mongo.Connect(clientOptions)
if err != nil {
return fmt.Errorf("could not connect to MongoDB: %v", err)
}
Expand Down Expand Up @@ -123,7 +123,7 @@ func UpdateEmoji(uuid string, emoji string) error {
defer cancel()

collection := GetMongoCollection("emojis")
opts := options.Update().SetUpsert(true)
opts := options.UpdateOne().SetUpsert(true)
filter := bson.M{"uuid": uuid}
update := bson.M{"$set": bson.M{"emoji": emoji}}

Expand Down
14 changes: 7 additions & 7 deletions src/forensics/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"time"

"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/v2/mongo"
"go.mongodb.org/mongo-driver/v2/mongo/options"
"go.uber.org/zap"
)

Expand All @@ -23,7 +23,7 @@ func NewInstrumentedCollection(coll *mongo.Collection) *InstrumentedCollection {
}
}

func (ic *InstrumentedCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult {
func (ic *InstrumentedCollection) FindOne(ctx context.Context, filter interface{}, opts ...options.Lister[options.FindOneOptions]) *mongo.SingleResult {
start := time.Now()

ic.logger.Debug("mongo_query_start",
Expand Down Expand Up @@ -56,7 +56,7 @@ func (ic *InstrumentedCollection) FindOne(ctx context.Context, filter interface{
return result
}

func (ic *InstrumentedCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error) {
func (ic *InstrumentedCollection) Find(ctx context.Context, filter interface{}, opts ...options.Lister[options.FindOptions]) (*mongo.Cursor, error) {
start := time.Now()

ic.logger.Debug("mongo_query_start",
Expand Down Expand Up @@ -85,7 +85,7 @@ func (ic *InstrumentedCollection) Find(ctx context.Context, filter interface{},
return cursor, err
}

func (ic *InstrumentedCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error) {
func (ic *InstrumentedCollection) InsertOne(ctx context.Context, document interface{}, opts ...options.Lister[options.InsertOneOptions]) (*mongo.InsertOneResult, error) {
start := time.Now()

ic.logger.Debug("mongo_write_start",
Expand Down Expand Up @@ -113,7 +113,7 @@ func (ic *InstrumentedCollection) InsertOne(ctx context.Context, document interf
return result, err
}

func (ic *InstrumentedCollection) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error) {
func (ic *InstrumentedCollection) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...options.Lister[options.UpdateOneOptions]) (*mongo.UpdateResult, error) {
start := time.Now()

ic.logger.Debug("mongo_write_start",
Expand Down Expand Up @@ -146,7 +146,7 @@ func (ic *InstrumentedCollection) UpdateOne(ctx context.Context, filter interfac
return result, err
}

func (ic *InstrumentedCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error) {
func (ic *InstrumentedCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...options.Lister[options.AggregateOptions]) (*mongo.Cursor, error) {
start := time.Now()

ic.logger.Debug("mongo_aggregation_start",
Expand Down
1 change: 1 addition & 0 deletions src/models/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package models
type EmbedData struct {
DisplayName string `json:"displayName"`
Username string `json:"username"`
Rank RankOutput `json:"rank"`
Uuid string `json:"uuid"`
ProfileId string `json:"profile_id"`
ProfileCuteName string `json:"profile_cute_name"`
Expand Down
4 changes: 0 additions & 4 deletions src/routes/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ func EmbedHandler(c *fiber.Ctx) error {
profileId = profileId[1:]
}

if profileId == "" {
return c.JSON(models.EmbedData{})
}

if utility.IsUUID(profileId) {
embed, err := redis.Get(fmt.Sprintf("embed:%s:%s", mowojang.UUID, profileId))
if err == nil && embed != "" {
Expand Down
9 changes: 8 additions & 1 deletion src/routes/networth.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ func NetworthHandler(c *fiber.Ctx) error {
})
}

player, err := api.GetPlayer(mowojang.UUID)
if err != nil {
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"error": fmt.Sprintf("Failed to get player data: %v", err),
})
}

profileMuseum, err := api.GetMuseum(profile.ProfileID)
if err != nil {
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
Expand Down Expand Up @@ -89,7 +96,7 @@ func NetworthHandler(c *fiber.Ctx) error {
"nonCosmetic": nonCosmeticNetworth.Networth,
}

go stats.StoreEmbedData(mowojang, userProfile, profile, formattedNetworth)
go stats.StoreEmbedData(mowojang, player, userProfile, profile, formattedNetworth)

utility.LogVerbose("Returning /api/networth/%s in %s", uuid, time.Since(timeNow))

Expand Down
3 changes: 2 additions & 1 deletion src/stats/discord_embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func getSlayersForEmbed(slayers *models.SlayersOutput) models.EmbedDataSlayers {
return output
}

func StoreEmbedData(mowojang *models.MowojangReponse, userProfile *skycrypttypes.Member, profile *skycrypttypes.Profile, networth map[string]float64) {
func StoreEmbedData(mowojang *models.MowojangReponse, player *skycrypttypes.Player, userProfile *skycrypttypes.Member, profile *skycrypttypes.Profile, networth map[string]float64) {
skills := GetSkills(userProfile, profile, &skycrypttypes.Player{})
dungeons := GetDungeons(userProfile)
slayers := GetSlayers(userProfile)
Expand All @@ -77,6 +77,7 @@ func StoreEmbedData(mowojang *models.MowojangReponse, userProfile *skycrypttypes
output := models.EmbedData{
DisplayName: mowojang.Name,
Username: mowojang.Name,
Rank: *GetRank(player),
Uuid: mowojang.UUID,
ProfileId: profile.ProfileID,
ProfileCuteName: profile.CuteName,
Expand Down
3 changes: 2 additions & 1 deletion src/utility/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ func IsUUID(uuid string) bool {
// IsKnownBot returns true if the request comes from a known bot (e.g. Discordbot, Googlebot).
// The frontend sets the X-Known-Bot header to "true" when it detects the request is from a bot.
func IsKnownBot(c *fiber.Ctx) bool {
return c.Get("X-Known-Bot") == "true"
return false
// return c.Get("X-Known-Bot") == "true"
}
Loading