跳转至

Loot Table

文档版本:1.21.0.24

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
}
poolsarray
A collection of items where the system will choice one or more from.
pools
<any array element>object
<any array element>
rollsinteger
Determines how many items, will be selected.
rollsobject
Determines how many items, will be selected.
rolls
minnumber
The minimum amount.
maxnumber
The maximum amount.
typestring
Whenever this pool item is an item or another table.
conditionsarray
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
  }
}
conditionstring
Returns true if the actor properties defined were executed.
entitystring
The entity to test. The value must be only this.
propertiesobject
The entity's properties. on_fire, on_ground is used for now.
properties
on_fireboolean
Checks if the entity is on fire or not.
on_groundboolean
Checks if the entity is on the ground or not.
has_mark_variant:
{
  string "condition" : opt
  integer "value" : opt
}
conditionstring
Returns the condition true if the actor's mark variant is matched to the value.
valueinteger
Tests for the actor's mark variant (if it has one).
killed_by_player:
{
  string "condition" : opt
}
conditionstring
UNDOCUMENTED.
killed_by_player_or_pets:
{
  string "condition" : opt
}
conditionstring
UNDOCUMENTED.
random_chance:
{
  string "condition" : opt
  number "chance" : opt
  number "max_chance" : opt
}
conditionstring
UNDOCUMENTED.
chancenumber
UNDOCUMENTED.
max_chancenumber
The maximum random chance value allowed.
random_chance_with_looting:
{
  string "condition" : opt
  number "chance" : opt
  number "looting_multiplier" : opt
}
conditionstring
UNDOCUMENTED.
chancenumber
The random chance of the value.
looting_multipliernumber
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
}
conditionstring
UNDOCUMENTED.
default_chancenumber
The default random chance if the level difficulty is not assigned.
easynumber
The default random chance if the level difficulty is in easy. Omitting this field will set the value to default_chance field.
hardnumber
The default random chance if the level difficulty is in hard. Omitting this field will set the value to default_chance field.
normalnumber
The default random chance if the level difficulty is in normal. Omitting this field will set the value to default_chance field.
peacefulnumber
The default random chance if the level difficulty is in peaceful. Omitting this field will set the value to default_chance field.
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
}
conditionstring
UNDOCUMENTED.
default_chancenumber
The default random chance if the level difficulty is not assigned.
max_chancenumber
UNDOCUMENTED.
easynumber
The default random chance if the level difficulty is in easy. Omitting this field will set the value to default_chance field.
hardnumber
The default random chance if the level difficulty is in hard. Omitting this field will set the value to default_chance field.
normalnumber
The default random chance if the level difficulty is in normal. Omitting this field will set the value to default_chance field.
peacefulnumber
The default random chance if the level difficulty is in peaceful. Omitting this field will set the value to default_chance field.
entriesarray
The items specifiation of this pool.
entries
<any array element>object
UNDOCUMENTED.
<any array element>
typestring
UNDOCUMENTED.
countinteger
The amount of the item.
namestring
An item or loottable.
weightinteger
UNDOCUMENTED.
functionsarray
UNDOCUMENTED.
functions
<any array element>Functions
UNDOCUMENTED.
enchant_random_gear:
{
  string "function" : opt
  number "chance" : opt
}
functionstring
UNDOCUMENTED.
chancenumber
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
}
functionstring
UNDOCUMENTED.
base_costinteger
UNDOCUMENTED.
base_random_costinteger
UNDOCUMENTED.
per_level_random_costinteger
UNDOCUMENTED.
per_level_costinteger
UNDOCUMENTED.
enchant_randomly:
{
  string "function" : opt
  boolean "treasure" : opt
}
functionstring
UNDOCUMENTED.
treasureboolean
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
}
functionstring
UNDOCUMENTED.
levelsinteger
UNDOCUMENTED.
levelsobject
UNDOCUMENTED.
levels
mininteger
maxinteger
treasureboolean
UNDOCUMENTED.
exploration_map:
{
  string "function" : opt
  string "destination" : opt
}
functionstring
Transforms a normal map into a treasure map that marks the location of hidden treasure.
destinationstring
The destination value defines what type of treasure map they receive.
fill_container:
{
  string "function" : opt
  string "loot_table" : opt
}
functionstring
UNDOCUMENTED.
loot_tablestring
UNDOCUMENTED.
furnace_smelt:
{
  string "function" : opt
  array "conditions" : opt
  {
    conditions "<any array element>"
  }
}
functionstring
UNDOCUMENTED.
conditionsarray
UNDOCUMENTED.
conditions
<any array element>conditions
looting_enchant:
{
  string "function" : opt
  object "count" : opt
  {
    integer "min" : opt
    integer "max" : opt
  }
}
functionstring
UNDOCUMENTED.
countobject
UNDOCUMENTED.
count
mininteger
maxinteger
random_aux_value:
{
  string "function" : opt
  object "values" : opt
  {
    integer "min" : opt
    integer "max" : opt
  }
}
functionstring
UNDOCUMENTED.
valuesobject
UNDOCUMENTED.
values
mininteger
UNDOCUMENTED.
maxinteger
UNDOCUMENTED.
random_block_state:
{
  string "function" : opt
  string "block_state" : opt
  object "values" : opt
  {
    integer "min" : opt
    integer "max" : opt
  }
}
functionstring
UNDOCUMENTED.
block_statestring
UNDOCUMENTED.
valuesobject
UNDOCUMENTED.
values
mininteger
maxinteger
set_actor_id:
{
  string "function" : opt
  string "id" : opt
}
functionstring
UNDOCUMENTED.
idstring
UNDOCUMENTED.
set_banner_details:
{
  string "function" : opt
  integer "type" : opt
}
functionstring
UNDOCUMENTED.
typeinteger
UNDOCUMENTED.
set_book_contents:
{
  string "function" : opt
  string "author" : opt
  string "title" : opt
  array "pages" : opt
  {
    string "<any array element>" : opt
  }
}
functionstring
UNDOCUMENTED.
authorstring
UNDOCUMENTED.
titlestring
UNDOCUMENTED.
pagesarray
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
  }
}
addboolean
UNDOCUMENTED.
functionstring
UNDOCUMENTED.
countinteger
UNDOCUMENTED.
countobject
UNDOCUMENTED.
count
mininteger
maxinteger
set_damage:
{
  boolean "add" : opt
  string "function" : opt
  number "damage" : opt
  object "damage" : opt
  {
    number "min" : opt
    number "max" : opt
  }
}
addboolean
UNDOCUMENTED.
functionstring
UNDOCUMENTED.
damagenumber
UNDOCUMENTED.
damageobject
UNDOCUMENTED.
damage
minnumber
UNDOCUMENTED.
maxnumber
UNDOCUMENTED.
set_data:
{
  string "function" : opt
  integer "data" : opt
  object "data" : opt
  {
    integer "min" : opt
    integer "max" : opt
  }
}
functionstring
UNDOCUMENTED.
datainteger
UNDOCUMENTED.
dataobject
UNDOCUMENTED.
data
mininteger
UNDOCUMENTED.
maxinteger
UNDOCUMENTED.
set_data_from_color_index:
{
  string "function" : opt
}
functionstring
UNDOCUMENTED.
trader_material_type:
{
  string "function" : opt
}
functionstring
UNDOCUMENTED.
random_dye:
{
  string "function" : opt
}
functionstring
UNDOCUMENTED.
set_lore:
{
  string "function" : opt
  array "lore" : opt
  {
    string "<any array element>" : opt
  }
}
functionstring
UNDOCUMENTED.
lorearray
UNDOCUMENTED.
lore
<any array element>string
set_name:
{
  string "function" : opt
  string "name" : opt
}
functionstring
UNDOCUMENTED.
namestring
UNDOCUMENTED.
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
    {
    }
  }
}
functionstring
Specific enchants.
enchantsstring
A enchanting specification.
enchantsobject
A enchanting specification.
enchants
idstring
levelinteger
levelarray
level
0..0integer
1..1integer
enchantsarray
A enchanting specification.
enchants
<any array element>object
<any array element>
poolsarray
A collection of items where the system will choice one or more from.
pools
qualityinteger
UNDOCUMENTED.
tiersobject
UNDOCUMENTED.
tiers
bonus_chancenumber
UNDOCUMENTED.
bonus_rollsinteger
UNDOCUMENTED.
initial_rangeinteger
UNDOCUMENTED.
bonus_rollsinteger
UNDOCUMENTED.
typestring
UNDOCUMENTED.