Skip to content

Commit eec1cfa

Browse files
committed
fix: potions
1 parent eb29dc6 commit eec1cfa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/stats/items/processing.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package stats
22

33
import (
44
"fmt"
5+
"os"
56
notenoughupdates "skycrypt/src/NotEnoughUpdates"
67

78
"skycrypt/src/constants"
@@ -148,7 +149,11 @@ func ProcessItem(item *skycrypttypes.Item, source string) models.ProcessedItem {
148149
potionType = "normal"
149150
}
150151

151-
processedItem.Texture = "http://localhost:8080/api/potion/" + potionType + "/" + color
152+
if os.Getenv("DEV") != "true" {
153+
processedItem.Texture = fmt.Sprintf("/api/potion/%s/%s", potionType, color)
154+
}
155+
156+
processedItem.Texture = fmt.Sprintf("http://localhost:8080/api/potion/%s/%s", potionType, color)
152157
}
153158

154159
if processedItem.Texture == "" {
@@ -160,7 +165,7 @@ func ProcessItem(item *skycrypttypes.Item, source string) models.ProcessedItem {
160165
}
161166

162167
processedItem.Texture = lib.ApplyTexture(TextureItem)
163-
if strings.HasPrefix(processedItem.Texture, "http://localhost:8080/assets/resourcepacks/FurfSky/") {
168+
if strings.Contains(processedItem.Texture, "/assets/resourcepacks/FurfSky/") {
164169
processedItem.TexturePack = "FURFSKY_REBORN"
165170
}
166171

0 commit comments

Comments
 (0)