-
Notifications
You must be signed in to change notification settings - Fork 68
New Loot Functions
DaFuqs edited this page Oct 21, 2024
·
4 revisions
Spectrum adds new loot functions that can be used in loot tables to add data to the generated items.
Colors a dyeable item, like leather armor, in a specific or random color.
Entry | Type | Default | Description |
---|---|---|---|
colors (optional) | list of ints OR list of hex-strings | A random color will be chosen from the list and used as coloring for the item. If not set a random color will be generated. |
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:leather_boots"
},
{
"type": "minecraft:item",
"name": "minecraft:leather_chestplate"
},
{
"type": "minecraft:item",
"name": "minecraft:leather_helmet"
},
{
"type": "minecraft:item",
"name": "minecraft:leather_leggings"
}
],
"functions": [
{
"function": "spectrum:dye_randomly",
"colors": [
"#5cffed",
"#eb40f0",
"#eded17",
"#0a0a0a",
"#edf2fa",
"#e76100",
"#3b0338",
"#ffc7de",
"#d91a0a",
"#b0c7ff",
"#526b0f",
"#3d4fc2",
"#802bc4",
"#70400d",
"#adadad",
"#424242"
]
}
]
}
For fermentable items, like Infused Beverages, applies fermentation to it, simulating it having aged a set of minecraft-days.
Entry | Type | Description |
---|---|---|
days_fermented | float provider | The duration used for the fermentation calculation in minecraft days |
thickness | float provider | the thickness used for the fermentation calculation |
downfall | float provider | the downfall used for the fermentation calculation |
fermentation_recipe_id | identifier of a titration recipe | the identifier of a valid Titration Recipe to pull titration data from (so you don't have to duplicate the values) |
fermentation_data | fermentation data | Fermentation Data |
{
"type": "minecraft:item",
"name": "spectrum:infused_beverage",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "{Variant: \"gin\", Color: 16437201 }"
},
{
"function": "spectrum:ferment_randomly",
"fermentation_recipe_id": "spectrum:titration_barrel/infused_beverages/gin",
"days_fermented": {
"min": 6000,
"max": 8000
},
"thickness": 1.0,
"downfall": 1.0
}
]
}
Similar to minecraft:set_nbt
, but instead setting it to a fixed value, pulls a random nbt tag from a list.
Entry | Type | Description |
---|---|---|
tags | list of strings | one of these entries will be chosen at random and added as nbt for the item |
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:dirt"
}
],
"functions": [
{
"function": "spectrum:merge_nbt_randomly",
"tags": [
"{display:{Name:'{\"translate\":\"named_item.spectrum.dirt_of_shame\"}'}}",
"{display:{Name:'{\"translate\":\"named_item.spectrum.dirt_of_fame\"}'}}",
"{display:{Name:'{\"translate\":\"named_item.spectrum.dirt_of_lame\"}'}}",
]
},
]
}
Used to set the effects for an item that can be filled with potion effects in the Potion Workshop.
Entry | Type | Description |
---|---|---|
status_effect | status effect id OR list of status effect ids | The status effect that the item get's filled with. When using a list, a random one will get chosen. |
amplifier | int provider | the effects amplifier (level 1 ^= potency 0) |
duration | int provider | the effects duration |
color | ink color id (default: the effects color) | the color for the effect |
ambient | boolean (default: false) | if less intrusive particle effects should spawn |
show_particles | boolean (default: false) | if no particle effects should spawn |
ink_color | one of the 16 minecraft colors OR list of the 16 minecraft colors | the ink color required to pay for granting the effect |
ink_cost | int provider | the amount of ink required to pay for granting the effect |
Example: Gives a Lesser Potion Pendant with one of 3 status effects, requiring one of 3 colors of ink for providing its effect.
{
"type": "minecraft:item",
"name": "spectrum:lesser_potion_pendant",
"functions": [
{
"function": "spectrum:fill_potion_fillable",
"ambient": true,
"show_particles": false,
"duration": 3600,
"status_effect": [
"minecraft:strength",
"minecraft:speed",
"minecraft:haste"
],
"color": -1,
"amplifier": 2,
"ink_color": [
"spectrum:red",
"spectrum:green",
"spectrum:blue"
],
"ink_cost": 4
}
]
}
General
For Players
- Getting Started
- Mixing Colors
- Stuck on how to progress?
- Main Progression Steps (MAJOR SPOILERS)
For Server Admins / Modpack Creators
- Integrating into Modpacks
- Adjusting Progression
- Advancement Criteria
- 1.7.x: Patchouli Pages
- 1.7.x: Patchouli Recipe Pages
- 1.8.x: Modonomicon Pages
- 1.8.x: Modonomicon Recipe Pages
- Commands
- Type Specific Predicates
- JsonNBT
For Map Makers
Recipe Types
- Custom Pigment Pedestal Recipes
- Custom Anvil Crushing Recipes
- Custom Fusion Shrine Recipes
- Custom Enchanter Recipes
- Custom Enchantment Upgrade Recipes
- Custom Potion Workshop Brewing Recipes
- Custom Potion Workshop Crafting Recipes
- Custom Potion Workshop Reagents
- Custom Spirit Instiller Recipes
- Custom Liquid Dipping Recipes
- Custom Ink Converting Recipes
- Custom Crystallarieum Recipes
- Custom Cinderhearth Recipes
- Custom Titration Barrel Recipes
- Fluid Ingredients
Loot Tables
More Customisation
- Adding Nature's Staff Conversions
- Adding Entity Fishing Entries
- Adding Resonance Drops
- Adding Crystal Apothecary Harvestables
- Adding Particle Spawner Particles
For Contributors