Skip to content

Configuration parameters

Zarius edited this page Aug 13, 2011 · 2 revisions

The syntax of the files (note: all parameters are optional, see default values below) is as follows:

otherblocks:

     NAME_OF_ORIGINAL_BLOCK:
     - xxxx: xxx
       xxxx: xxx

     - tool: xxx
       drop: xxx
     
     - drop: xxx (...and so on...)

    NAME_OF_ORIGINAL_BLOCK@DATA_VALUE:
    - tool: (...and so on...)


# Conditions:
       toolexcept: xxx
       color: xxx
       quantity: xxx
       chance: xxx
       worlds: xxx
       weather: xxx
       biomes: xxx
       time: xxx
       height: xxx
       permissions: xxx
       permissiongroups: xxx
       exclusive: xxx
       attackrange: xxx
       regions: xxx
       lightlevel: xxx

# Actions
       drop: xxx
       damagetool: xxx
       damageattacker: xxx
       event: xxx
       message: xxx
       delay: xxx
       replacementblock: xxx
       dropspread: xxx

Here are the definitions of what each part of this template does:

  • NAME_OF_ORIGINAL_ITEM: this is the block or entity for which you want to change the materials dropped. This can be any block or any creature from the Material and Creature Values list.

  • NAME_OF_ORIGINAL_BLOCK@DATA_VALUE: this is how you specify an optional "data value" to match for the block type. There are three different ways you can specify the data value:

    • You can use a named data type as listed in the Color and Data Values page, e.g. WOOL@RED or LEAVES@BIRCH
    • You can use a number that corresponds to the internal data values that Minecraft recognizes as listed on http://www.minecraftwiki.net/wiki/Data_values, e.g. WOOL@9 for cyan wool
    • You can specify a range of numerical values with the syntax @RANGE-x-y, e.g. for all crops except fully grown, use CROPS@RANGE-0-6
  • tool: (default: ANY) is the weapon that must be used. It can be pretty much any value from the Material and Creature Values page. Note: tool has no meaning for a SPECIAL event.

    • If any tool is acceptable, use the value ANY
    • If you want the player to use an empty hand, set the value to AIR
    • If you want to specify multiple different tools, use the list syntax, e.g. [ANY_SWORD, DIAMOND_SPADE]
    • If the original block is a creature, you can set what it drops if killed by another creature (e.g. CREATURE_SKELETON) or by another means (e.g. DAMAGE_FIRE)
  • toolexcept: specify a list of tools that should not trigger this drop.

  • drop: is what block you want to be dropped. It can be any block, item or creature. Defaults to DEFAULT if not specified.

    • Supports data/color values - eg. WOOL@RED, CREATURE_CREEPER@POWERED
  • world: specifies which worlds this applies to. By default drops occur in all worlds.

    • You can also use the list syntax to specify multiple worlds, e.g. [worlda, worldb]
  • color: lets you set the data value of the dropped item. See the Color and Data Values page.

  • quantity: (default: 1) lets you set how many items you want to be dropped.

    • You can also set a range of values for a randomized quantity, e.g. quantity: 3-5_
  • damagetool: (default: 1) lets you set how much damage the event does to the tool you are holding.

    • For tools and armour this reduces the durability.
    • For other items this will remove one item from the stack you are holding.
  • damageattacker: (default: 0) deals damage to the player/attacker when a block if broken or creature killed.

  • chance: (default: 100%) lets you set a probability for the drop to occur as a percentage. You can also set values less than 1%, e.g 0.001 for a tenth of a percent.

    • Percentage sign is optional (eg. can be 50% or just 50).
  • event: optional special events that will occur if this drop is triggered. Events are:

    • LIGHTNING (and LIGHTNING@HARMLESS)
    • LIGHTNING@PLAYER - strikes the player (if delayed this will still hit the player)
    • LIGHTNING@PLAYERLOCATION - strikes the player (if delayed this will occur where the player was standing)
    • EXPLOSION
    • TREE (also treetypes: TREE@BIG_TREE, TREE@BIRCH, TREE@REDWOOD, TREE@TALL_REDWOOD)
    • FORCETREE (can include a treetype)
    • SHEAR (plus UNSHEAR & SHEARTOGGLE) - shear or unshear a sheep
  • weather: string, or list, of weather conditions this drop applies to. Can be RAIN, THUNDER or CLEAR.

  • biomes: list of biomes this drop applies to.

  • time: times this drop applies to - can be DAY or NIGHT.

  • height: specify a height condition, must be surrounded in quotations. Can be "<#", "=#" or ">#" (eg. ">64" means the drop will only apply to blocks/creatures destroyed above y=64).

  • attackrange: like the height condition this is must be surrounded in quotations. Specifies the range a mob is killed from as a condition for this drop. Can be "<#", "=#" or ">#" (eg. ">10" means the drop will only occur if the mob was killed from more than 10 blocks away).

    • This can be good for distinguishing between a player hitting a mob with a bow and killing a mob with a bow/arrow from a distance.
    • Note: bow/arrow tool is still considered bow as this is what the playing is holding.
    • Larger distances can be good for rewarding good archers.
  • exclusive: can be any string. This drop (if conditions are successful) will override any previous drops (other than those with the same "exclusive" string). Eg. you have a lot of random drops on a block but only ever want one item to drop at a time.

  • message: a string or list of strings - this message appears whenever this drop meets all other conditions.

    • you can use %q as a placeholder for the quantity (or currency for money) (eg. "You got %q dollars.")
    • you can use &x for color codes (eg. &a, &3, &f, etc). Use && for a single ampersand.
  • regions: a string or list of WorldGuard region names (eg. [darkforest, diamondpeaks]) - this drop will only occur in any of the regions listed.

    • You can also use "-" to add regions this drop should not effect (eg. [-darkforest, -lapiswaters])
  • delay: this drop will be delayed by the (integer) number of ticks given. 20 ticks generally equals 1 second (slower servers will mean that 20 ticks could be a longer time period).

    • this can be combined with DropGroups to display a message when the block/creature is destroyed and have the drop/drops occur with another delayed message.
  • replacementblock: name (or integer ID) of the block to replace this with (rather than destroying).

  • dropspread: (default: TRUE) can be true, false or a percentage - if false items will drop in a single "itemstack" rather than as individual drops.

    • If 50% a single itemstack will drop 50% of the time and individual drops will occur the other 50%.
  • lightlevel: drop will only occur based on the light-level of the block. Format is the same as height above (eg. "<4", "=8", ">6") with any number between 0 & 15.

    • Note: this works on the maximum light-level for a block. If a block is dark on one side and lit on the other the highest level will be considered.
  • permissions: (currently "Permissions" plugin only) specifies a permission based condition - eg. if you use "hunter" then add the "otherblocks.custom.hunter" permission to groups/players as needed.

  • permissiongroups: (currently "Permissions" plugin only) specifies a permission group (or list of groups) - eg. [miners, admins]

  • other parameters will be described later....