-
Notifications
You must be signed in to change notification settings - Fork 142
Config Files: HazardousItems.xml
This file contains the definition of all Hazardous Items and their effects. The config can be edited with any editor, or ingame if you want. It's not required that you restart the server or your game.
Sample item:
<Item UnlocalizedName="item.bucketLava" ExactNameMatch="true">
<DamageEffect Source="inFire" Amount="10.0"/>
</Item>
UnlocalizedName : This is the item's internal name. It can be found in the mod's lang-file or ingame via minetweaker
ExactNameMatch : If set to true, only items where the exact name (case sensitive) matches will be processed. If set to false, you can add something like "lava" and every item, which has any form of "lava" in it's name will have that effect. Be carefull with this, as you never know how mod authors call their items
Effects There are 2 different effects you can add. The list is not limited, but for the sake of your players, you should not add too much here.
DamageEffects > Source This defines the source of the damage, which can be one of the following:
- inFire
- onFire
- lava
- inWall
- drown
- starve
- cactus
- fall
- outOfWorld
- generic
- magic
- wither
- anvil
- fallingBlock
These sources will also define the message that is shown once the player dies. For example "lava" will display: Namikon tried to swim in lava. So it might be a good idea to select the correct source, otherwise things might get confusing
DamageEffects > Amount Well, the amount of damage. 1.0 equals 1 heart. Some damage sources will ignore armor, so be carefull with those values and test it in singleplayer, or you will most probably one-shot your players
PotionEffect > PotionID The Potion that shall be applied to the player when this item is in his inventory. This can also be used to create a regeneration item. To get the valid potion ID, type /hazit listpotions ingame. The mod will warn you about invalid potionIDs when you reload the config
PotionEffect > TickDuration The time in ticks the potion effect will resist on the player once he drops the item. While the item is in his inventory, the effect will be updated every second to its initial value set here. 20 ticks = 1 second
PotionEffect > Level The potion level that shall be applied. Note the offset of 1, so Level 0 means potion level 1, 1 means potion level 2, etc.
Sample fluid:
<Item UnlocalizedName="fluid.NatriumKalium" ExactNameMatch="true">
<PotionEffect PotionID="19" TickDuration="100" Level="1"/>
</Item>
UnlocalizedName Same as for items, except that you might need a special name. There will be a command later for retrieve the valid name for a given fluid. It is highly recommended to set the exact name here, as any wildcards might cause trouble with items.
ExactNameMatch Same as for items. Recommended setting: true. Might be enforced for fluids later on
The damage and potion effects are identical with those added for items
Never will one item be checked for both item-name and fluid content. If it's a fluid container, it's fluid will be checked. If it isn't then the item's name will be checked. Keep that in mind while setting up damage and potion effects