-
-
Notifications
You must be signed in to change notification settings - Fork 5
IDDDDamageType
An IDDDDamageType is a CraftTweaker representation of a DDD damage type.
It might be required for you to import the package if you encounter any issues (like casting a Array), so better be safe that sorry and add the import
import mods.ddd.damagetypes.IDDDDamageType;The most common way to get a damage type is to use DDD's damage type bracket handler. The bracket handler is denoted with dddtype followed by the internal type name, without the "ddd_" prefix.
<dddtype:internal_name>; //General form
<dddtype:force>; //The built in Force damage typeDDD damage types have no ZenSetters, only ZenGetters, which can let you learn a bit more information about the type. Typically, this will be used when iterating over a list of unknown types.
As of 1.7.0, you can hide damage types. Hidden damage types will still function normally, but will not show up on tooltips. For armor and shield distributions, the hidden type is completely omitted. For damage distributions, all hidden types will have their weights visually assigned to an Unknown damage type for display on the tooltips only, so that the weights of the damage distribution still add up to 100%.
By default, only DDD's Normal and Unknown types are hidden types (the Unknown type, while hidden by default, will still show up in tooltips when use as a placeholder for hidden weights as mentioned above).
| ZenGetter | Return Type | Notes |
|---|---|---|
| internalName | string | This is the internal type name, with the "ddd_" prefix |
| name | string | This is the display name |
| type | string | This is the type category. This returns either "PHYSICAL" if the type is physical or "SPECIAL" if not. Out of the built in damage types, the built in Slashing, Piercing and Bludgeoning damage types will return "PHYSICAL". The rest of the built in types return "SPECIAL" |
| distribution | IDamageDistribution | This returns a damage distribution that distributes all damage to just this type |
void hideType();
- Hides a type from showing up on tooltips. See Hiding Damage Types.
void unhideType();
- Unhides a type from showing up on tooltips. See Hiding Damage Types.
Static ZenMethods have to be called on the ZenClass
List<IDDDDamageType> getAllTypes();
- Gets a list of all of DDD's damage types.