
Random Card Rewards - Card-Based Reward System
The Random Card Rewards modification introduces a unique card-based reward system into Minecraft that allows players to receive various bonuses through random card selection from customizable pools.
🎯 Main Features
Interactive Reward System
Players can open a special card selection interface using the command /randomcardrewards rewards\ <>_
.
To view all available card pools, use the command /randomcardrewards list_pools
.
Complete Configurability
All cards and their pools are defined through JSON files in the data/randomcardrewards/recipes
directory. The system supports instant configuration updates via the /reload
command and data synchronization on the client using Minecraft's standard recipe system.
Variety of Card Types
- Effects - receiving temporary buffs (e.g., strength, speed)
- Items - various items with customizable quantities
- Commands - execution of any game commands
- Blank cards - cards without rewards
⚙️ Application for Modpacks
KubeJS Integration
The modification provides the ability to dynamically create card pools and reward players through KubeJS scripts:
// Creation and distribution of temporary card pool
const poolid = RandomCardRewardsAPI.createTmpCardPoolFromPoolRandomly("nether_pool", 5);
RandomCardRewardsAPI.rewardPlayerTmpPool(player, poolid, true); // Automatic pool removal after use
Event System
Developers can use events for logic customization:
RCREvents.cardInvokePre
- cancellation of card activationRCREvents.cardInvokePost
- execution of actions after card use
📋 Configuration Examples
Adding an Effect Card
{
"type": "randomcardrewards:card",
"content": {
"type": "effect", // type: effect/item/command/none
"content": "minecraft:strength", // effect/item ID or command
"i1": 10, // amplifier (for effects) or item count
"i2": 1000 // duration (in ticks)
},
"id": "yourmod:fire_resistance",
"meta": {
"nameKey": "card.fire_resistance.name", // localization key for name
"descriptionKey": "card.fire_resistance.desc", // localization key for description
"texture": "yourmod:textures/cards/fire_resistance.png" // card texture
}
}
Creating a Card Pool
{
"type": "randomcardrewards:card_pool",
"id": "yourmod:nether_pool",
"pool": [
"yourmod:fire_resistance",
"yourmod:blaze_powder",
"yourmod:ghast_tear"
]
}
🎯 Application Areas
Perfect system for:
- Custom minigames 🎮
- RPG quest rewards 🏆
- Server events 🎉
- Progression systems in modpacks ⚙️
Requires: Forge