
Overview
Random Card Rewards is a versatile Minecraft mod that adds a card-based reward system. Players can draw random cards from customizable pools to receive effects, items, or execute commands. Entirely data-driven and reload-friendly, it integrates seamlessly with datapacks and KubeJS.
Interactive Card Selection
/randomcardrewards rewards <pool> <count> <player> /randomcardrewards list_pools Fully Data-Driven
data/randomcardrewards/recipes. /reload for instant updates. Customizable Card Types
For Modpack Creators
CardInvokeEvent.Pre/Post to customize logic. RCRRecipeProvider.java. 1. Add a Card
{
"type": "randomcardrewards:card",
"content": {
"type": "effect", // effect/item/command/none
"content": "minecraft:strength", // Effect/Item ID or command
"i1": 10, // Amplifier (effect) or item count
"i2": 1000 // Duration (ticks)
},
"id": "yourmod:fire_resistance",
"meta": {
"nameKey": "card.fire_resistance.name", // Localization key
"descriptionKey": "card.fire_resistance.desc",
"texture": "yourmod:textures/cards/fire_resistance.png"
}
}
2. Create a Card Pool
{
"type": "randomcardrewards:card_pool",
"id": "yourmod:nether_pool",
"pool": [
"yourmod:fire_resistance",
"yourmod:blaze_powder",
"yourmod:ghast_tear"
]
}
Dynamically reward players:
// Create & reward a temporary card pool
const poolid = RandomCardRewardsAPI.createTmpCardPoolFromPoolRandomly("nether_pool", 5);
RandomCardRewardsAPI.rewardPlayerTmpPool(player, poolid, true); // Auto-remove pool after use
RCREvents.cardInvokePre: Cancel before a card activates. RCREvents.cardInvokePost: Trigger actions after card use.RCRCard) and the player. Data Structure
Cards include:
id (ResourceLocation) nameKey, descriptionKey) texture path content (type, effect/item/command, and parameters i1/i2) Perfect For
GitHub Source | Requires Forge
Allow using in modpacks.