diff --git a/public/resources/scss/stats.scss b/public/resources/scss/stats.scss
index 8d34e2ee9b..944c02e0cc 100644
--- a/public/resources/scss/stats.scss
+++ b/public/resources/scss/stats.scss
@@ -1683,7 +1683,7 @@ a.additional-player-stat:hover {
inventory-view {
display: grid;
place-content: center center;
- --inventory-width: clamp(300px, calc(100vw - 40px), 700px);
+ --inventory-width: clamp(300px, calc(100vw - 40px), 760px);
gap: calc(var(--inventory-width) * 0.01);
padding: calc(var(--inventory-width) * 0.01);
grid-template-columns: repeat(9, calc(var(--inventory-width) * 0.1));
diff --git a/public/resources/ts/elements/rich-item.ts b/public/resources/ts/elements/rich-item.ts
index 0527ba8ea8..3c9ae32bd5 100644
--- a/public/resources/ts/elements/rich-item.ts
+++ b/public/resources/ts/elements/rich-item.ts
@@ -12,6 +12,7 @@ import {
mousemoveLoreListener,
showBackpack,
} from "../stats-defer";
+import { formatNumber } from "../../../../common/formatting";
@customElement("rich-item")
export class InventoryView extends LitElement {
@@ -55,7 +56,9 @@ export class InventoryView extends LitElement {
}
return html`
- ${this.item.Count != 1 ? html`${this.item.Count}
` : undefined}
+ ${this.item.Count != 1
+ ? html`${formatNumber(this.item.Count, false, 0)}
`
+ : undefined}
`;
}
diff --git a/public/resources/ts/stats-defer.ts b/public/resources/ts/stats-defer.ts
index a27c34d44c..d8594bf102 100644
--- a/public/resources/ts/stats-defer.ts
+++ b/public/resources/ts/stats-defer.ts
@@ -125,6 +125,7 @@ export const ALL_ITEMS = new Map(
items.wardrobe_inventory,
items.storage,
items.hotm,
+ items.sacks,
items.bingo_card,
]
.flat()
diff --git a/src/constants.js b/src/constants.js
index 55fd1f2e68..8c14747cca 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -22,3 +22,4 @@ export * from "./constants/skins-animations.js";
export * from "./constants/tags.js";
export * from "./constants/trophy-fish.js";
export * from "./constants/accessories.js";
+export * from "./constants/sacks.js";
diff --git a/src/constants/sacks.js b/src/constants/sacks.js
new file mode 100644
index 0000000000..64d7b535a6
--- /dev/null
+++ b/src/constants/sacks.js
@@ -0,0 +1,688 @@
+export const SACKS = {
+ AGRONOMY_SACK: {
+ items: [
+ "BROWN_MUSHROOM",
+ "CACTUS",
+ "INK_SACK:2",
+ "CARROT_ITEM",
+ "INK_SACK:3",
+ "CROPIE",
+ "HAY_BLOCK",
+ "MELON",
+ "NETHER_STALK",
+ "POISONOUS_POTATO",
+ "POTATO_ITEM",
+ "PUMPKIN",
+ "RED_MUSHROOM",
+ "SEEDS",
+ "SQUASH",
+ "SUGAR_CANE",
+ "WHEAT",
+ ],
+ texture: "ef835b8941fe319931749b87fe8e84c5d1f4a271b5fbce5e700a60004d881f79",
+ },
+ ENCHANTED_AGRONOMY_SACK: {
+ items: [
+ "ENCHANTED_BREAD",
+ "ENCHANTED_BROWN_MUSHROOM",
+ "ENCHANTED_CACTUS",
+ "ENCHANTED_CACTUS_GREEN",
+ "ENCHANTED_CARROT",
+ "ENCHANTED_COCOA",
+ "ENCHANTED_HAY_BLOCK",
+ "ENCHANTED_MELON",
+ "ENCHANTED_NETHER_STALK",
+ "ENCHANTED_POISONOUS_POTATO",
+ "ENCHANTED_POTATO",
+ "ENCHANTED_PUMPKIN",
+ "ENCHANTED_RED_MUSHROOM",
+ "ENCHANTED_SEEDS",
+ "ENCHANTED_SUGAR",
+ ],
+ texture: "184d2ff1e177357574f9f71e19397fff3a210a94e78c0d2a4360cc5df1eb807b",
+ },
+ HUSBANDRY_SACK: {
+ items: [
+ "FEATHER",
+ "LEATHER",
+ "PORK",
+ "RAW_CHICKEN",
+ "EGG",
+ "MUTTON",
+ "RABBIT",
+ "RAW_BEEF",
+ "RABBIT_HIDE",
+ "RABBIT_FOOT",
+ "WOOL",
+ ],
+ texture: "c73087f1e654b1682733584a44097587fb942e1f343aae8307bd7dac84e843ab",
+ },
+ ENCHANTED_HUSBANDRY_SACK: {
+ items: [
+ "ENCHANTED_EGG",
+ "ENCHANTED_FEATHER",
+ "ENCHANTED_LEATHER",
+ "ENCHANTED_MUTTON",
+ "ENCHANTED_PORK",
+ "ENCHANTED_RABBIT_FOOT",
+ "ENCHANTED_RABBIT_HIDE",
+ "ENCHANTED_RAW_BEEF",
+ "ENCHANTED_RAW_CHICKEN",
+ "ENCHANTED_RABBIT",
+ "ENCHANTED_WOOL",
+ ],
+ texture: "746a6063263ba7208a2a06cef73234791c92d5f67080a365508b02483eefaf9a",
+ },
+ MINING_SACK: {
+ items: [
+ "COAL",
+ "COBBLESTONE",
+ "DIAMOND",
+ "EMERALD",
+ "ENDER_STONE",
+ "FLINT",
+ "GLOWSTONE_DUST",
+ "GOLD_INGOT",
+ "GRAVEL",
+ "HARD_STONE",
+ "IRON_INGOT",
+ "INK_SACK:4",
+ "MITHRIL_ORE",
+ "QUARTZ",
+ "NETHERRACK",
+ "OBSIDIAN",
+ "OIL_BARREL",
+ "PLASMA",
+ "REDSTONE",
+ "SAND",
+ "STARFALL",
+ "STONE",
+ "TITANIUM_ORE",
+ "TREASURITE",
+ "VOLTA",
+ ],
+ texture: "915fcebbbe02fdb72acd2095d9edfcea095e604b3682db88963b5b83b2939b67",
+ },
+ ENCHANTED_MINING_SACK: {
+ items: [
+ "ENCHANTED_COAL",
+ "ENCHANTED_COBBLESTONE",
+ "ENCHANTED_DIAMOND",
+ "ENCHANTED_EMERALD",
+ "ENCHANTED_ENDSTONE",
+ "ENCHANTED_FLINT",
+ "ENCHANTED_GLOWSTONE_DUST",
+ "ENCHANTED_GOLD",
+ "ENCHANTED_HARD_STONE",
+ "ENCHANTED_IRON",
+ "ENCHANTED_LAPIS_LAZULI",
+ "ENCHANTED_MITHRIL",
+ "ENCHANTED_MYCELIUM",
+ "ENCHANTED_NETHERRACK",
+ "ENCHANTED_OBSIDIAN",
+ "ENCHANTED_QUARTZ",
+ "ENCHANTED_RED_SAND",
+ "ENCHANTED_REDSTONE",
+ "ENCHANTED_SAND",
+ "ENCHANTED_SULPHUR",
+ "ENCHANTED_TITANIUM",
+ ],
+ texture: "eedc69fefad184ee8c9186928da982addfd783bed98d95083408bf419e0cccd0",
+ },
+ GEMSTONE_SACK: {
+ items: [
+ "ROUGH_AMBER_GEM",
+ "FLAWED_AMBER_GEM",
+ "FINE_AMBER_GEM",
+ "FLAWLESS_AMBER_GEM",
+ "PERFECT_AMBER_GEM",
+ "ROUGH_TOPAZ_GEM",
+ "FLAWED_TOPAZ_GEM",
+ "FINE_TOPAZ_GEM",
+ "FLAWLESS_TOPAZ_GEM",
+ "PERFECT_TOPAZ_GEM",
+ "ROUGH_SAPPHIRE_GEM",
+ "FLAWED_SAPPHIRE_GEM",
+ "FINE_SAPPHIRE_GEM",
+ "FLAWLESS_SAPPHIRE_GEM",
+ "PERFECT_SAPPHIRE_GEM",
+ "ROUGH_AMETHYST_GEM",
+ "FLAWED_AMETHYST_GEM",
+ "FINE_AMETHYST_GEM",
+ "FLAWLESS_AMETHYST_GEM",
+ "PERFECT_AMETHYST_GEM",
+ "ROUGH_JASPER_GEM",
+ "FLAWED_JASPER_GEM",
+ "FINE_JASPER_GEM",
+ "FLAWLESS_JASPER_GEM",
+ "PERFECT_JASPER_GEM",
+ "ROUGH_RUBY_GEM",
+ "FLAWED_RUBY_GEM",
+ "FINE_RUBY_GEM",
+ "FLAWLESS_RUBY_GEM",
+ "PERFECT_RUBY_GEM",
+ "ROUGH_JADE_GEM",
+ "FLAWED_JADE_GEM",
+ "FINE_JADE_GEM",
+ "FLAWLESS_JADE_GEM",
+ "PERFECT_JADE_GEM",
+ "ROUGH_OPAL_GEM",
+ "FLAWED_OPAL_GEM",
+ "FINE_OPAL_GEM",
+ "FLAWLESS_OPAL_GEM",
+ "PERFECT_OPAL_GEM",
+ ],
+ texture: "95ba804b7ae92c65b2f41d18be899a3bd139772e3e3c81c2fc8addbb27536952",
+ },
+ DWARVEN_SACK: {
+ items: [
+ "PLASMA",
+ "VOLTA",
+ "SORROW",
+ "GLACITE_JEWEL",
+ "GOBLIN_EGG",
+ "GOBLIN_EGG_GREEN",
+ "GOBLIN_EGG_YELLOW",
+ "GOBLIN_EGG_RED",
+ "GOBLIN_EGG_BLUE",
+ ],
+ texture: "915fcebbbe02fdb72acd2095d9edfcea095e604b3682db88963b5b83b2939b67",
+ },
+ CRYSTAL_HOLLOWS_SACK: {
+ items: [
+ "ROBOTRON_REFLECTOR",
+ "FTX_3070",
+ "CONTROL_SWITCH",
+ "ELECTRON_TRANSMITTER",
+ "SYNTHETIC_HEART",
+ "SUPERLITE_MOTOR",
+ "BOB_OMB",
+ "JUNGLE_KEY",
+ "YOGGIE",
+ "SLUDGE_JUICE",
+ "CORLEONITE",
+ "OIL_BARREL",
+ ],
+ texture: "a6b46beeb5f6e0006163eda4a50703a40e6591080b0e67779312adcfec46152",
+ },
+ COMBAT_SACK: {
+ items: [
+ "BLAZE_ROD",
+ "BONE",
+ "CHILI_PEPPER",
+ "ENDER_PEARL",
+ "GHAST_TEAR",
+ "SULPHUR",
+ "MAGMA_CREAM",
+ "ROTTEN_FLESH",
+ "SLIME_BALL",
+ "SPIDER_EYE",
+ "STRING",
+ ],
+ texture: "1c13c4774c82c07071e6d1408717b1e3eac56186042a5803fc174452e32a254a",
+ },
+ ENCHANTED_COMBAT_SACK: {
+ items: [
+ "ENCHANTED_BLAZE_POWDER",
+ "ENCHANTED_BONE",
+ "ENCHANTED_ENDER_PEARL",
+ "ENCHANTED_GHAST_TEAR",
+ "ENCHANTED_GUNPOWDER",
+ "ENCHANTED_MAGMA_CREAM",
+ "ENCHANTED_ROTTEN_FLESH",
+ "ENCHANTED_SLIME_BALL",
+ "ENCHANTED_SPIDER_EYE",
+ "ENCHANTED_STRING",
+ ],
+ texture: "c2a3420697256517d5361b3463019647c0689725b3489f9dd24a22ddd40bd41f",
+ },
+ DRAGON_SACK: {
+ items: [
+ "PROTECTOR_FRAGMENT",
+ "OLD_FRAGMENT",
+ "UNSTABLE_FRAGMENT",
+ "STRONG_FRAGMENT",
+ "YOUNG_FRAGMENT",
+ "WISE_FRAGMENT",
+ "SUPERIOR_FRAGMENT",
+ "HOLY_FRAGMENT",
+ "MITE_GEL",
+ "RITUAL_RESIDUE",
+ "CRYSTAL_FRAGMENT",
+ ],
+ texture: "5739492be78c572fb4c6bfaf8f10bd528553b43af575ba073acbd2c4bf77c40b",
+ },
+ FORAGING_SACK: {
+ items: [
+ "LOG_2",
+ "LOG:1",
+ "LOG:3",
+ "LOG:2",
+ "LOG",
+ "LOG_2:1",
+ "APPLE",
+ "SAPLING:4",
+ "SAPLING:1",
+ "SAPLING:3",
+ "SAPLING:2",
+ "SAPLING",
+ "SAPLING:5",
+ ],
+ texture: "2c6e24df498ba4a589c259d9fc0d3db348f93cdf26a5fe461571c1da706efaf3",
+ },
+ ENCHANTED_FORAGING_SACK: {
+ items: [
+ "ENCHANTED_ACACIA_LOG",
+ "ENCHANTED_BIRCH_LOG",
+ "ENCHANTED_DARK_OAK_LOG",
+ "ENCHANTED_JUNGLE_LOG",
+ "ENCHANTED_OAK_LOG",
+ "ENCHANTED_SPRUCE_LOG",
+ ],
+ texture: "35326464c6a79362730d79fe4611b911353c1b3c5144177773591357f1cd5ca1",
+ },
+ FISHING_SACK: {
+ items: [
+ "BLUE_SHARK_TOOTH",
+ "CHUM",
+ "CLAY",
+ "RAW_FISH:2",
+ "GLOWING_MUSHROOM",
+ "INK_SACK",
+ "WATER_LILY",
+ "NURSE_SHARK_TOOTH",
+ "PRISMARINE_CRYSTALS",
+ "PRISMARINE_SHARD",
+ "RAW_FISH:3",
+ "RAW_FISH",
+ "RAW_FISH:1",
+ "SHARK_FIN",
+ "SPONGE",
+ "TIGER_SHARK_TOOTH",
+ ],
+ texture: "f8f68669351a6fc7156ecfe3300ba94efe0766e24bed8785cf64a9f95435134b",
+ },
+ ENCHANTED_FISHING_SACK: {
+ items: [
+ "ENCHANTED_CLAY_BALL",
+ "ENCHANTED_CLOWNFISH",
+ "ENCHANTED_INK_SACK",
+ "ENCHANTED_WATER_LILY",
+ "ENCHANTED_PRISMARINE_CRYSTALS",
+ "ENCHANTED_PRISMARINE_SHARD",
+ "ENCHANTED_PUFFERFISH",
+ "ENCHANTED_RAW_FISH",
+ "ENCHANTED_RAW_SALMON",
+ "ENCHANTED_SHARK_FIN",
+ "ENCHANTED_SPONGE",
+ ],
+ texture: "ee2469de7f75d2e0a8b3b0c734a2b470782b604d1feb0172b4a72a77cb5bbda2",
+ },
+ LAVA_FISHING_SACK: {
+ items: [
+ "MAGMA_FISH",
+ "MAGMA_FISH_SILVER",
+ "MAGMA_FISH_GOLD",
+ "MAGMA_CREAM",
+ "COAL",
+ "BLAZE_POWDER",
+ "NETHERRACK",
+ "LUMP_OF_MAGMA",
+ "MOOGMA_PELT",
+ "PYROCLASTIC_SCALE",
+ "CUP_OF_BLOOD",
+ "FLAMING_HEART",
+ "ORB_OF_ENERGY",
+ "HORN_OF_TAURUS",
+ "LAVA_SHELL",
+ "THUNDER_SHARDS",
+ ],
+ texture: "da2a951592cc26cf5b6d9f66ae034916f9d2e97216d43b3fa11c979afd7df1ad",
+ },
+ NETHER_SACK: {
+ items: [
+ "BEZOS",
+ "BLAZE_ASHES",
+ "BLAZE_ROD",
+ "BURNING_EYE",
+ "COMPACT_OOZE",
+ "CORRUPTED_FRAGMENT",
+ "DIGESTED_MUSHROOMS",
+ "FLAMES",
+ "GAZING_PEARL",
+ "GHAST_TEAR",
+ "GLOWSTONE_DUST",
+ "HALLOWED_SKULL",
+ "HEAVY_PEARL",
+ "KADA_LEAD",
+ "KUUDRA_TEETH",
+ "LEATHER_CLOTH",
+ "LUMINO_FIBER",
+ "MAGMA_CHUNK",
+ "MAGMA_CREAM",
+ "MAGMAG",
+ "MILLENIA_OLD_BLAZE_ASHES",
+ "MUTATED_BLAZE_ASHES",
+ "MYCEL",
+ "QUARTZ",
+ "NETHER_STAR",
+ "NETHER_STALK",
+ "NETHERRACK",
+ "SAND:1",
+ "REKINDLED_EMBER_FRAGMENT",
+ "SPECTRE_DUST",
+ "SPELL_POWDER",
+ "SULPHUR_ORE",
+ "TENTACLE_MEAT",
+ "WITHER_SOUL",
+ "X",
+ "Y",
+ "Z",
+ ],
+ texture: "e345875e921a145f92038858aeecc3c2f083441ebc5c8265d31a281d268e365b",
+ },
+ DUNGEON_SACK: {
+ items: [
+ "SPIRIT_LEAP",
+ "DUNGEON_TRAP",
+ "INFLATABLE_JERRY",
+ "DUNGEON_DECOY",
+ "SUPERBOOM_TNT",
+ "BONZO_FRAGMENT",
+ "SCARF_FRAGMENT",
+ "LIVID_FRAGMENT",
+ "MIMIC_FRAGMENT",
+ "HEALING_TISSUE",
+ "GIANT_FRAGMENT_BOULDER",
+ "GIANT_FRAGMENT_LASER",
+ "WITHER_CATALYST",
+ "GOLEM_POPPY",
+ "FEL_PEARL",
+ ],
+ texture: "fb96c585ccd35f073da38d165cb9bb18ff136f1a184eee3f44725354640ebbd4",
+ },
+ RUNE_SACK: {
+ items: [
+ {
+ name: "◆ Bite Rune",
+ texture: "43a1ad4fcc42fb63c681328e42d63c83ca193b333af2a426728a25a8cc600692",
+ rarity: "epic",
+ items: ["RUNE_BITE_1", "RUNE_BITE_2", "RUNE_BITE_3"],
+ },
+ {
+ name: "◆ Blood Rune",
+ texture: "e02677053dc54245dac4b399d14aae21ee71a010bd9c336c8ecee1a0dbe8f58b",
+ rarity: "common",
+ items: ["RUNE_BLOOD_2_1", "RUNE_BLOOD_2_2", "RUNE_BLOOD_2_3"],
+ },
+ {
+ name: "◆ Clouds Rune",
+ texture: "2273740d454de962484712f9835e35119b37ab867fa6982d5cc1f333c2334e59",
+ rarity: "epic",
+ items: ["RUNE_CLOUDS_1", "RUNE_CLOUDS_2", "RUNE_CLOUDS_3"],
+ },
+ {
+ name: "◆ Couture Rune",
+ texture: "734fb3203233efbae82628bd4fca7348cd071e5b7b52407f1d1d2794e31799ff",
+ rarity: "legendary",
+ items: ["RUNE_COUTURE_1", "RUNE_COUTURE_2", "RUNE_COUTURE_3"],
+ },
+ {
+ name: "◆ End Rune",
+ texture: "3b11fb90db7f57beb435954013b1c7ef776c6bd96cbf3308aa8ebac29591ebbd",
+ rarity: "epic",
+ items: ["RUNE_DRAGON_1", "RUNE_DRAGON_2", "RUNE_DRAGON_3"],
+ },
+ {
+ name: "◆ Enchant Rune",
+ texture: "59ffacec6ee5a23d9cb24a2fe9dc15b24488f5f71006924560bf12148421ae6d",
+ rarity: "legendary",
+ items: ["RUNE_ENCHANT_1", "RUNE_ENCHANT_2", "RUNE_ENCHANT_3"],
+ },
+ {
+ name: "◆ Endersnake Rune",
+ texture: "c3a9acbb7d3d49b1d54d26111104d0da57d8b4ab37885b4bbd240ac71074cad2",
+ rarity: "legendary",
+ items: ["RUNE_ENDERSNAKE_1", "RUNE_ENDERSNAKE_2", "RUNE_ENDERSNAKE_3"],
+ },
+ {
+ name: "◆ Fiery Burst Rune",
+ texture: "8d620e4e3d3abfed6ad81a58a56bcd085d9e9efc803cabb21fa6c9e3969e2d2e",
+ rarity: "legendary",
+ items: ["RUNE_FIERY_BURST_1", "RUNE_FIERY_BURST_2", "RUNE_FIERY_BURST_3"],
+ },
+ {
+ name: "◆ Fire Spiral Rune",
+ texture: "8301aa86cafd4b2d732a9b4894cfcfc65edc828e8571b45dbf0a3ba96575cccf",
+ rarity: "rare",
+ items: ["RUNE_FIRE_SPIRAL_1", "RUNE_FIRE_SPIRAL_2", "RUNE_FIRE_SPIRAL_3"],
+ },
+ {
+ name: "◆ Gem Rune",
+ texture: "43a1ad4fcc42fb63c681328e42d63c83ca193b333af2a426728a25a8cc600692",
+ rarity: "common",
+ items: ["RUNE_GEM_1", "RUNE_GEM_2", "RUNE_GEM_3"],
+ },
+ {
+ name: "◆ Golden Rune",
+ texture: "35f4861aa5b22ee28a90e75dab45d221efd14c0b1ecc8ee998fb67e43bb8f3de",
+ rarity: "epic",
+ items: ["RUNE_GOLDEN_1", "RUNE_GOLDEN_2", "RUNE_GOLDEN_3"],
+ },
+ {
+ name: "◆ Grand Searing Rune",
+ texture: "87217a791685cf4fbb78674756a4f9793ae5fd0525dae362b491cc7a472ec64b",
+ rarity: "legendary",
+ items: ["RUNE_GRAND_SEARING_3"],
+ },
+ {
+ name: "◆ Hearts Rune",
+ texture: "2c1c179ad51955f1522c48ea9931f09c162741b45e22e9d3feb682c7e5ed8274",
+ rarity: "rare",
+ items: ["RUNE_HEARTS_1", "RUNE_HEARTS_2", "RUNE_HEARTS_3"],
+ },
+ {
+ name: "◆ Hot Rune",
+ texture: "26660b016d05645fffd1f48b792d1abe5d8f30dc96567569ae1d982d250b693c",
+ rarity: "uncommon",
+ items: ["RUNE_HOT_1", "RUNE_HOT_2", "RUNE_HOT_3"],
+ },
+ {
+ name: "◆ Ice Rune",
+ texture: "cdc57c75adf39ec6f0e0916049dd9671e98a8a1e600104e84e645c988950bd7",
+ rarity: "rare",
+ items: ["RUNE_ICE_1", "RUNE_ICE_2", "RUNE_ICE_3"],
+ },
+ {
+ name: "◆ Jerry Rune",
+ texture: "a1353ba65b6521f922b6464d17af39bddd43c984b8a227d99161594eba7a14c4",
+ rarity: "common",
+ items: ["RUNE_JERRY_3"],
+ },
+ {
+ name: "◆ Lavatears Rune",
+ texture: "8c8ccd5f863d82bb097b926bc5f4cca97b19f46e11b3a3a59d001adb89886773",
+ rarity: "legendary",
+ items: ["RUNE_LAVATEARS_1", "RUNE_LAVATEARS_2", "RUNE_LAVATEARS_3"],
+ },
+ {
+ name: "◆ Lava Rune",
+ texture: "b13d903f601034ac3400d2625fef104e9b0940746c554193f6d9e85a84a966a1",
+ rarity: "common",
+ items: ["RUNE_LAVA_1", "RUNE_LAVA_2", "RUNE_LAVA_3"],
+ },
+ {
+ name: "◆ Lightning Rune",
+ texture: "b85bcf7f82d34db89a95addf8e53253e2d9554c6fd2f2e39e24362d243a0ccf7",
+ rarity: "legendary",
+ items: ["RUNE_LIGHTNING_1", "RUNE_LIGHTNING_2", "RUNE_LIGHTNING_3"],
+ },
+ {
+ name: "◆ Magical Rune",
+ texture: "24480e39ea63e347d268de83090d09984bf34394118848348bf4eb57490ce9d2",
+ rarity: "rare",
+ items: ["RUNE_MAGIC_1", "RUNE_MAGIC_2", "RUNE_MAGIC_3"],
+ },
+ {
+ name: "◆ Music Rune",
+ texture: "3b481c31dc683bdcb7d375a7c5db7ac7adf9e9fe8b6c04a64931613e29fe470e",
+ rarity: "epic",
+ items: ["RUNE_MUSIC_1", "RUNE_MUSIC_2", "RUNE_MUSIC_3"],
+ },
+ {
+ name: "◆ Rainbow Rune",
+ texture: "72114a80357463fe2f59e397aab9fc66d482a65d524f8870d21c724c18ecf757",
+ rarity: "legendary",
+ items: ["RUNE_RAINBOW_1", "RUNE_RAINBOW_2", "RUNE_RAINBOW_3"],
+ },
+ {
+ name: "◆ Redstone Rune",
+ texture: "87a7a894057d4a1ff22a161d76600f719da57916633f683808cf4d358bb73a21",
+ rarity: "rare",
+ items: ["RUNE_REDSTONE_1", "RUNE_REDSTONE_2", "RUNE_REDSTONE_3"],
+ },
+ {
+ name: "◆ Smokey Rune",
+ texture: "e4d8a8d527f65a4f434f894f7ee42eb843015bda7927c63c6ea8a754afe9bb1b",
+ rarity: "common",
+ items: ["RUNE_SMOKEY_1", "RUNE_SMOKEY_2", "RUNE_SMOKEY_3"],
+ },
+ {
+ name: "◆ Snake Rune",
+ texture: "2c4a65c689b2d36409100a60c2ab8d3d0a67ce94eea3c1f7ac974fd893568b5d",
+ rarity: "legendary",
+ items: ["RUNE_SNAKE_1", "RUNE_SNAKE_2", "RUNE_SNAKE_3"],
+ },
+ {
+ name: "◆ Snow Rune",
+ texture: "cdc57c75adf39ec6f0e0916049dd9671e98a8a1e600104e84e645c988950bd7",
+ rarity: "common",
+ items: ["RUNE_SNOW_1", "RUNE_SNOW_2", "RUNE_SNOW_3"],
+ },
+ {
+ name: "◆ Soultwist Rune",
+ texture: "f5ffdfbd490fc7310d61a1c4c35a4e0cd2f9fccc1239c6a4bcd7dec05e25ea67",
+ rarity: "epic",
+ items: ["RUNE_SOULTWIST_1", "RUNE_SOULTWIST_2", "RUNE_SOULTWIST_3"],
+ },
+ {
+ name: "◆ Sparkling Rune",
+ texture: "f1e2428cb359988f4c4ff0e61de21385c62269de19a69762d773223b75dd1666",
+ rarity: "rare",
+ items: ["RUNE_SPARKLING_1", "RUNE_SPARKLING_2", "RUNE_SPARKLING_3"],
+ },
+ {
+ name: "◆ Spirit Rune",
+ texture: "c738b8af8d7ce1a26dc6d40180b3589403e11ef36a66d7c4590037732829542e",
+ rarity: "rare",
+ items: ["RUNE_SPIRIT_1", "RUNE_SPIRIT_2", "RUNE_SPIRIT_3"],
+ },
+ {
+ name: "◆ Tidal Rune",
+ texture: "69671047c6ade8a9c4d6a581bc26d284a54ae32e85c34ce69d81f92799bf3fbb",
+ rarity: "legendary",
+ items: ["RUNE_TIDAL_1", "RUNE_TIDAL_2", "RUNE_TIDAL_3"],
+ },
+ {
+ name: "◆ Wake Rune",
+ texture: "977c1fc93216e96d435cf962e1173de8d1a249b644894d72676eba732fcd56e7",
+ rarity: "legendary",
+ items: ["RUNE_WAKE_1", "RUNE_WAKE_2", "RUNE_WAKE_3"],
+ },
+ {
+ name: "◆ White Spiral Rune",
+ texture: "3ef2432ef305361384d4318df5bda5bd1ac2d9bea06d1f5cfead6dd87e37ddf5",
+ rarity: "uncommon",
+ items: ["RUNE_WHITE_SPIRAL_1", "RUNE_WHITE_SPIRAL_2", "RUNE_WHITE_SPIRAL_3"],
+ },
+ {
+ name: "◆ Zap Rune",
+ texture: "ed0947c40de6789f6cfa2370add2a04c9855e45fde9483d655101e9510288ee8",
+ rarity: "uncommon",
+ items: ["RUNE_ZAP_1", "RUNE_ZAP_2", "RUNE_ZAP_3"],
+ },
+ {
+ name: "◆ Pestilence Rune",
+ texture: "a8c4811395fbf7f620f05cc3175cef1515aaf775ba04a01045027f0693a90147",
+ rarity: "rare",
+ items: ["RUNE_ZOMBIE_SLAYER_1", "RUNE_ZOMBIE_SLAYER_2", "RUNE_ZOMBIE_SLAYER_3"],
+ },
+ ],
+ texture: "e91eb4ee3ecce3447483a1f151c11facc9de25577ab7b51fbf3d9c2b2a4b69fc",
+ },
+ SLAYER_SACK: {
+ items: [
+ "CRUDE_GABAGOOL",
+ "DERELICT_ASHE",
+ "NULL_ATOM",
+ "NULL_SPHERE",
+ "RAW_SOULFLOW",
+ "REVENANT_CATALYST",
+ "REVENANT_FLESH",
+ "SOULFLOW",
+ "SPIDER_CATALYST",
+ "TARANTULA_WEB",
+ "UNDEAD_CATALYST",
+ "WOLF_TOOTH",
+ ],
+ texture: "c0ccbd15d76a748e08926ef6d21dc3e54d9adec766cc25019531a493b1fd4b44",
+ },
+ SPOOKY_SACK: {
+ items: ["GREEN_CANDY", "PURPLE_CANDY", "PUMPKIN_GUTS", "ECTOPLASM", "WEREWOLF_SKIN", "SPOOKY_SHARD"],
+ texture: "12ef39437d7d43a034c5a40b974e8d2c6734a218c76485d04910f507bdc2e809",
+ },
+ WINTER_SACK: {
+ items: [
+ "ENCHANTED_ICE",
+ "ENCHANTED_PACKED_ICE",
+ "ENCHANTED_SNOW_BLOCK",
+ "GLACIAL_FRAGMENT",
+ "GREEN_GIFT",
+ "HUNK_OF_BLUE_ICE",
+ "HUNK_OF_ICE",
+ "ICE",
+ "PACKED_ICE",
+ "SNOW_BLOCK",
+ "SNOW_BALL",
+ "WALNUT",
+ "WHITE_GIFT",
+ "RED_GIFT",
+ ],
+ texture: "ab339b1cd40053defd7d3528e01fea876d41b42f9d9268461da79f5f66771236",
+ },
+ FLOWER_SACK: {
+ items: [
+ "RED_ROSE",
+ "YELLOW_FLOWER",
+ "RED_ROSE:1",
+ "RED_ROSE:2",
+ "RED_ROSE:3",
+ "RED_ROSE:4",
+ "RED_ROSE:5",
+ "RED_ROSE:6",
+ "RED_ROSE:7",
+ "RED_ROSE:8",
+ "DOUBLE_PLANT",
+ "DOUBLE_PLANT:1",
+ "DOUBLE_PLANT:4",
+ "DOUBLE_PLANT:5",
+ "ENDSTONE_ROSE",
+ "ENCHANTED_DANDELION",
+ "ENCHANTED_POPPY",
+ ],
+ texture: "afc3b5db9bd99cd12161ed2ea4623795f28e793c6dab67cd3e803ccfaaad7cfd",
+ },
+};
+
+export const BASE_SACK = {
+ Count: 1,
+ Damage: 3,
+ id: 397,
+ rarity: "epic",
+};
+
+export const ITEM_SACKS = {
+ HUNK_OF_BLUE_ICE: "BLUE_ICE_HUNK",
+ HUNK_OF_ICE: "ICE_HUNK",
+ CLAY: "CLAY_BALL",
+};
diff --git a/src/lib.js b/src/lib.js
index 974031b8dc..200b2062dd 100644
--- a/src/lib.js
+++ b/src/lib.js
@@ -11,7 +11,6 @@ import { fileURLToPath } from "url";
import util from "util";
import { v4 } from "uuid";
-import * as stats from "./stats.js";
import * as constants from "./constants.js";
import credentials from "./credentials.js";
import { getTexture } from "./custom-resources.js";
@@ -22,6 +21,7 @@ import { calculateLilyWeight } from "./weight/lily-weight.js";
import { calculateSenitherWeight } from "./weight/senither-weight.js";
import { getLeaderboardPosition } from "./helper/leaderboards.js";
import { calculateFarmingWeight } from "./weight/farming-weight.js";
+import * as stats from "./stats.js";
const mcData = minecraftData("1.8.9");
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -1028,6 +1028,9 @@ export const getItems = async (
output.hotm = hotm;
output.candy_bag = candy_bag;
+ const sacks = "sacks_counts" in profile ? await stats.getSacks(profile.sacks_counts) : [];
+ output.sacks = sacks;
+
output.bingo_card = {};
if (bingoProfile?.events !== undefined) {
const bingoRes = await helper.getBingoGoals(db);
@@ -1052,7 +1055,8 @@ export const getItems = async (
personal_vault,
wardrobe_inventory,
storage,
- hotm
+ hotm,
+ sacks
);
for (const [index, item] of allItems.entries()) {
diff --git a/src/stats.js b/src/stats.js
index f8a1ef50b0..73369b07b6 100644
--- a/src/stats.js
+++ b/src/stats.js
@@ -1 +1,2 @@
export * from "./stats/bestiary.js";
+export * from "./stats/items.js";
diff --git a/src/stats/items.js b/src/stats/items.js
new file mode 100644
index 0000000000..59947da5fb
--- /dev/null
+++ b/src/stats/items.js
@@ -0,0 +1 @@
+export * from "./items/sacks.js";
diff --git a/src/stats/items/sacks.js b/src/stats/items/sacks.js
new file mode 100644
index 0000000000..f35a2857f5
--- /dev/null
+++ b/src/stats/items/sacks.js
@@ -0,0 +1,100 @@
+import * as constants from "../../constants.js";
+import { db } from "../../mongo.js";
+import _ from "lodash";
+
+export async function getSacks(sacksCounts) {
+ try {
+ const sacks = [];
+ for (const sackId in constants.SACKS) {
+ const sack = constants.SACKS[sackId];
+
+ const sackItems = sack.items.filter((a) => {
+ const items = typeof a === "object" ? a.items : [a];
+
+ return items.some((b) => Object.keys(sacksCounts).includes(b));
+ });
+ if (sackItems.length === 0) {
+ continue;
+ }
+
+ const sackItem = Object.assign({}, constants.BASE_SACK);
+
+ sackItem.containsItems = [];
+ sackItem.texture_path = `/head/${sack.texture}`;
+ sackItem.display_name = _.startCase(sackId.toLowerCase());
+
+ if (sackId === "RUNE_SACK") {
+ for (const runeData of sack.items) {
+ const itemCount = runeData.items.map((a) => sacksCounts[a] ?? 0).reduce((a, b) => a + b, 0);
+
+ const lore = runeData.items
+ .map((a) => {
+ return [`§e${"I".repeat(runeData.items.indexOf(a) + 1)}§7: §e${(sacksCounts[a] ?? 0).toLocaleString()}`];
+ })
+ .flat();
+
+ const count = itemCount === 0 ? 1 : itemCount;
+ const sackContent = {
+ Count: count,
+ Damage: 3,
+ id: 397,
+ itemIndex: sackItem.containsItems.length,
+ display_name: runeData.name,
+ rarity: runeData.rarity,
+ texture_path: `/head/${runeData.texture}`,
+ tag: {
+ display: {
+ Name: `§a${runeData.name}`,
+ Lore: lore,
+ },
+ },
+ categories: [],
+ };
+
+ sackItem.containsItems.push(sackContent);
+ }
+ } else {
+ for (const item of sack.items) {
+ const hypixelItem = await db.collection("items").findOne({ id: constants.ITEM_SACKS[item] ?? item });
+ if (hypixelItem === null) {
+ continue;
+ }
+
+ const itemName = hypixelItem.name ?? _.startCase(item.toLowerCase());
+ const count = sacksCounts[item] === 0 ? 1 : sacksCounts[item];
+ const sackContent = {
+ Count: count ?? 1,
+ Damage: hypixelItem.damage ?? 3,
+ id: hypixelItem.item_id ?? 397,
+ itemIndex: sackItem.containsItems.length,
+ display_name: itemName,
+ tag: {
+ display: {
+ Name: `§a${itemName}`,
+ Lore: [`§8Stored: §e${(sacksCounts[item] ?? 0).toLocaleString()}`],
+ },
+ },
+ categories: [],
+ };
+
+ if (hypixelItem.glowing === true) {
+ sackContent.tag.ench = [];
+ }
+
+ if (sackContent.id == 397 && hypixelItem.texture) {
+ sackContent.texture_path = `/head/${hypixelItem.texture}`;
+ }
+
+ sackItem.containsItems.push(sackContent);
+ }
+ }
+
+ sacks.push(sackItem);
+ }
+
+ return sacks;
+ } catch (error) {
+ console.log(error);
+ return null;
+ }
+}
diff --git a/views/stats.ejs b/views/stats.ejs
index ed9042a0ce..4377559ce6 100644
--- a/views/stats.ejs
+++ b/views/stats.ejs
@@ -1420,13 +1420,18 @@ const metaDescription = getMetaDescription()
<% } %>
-
<% if(items.quiver.length > 0){ %>
<% } %>
+ <% if(items.sacks.length > 0){ %>
+
+ <% } %>