IDDDDamageType - yeelp/Distinct-Damage-Descriptions GitHub Wiki

An IDDDDamageType is a CraftTweaker representation of a DDD damage type.

Importing the package

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;

How to Get One

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 type

What can you do with it?

DDD 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.

Hiding Damage 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).

Methods

ZenGetters

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

ZenMethods

void hideType();

void unhideType();

Static ZenMethods

Static ZenMethods have to be called on the ZenClass

List<IDDDDamageType> getAllTypes();

  • Gets a list of all of DDD's damage types.