promotional bannermobile promotional banner

CS:2 LootBox

A configurable CS2-inspired lootbox system for Minecraft modpacks using KubeJS.
video thumbnail
item image
item image
item image
item image
item image
affiliate banner image

Description

CS2 Lootbox is a Forge mod for Minecraft 1.20.1 made for modpack creators who want a configurable CS2-inspired case opening system powered by KubeJS.

Create custom cases and matching keys, build weighted loot tables, configure CS-style rarity tiers, add legendary rewards and StatTrak-style modifiers, and give every case its own 3D model, textures, animations, sounds, and presentation.

Features

  • CS2-inspired case opening interface.
  • Animated 3D cases using GeckoLib and GeckoMesh.
  • Roulette-style item carousel with rarity-colored cards and glow effects.
  • Prize reveal and result screen.
  • Left-click normal rewards to open a 3D item inspection view.
  • Drag to rotate inspected items and scroll to zoom.
  • Matching case + key system.
  • Server-authoritative reward rolls.
  • Weighted loot tables with configurable item counts.
  • Custom reward names, descriptions, NBT, rarity names, and colors.
  • CS-style rarity tiers including Consumer, Industrial, Mil-Spec, Restricted, Classified, Covert, and Special.
  • Legendary / rare-special-item rolls.
  • Optional second carousel for legendary sub-loot.
  • StatTrak-style reward modifiers with persistent kill counters.
  • Custom case sounds and UI textures.
  • Responsive UI scaling for different GUI sizes and resolutions.
  • Create completely new cases or modify existing ones through KubeJS.
  • Client and server configuration options for visuals, sounds, StatTrak, and case opening.

KubeJS

Cases are configured during KubeJS startup using:

CS2LootboxEvents.register(event => {
    // Register or modify cases here.
})

Put your scripts in:

kubejs/startup_scripts/

Case definitions are registered during startup, so changing them requires a full game restart. /reload is not enough.

Example

CS2LootboxEvents.register(event => {
    event.addCrate('kubejs:my_case', crate => {
        crate.model('kubejs:geo/my_case.geo.json')
        crate.texture('kubejs:textures/lootbox/my_case.png')
        crate.animation('kubejs:animations/my_case.animation.json')
        crate.keyTexture('kubejs:item/my_case_key')

        crate.loot('minecraft:iron_ingot', 70)
        crate.loot('minecraft:diamond', 30)

        crate.legendary(0.26)
            .subLoot()
                .add('minecraft:netherite_ingot', 80)
                .add('minecraft:nether_star', 20)
    })
})

This automatically registers a matching case and key:

kubejs:my_case_case
kubejs:my_case_key

You can also use changeCase(...) to edit an already registered case instead of creating a new one.

Custom Loot

Normal rewards support:

  • Weighted drop chances.
  • Fixed or ranged stack counts.
  • Custom display names.
  • Custom descriptions.
  • Custom NBT data.
  • Item tags.
  • Custom rarity names and colors.
  • Built-in CS-style rarity tiers.
  • StatTrak-style modifiers.

Weights inside the normal loot pool are automatically normalized against the total enabled normal-loot weight.

Legendary Rewards

Cases can define one or more legendary reward groups for rare-special-item drops.

Legendary rewards can have their own:

  • Absolute first-stage chance.
  • Display name and tooltip.
  • Foreground texture.
  • Weighted sub-loot table.
  • Optional dedicated legendary carousel.

The secondary legendary carousel can also be disabled, allowing the final legendary reward to be revealed immediately after the main carousel.

StatTrak

Loot entries can optionally roll a StatTrak-style modifier.

StatTrak items store a persistent kill counter directly on the awarded ItemStack and can display the current kill count below the item's name.

Server configuration can independently control:

  • Whether new StatTrak modifiers can roll.
  • Whether existing StatTrak items can increase their kill counter.

Configuration

CS2 Lootbox provides separate client, common, and server configuration files.

Client options include:

  • Case-content tooltips.
  • 3D item inspection.
  • Rarity glow effects.
  • UI sounds.
  • Carousel tick sounds.
  • StatTrak kill-count display.

Server options include:

  • Enable or disable case opening.
  • Enable or disable StatTrak rolls.
  • Enable or disable StatTrak kill counting.

Required Dependencies

  • Minecraft Forge 47+
  • KubeJS 2001.6.5-build.16+
  • GeckoLib 4.8.4+
  • GeckoMesh 1.0.0+
  • LDLib 1.0.52.a+

CS2 Lootbox is designed for modpacks that want the excitement and presentation of a CS-style case system while keeping the actual contents, probabilities, models, rarities, and behavior fully configurable through KubeJS.

CS2 Lootbox is a fan-made Minecraft mod inspired by the presentation of Counter-Strike-style case openings and is not affiliated with or endorsed by Valve.

The CS:2 LootBox Team

Forgeborn tier frameprofile avatar
Owner
Forgeborn tier icon
  • 7
    Projects
  • 194.2K
    Downloads

More from TokyoSUView all