Search in sources :

Example 1 with EnumTranquilityType

use of WayofTime.bloodmagic.incense.EnumTranquilityType in project BloodMagic by WayofTime.

the class BloodMagicValueManager method setTranquility.

@Override
public void setTranquility(@Nonnull IBlockState state, @Nonnull String tranquilityType, double value) {
    EnumTranquilityType tranquility = null;
    for (EnumTranquilityType type : EnumTranquilityType.values()) {
        if (type.name().equalsIgnoreCase(tranquilityType)) {
            tranquility = type;
            break;
        }
    }
    if (tranquility != null) {
        BMLog.API_VERBOSE.info("Value Manager: Set tranquility value of {} to {} @ {}", state, tranquilityType, value);
        this.tranquility.put(state, new TranquilityStack(tranquility, value));
    } else
        BMLog.API.warn("Invalid tranquility type: {}.", tranquilityType);
}
Also used : EnumTranquilityType(WayofTime.bloodmagic.incense.EnumTranquilityType) TranquilityStack(WayofTime.bloodmagic.incense.TranquilityStack)

Aggregations

EnumTranquilityType (WayofTime.bloodmagic.incense.EnumTranquilityType)1 TranquilityStack (WayofTime.bloodmagic.incense.TranquilityStack)1