CTUtils
Requires PMMO 0.5.4 or above!
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Static Methods
Registers a configuration setting for bonuses to xp gains.
Parameter | Type | Description |
---|---|---|
Parameter objectType | Type ObjectType | Description a value of [item, block, entity, dimension, or biome] |
Parameter objectID | Type ResourceLocation | Description the object linked to the bonus |
Parameter type | Type ModifierDataType | Description the relation to the object which predicates the bonus |
Parameter bonus | Type double?[string] | Description a map of skills and multipliers (1.0 = no bonus) |
Sets the requirements for a given Enchantment and Enchantment level
Parameter | Type | Description |
---|---|---|
Parameter enchantID | Type ResourceLocation | Description the key for the enchantment |
Parameter enchantLevel | Type int | Description the level of the enchantment |
Parameter reqs | Type int?[string] | Description a map of the skills and levels needed to use this enchantment |
Registers a configuration setting for mob modifiers to a biome or dimension.
Attribute types for the inner map of mob_modifiers can be referenced
using the static strings in this class prefixed with “MOB_“
Parameter | Type | Description |
---|---|---|
Parameter objectType | Type ObjectType | Description a value of [item, block, entity, dimension, or biome] |
Parameter locationID | Type ResourceLocation | Description the biome or dimension key |
Parameter mobID | Type ResourceLocation | Description the key for the mob being set |
Parameter modifiers | Type double?[string] | Description a map of attributes (health, speed, or damage) and modifiers |
Registers a configuration setting for what status effects should be applied to the player
if they attempt to wear/hold and item they are not skilled enough to use.
Parameter | Type | Description |
---|---|---|
Parameter objectType | Type ObjectType | Description a value of [item, block, entity, dimension, or biome] |
Parameter objectID | Type ResourceLocation | Description |
Parameter effects | Type int?[ResourceLocation] | Description a map of effect ids and levels |
Registers a configuration setting for what status effects should be applied to the player
based on their meeting or not meeting the requirements for the specified location.
Note: a “negative” effect on a dimension will have no use in-game
Parameter | Type | Description |
---|---|---|
Parameter objectType | Type ObjectType | Description a value of [item, block, entity, dimension, or biome] |
Parameter objectID | Type ResourceLocation | Description the key for the dimension or biome being configured |
Parameter effects | Type int?[ResourceLocation] | Description a map of effect ids and levels |
Sets a configuration setting for a requirement to perform an action for the specified item.
Parameter | Type | Description |
---|---|---|
Parameter objectType | Type ObjectType | Description a value of [item, block, entity, dimension, or biome] |
Parameter objectID | Type ResourceLocation | Description the key for the item being configured |
Parameter type | Type ReqType | Description the requirement category |
Parameter requirements | Type int?[string] | Description a map of skills and levels needed to perform the action |
Registers a configuration setting for items which can be obtained
via salvage from the item supplied.
This class provides SalvageBuilder as a means to construct
the salvage settings for each output object
Parameter | Type | Description |
---|---|---|
Parameter item | Type ResourceLocation | Description a key for the item to be consumed by the salvage operation |
Parameter salvage | Type SalvageBuilder[ResourceLocation] | Description a map of output item keys and the conditions for salvage |
Registers a configuration setting for experience that should be awarded
to a player for performing an action with/on a specific object.
Parameter | Type | Description |
---|---|---|
Parameter objectType | Type ObjectType | Description a value of [item, block, entity, dimension, or biome] |
Parameter objectID | Type ResourceLocation | Description the key for the item being configured |
Parameter type | Type EventType | Description the event which awards the experience |
Parameter award | Type long?[string] | Description a map of skills and experience values to be awarded |