Loot Table¶
文档版本:1.21.50.25
A minecraft loot table.
架构¶
loot_tables:
{
array "pools" : opt
{
object "<any array element>" : opt
{
integer "rolls" : opt
object "rolls" : opt
{
number "min" : opt
number "max" : opt
}
string "type" : opt
array "conditions" : opt
{
conditions "<any array element>"
}
array "entries" : opt
{
object "<any array element>" : opt
{
string "type" : opt
integer "count" : opt
string "name" : opt
integer "weight" : opt
array "functions" : opt
{
Functions "<any array element>"
}
array "pools" : opt
integer "quality" : opt
}
}
object "tiers" : opt
{
number "bonus_chance" : opt
integer "bonus_rolls" : opt
integer "initial_range" : opt
}
integer "bonus_rolls" : opt
}
}
string "type" : opt
}
pools:array- A collection of items where the system will choice one or more from.
pools<any array element>:object
<any array element>rolls:integer- Determines how many items, will be selected.
rolls:object- Determines how many items, will be selected.
rollsmin:number- The minimum amount.
max:number- The maximum amount.
type:string- Whenever this pool item is an item or another table.
conditions:array- Possible conditions that need to have been met before selecting this item.
conditions<any array element>:conditions
entity_properties:
{
string "condition" : opt
string "entity" : opt
object "properties" : opt
{
boolean "on_fire" : opt
boolean "on_ground" : opt
}
}
condition:string- Returns true if the actor properties defined were executed.
entity:string- The entity to test. The value must be only
this.
properties:object- The entity's properties.
on_fire,on_groundis used for now.
propertieson_fire:boolean- Checks if the entity is on fire or not.
on_ground:boolean- Checks if the entity is on the ground or not.
condition:string- Returns the condition true if the actor's mark variant is matched to the value.
value:integer- Tests for the actor's mark variant (if it has one).
condition:string- UNDOCUMENTED.
condition:string- UNDOCUMENTED.
condition:string- UNDOCUMENTED.
entity_type:string- The entity type to match
condition:string- UNDOCUMENTED.
chance:number- UNDOCUMENTED.
max_chance:number- The maximum random chance value allowed.
random_chance_with_looting:
{
string "condition" : opt
number "chance" : opt
number "looting_multiplier" : opt
}
condition:string- UNDOCUMENTED.
chance:number- The random chance of the value.
looting_multiplier:number- The multiplier for the chance if the target entity has the looting enchant that affects the actor.
random_difficulty_chance:
{
string "condition" : opt
number "default_chance" : opt
number "easy" : opt
number "hard" : opt
number "normal" : opt
number "peaceful" : opt
}
condition:string- UNDOCUMENTED.
default_chance:number- The default random chance if the level difficulty is not assigned.
easy:number- The default random chance if the level difficulty is in easy. Omitting this field will set the value to
default_chancefield.
hard:number- The default random chance if the level difficulty is in hard. Omitting this field will set the value to
default_chancefield.
normal:number- The default random chance if the level difficulty is in normal. Omitting this field will set the value to
default_chancefield.
peaceful:number- The default random chance if the level difficulty is in peaceful. Omitting this field will set the value to
default_chancefield.
random_regional_difficulty_chance:
{
string "condition" : opt
number "default_chance" : opt
number "max_chance" : opt
number "easy" : opt
number "hard" : opt
number "normal" : opt
number "peaceful" : opt
}
condition:string- UNDOCUMENTED.
default_chance:number- The default random chance if the level difficulty is not assigned.
max_chance:number- UNDOCUMENTED.
easy:number- The default random chance if the level difficulty is in easy. Omitting this field will set the value to
default_chancefield.
hard:number- The default random chance if the level difficulty is in hard. Omitting this field will set the value to
default_chancefield.
normal:number- The default random chance if the level difficulty is in normal. Omitting this field will set the value to
default_chancefield.
peaceful:number- The default random chance if the level difficulty is in peaceful. Omitting this field will set the value to
default_chancefield.
entries:array- The items specifiation of this pool.
entries<any array element>:object- UNDOCUMENTED.
<any array element>type:string- UNDOCUMENTED.
count:integer- The amount of the item.
name:string- An item or loottable.
weight:integer- UNDOCUMENTED.
functions:array- UNDOCUMENTED.
functions<any array element>:Functions- UNDOCUMENTED.
function:string- UNDOCUMENTED.
chance:number- Takes a chance modifier to manipulate the algorithm. Note that a chance modifier of 1.0 doesn't mean a 100% chance that gear will become enchanted.
enchant_book_for_trading:
{
string "function" : opt
integer "base_cost" : opt
integer "base_random_cost" : opt
integer "per_level_random_cost" : opt
integer "per_level_cost" : opt
}
function:string- UNDOCUMENTED.
base_cost:integer- UNDOCUMENTED.
base_random_cost:integer- UNDOCUMENTED.
per_level_random_cost:integer- UNDOCUMENTED.
per_level_cost:integer- UNDOCUMENTED.
function:string- UNDOCUMENTED.
treasure:boolean- Supports the optional treasure boolean (true/false) to allow treasure enchantments to be toggled on and off.
enchant_with_levels:
{
string "function" : opt
integer "levels" : opt
object "levels" : opt
{
integer "min" : opt
integer "max" : opt
}
boolean "treasure" : opt
}
function:string- UNDOCUMENTED.
levels:integer- UNDOCUMENTED.
levels:object- UNDOCUMENTED.
levelsmin:integer
max:integer
treasure:boolean- UNDOCUMENTED.
function:string- Transforms a normal map into a treasure map that marks the location of hidden treasure.
destination:string- The destination value defines what type of treasure map they receive.
function:string- UNDOCUMENTED.
loot_table:string- UNDOCUMENTED.
furnace_smelt:
{
string "function" : opt
array "conditions" : opt
{
conditions "<any array element>"
}
}
function:string- UNDOCUMENTED.
conditions:array- UNDOCUMENTED.
conditions<any array element>:conditions
looting_enchant:
{
string "function" : opt
object "count" : opt
{
integer "min" : opt
integer "max" : opt
}
}
function:string- UNDOCUMENTED.
count:object- UNDOCUMENTED.
countmin:integer
max:integer
random_aux_value:
{
string "function" : opt
object "values" : opt
{
integer "min" : opt
integer "max" : opt
}
}
function:string- UNDOCUMENTED.
values:object- UNDOCUMENTED.
valuesmin:integer- UNDOCUMENTED.
max:integer- UNDOCUMENTED.
random_block_state:
{
string "function" : opt
string "block_state" : opt
object "values" : opt
{
integer "min" : opt
integer "max" : opt
}
}
function:string- UNDOCUMENTED.
block_state:string- UNDOCUMENTED.
values:object- UNDOCUMENTED.
valuesmin:integer
max:integer
function:string- UNDOCUMENTED.
id:string- UNDOCUMENTED.
function:string- UNDOCUMENTED.
type:integer- UNDOCUMENTED.
set_book_contents:
{
string "function" : opt
string "author" : opt
string "title" : opt
array "pages" : opt
{
string "<any array element>" : opt
}
}
function:string- UNDOCUMENTED.
author:string- UNDOCUMENTED.
title:string- UNDOCUMENTED.
pages:array- UNDOCUMENTED.
pages<any array element>:string
set_count:
{
boolean "add" : opt
string "function" : opt
integer "count" : opt
object "count" : opt
{
integer "min" : opt
integer "max" : opt
}
}
add:boolean- UNDOCUMENTED.
function:string- UNDOCUMENTED.
count:integer- UNDOCUMENTED.
count:object- UNDOCUMENTED.
countmin:integer
max:integer
set_damage:
{
boolean "add" : opt
string "function" : opt
number "damage" : opt
object "damage" : opt
{
number "min" : opt
number "max" : opt
}
}
add:boolean- UNDOCUMENTED.
function:string- UNDOCUMENTED.
damage:number- UNDOCUMENTED.
damage:object- UNDOCUMENTED.
damagemin:number- UNDOCUMENTED.
max:number- UNDOCUMENTED.
set_data:
{
string "function" : opt
integer "data" : opt
object "data" : opt
{
integer "min" : opt
integer "max" : opt
}
}
function:string- UNDOCUMENTED.
data:integer- UNDOCUMENTED.
data:object- UNDOCUMENTED.
datamin:integer- UNDOCUMENTED.
max:integer- UNDOCUMENTED.
function:string- UNDOCUMENTED.
function:string- UNDOCUMENTED.
function:string- UNDOCUMENTED.
function:string- UNDOCUMENTED.
lore:array- UNDOCUMENTED.
lore<any array element>:string
function:string- UNDOCUMENTED.
name:string- UNDOCUMENTED.
function:string- This function sets the potion type of compatible items with a potion id..
id:string- ID of the potion to set.
specific_enchants:
{
string "function" : opt
string "enchants" : opt
object "enchants" : opt
{
string "id" : opt
integer "level" : opt
array "level" : opt
{
integer "0..0" : opt
integer "1..1" : opt
}
}
array "enchants" : opt
{
object "<any array element>" : opt
{
}
}
}
function:string- Specific enchants.
enchants:string- A enchanting specification.
enchants:object- A enchanting specification.
enchantsid:string
level:integer
level:array
level0..0:integer
1..1:integer
enchants:array- A enchanting specification.
enchants<any array element>:object
<any array element>pools:array- A collection of items where the system will choice one or more from.
poolsquality:integer- UNDOCUMENTED.
tiers:object- UNDOCUMENTED.
tiersbonus_chance:number- UNDOCUMENTED.
bonus_rolls:integer- UNDOCUMENTED.
initial_range:integer- UNDOCUMENTED.
bonus_rolls:integer- UNDOCUMENTED.
type:string- UNDOCUMENTED.