All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lop.devtools.monstera.files.beh.entitiy.components.ComponentAreaAttack.kt Maven / Gradle / Ivy

package com.lop.devtools.monstera.files.beh.entitiy.components

import com.lop.devtools.monstera.addon.api.MonsteraFile
import com.lop.devtools.monstera.addon.api.MonsteraUnsafeMap
import com.lop.devtools.monstera.files.beh.entitiy.data.BehEntityFilter
import com.lop.devtools.monstera.files.beh.entitiy.data.DamageType

class ComponentAreaAttack: MonsteraFile {
    override val unsafe = Unsafe()

    inner class Unsafe: MonsteraUnsafeMap {
        val general = mutableMapOf()

        override fun getData(): MutableMap {
            damageRange?.let { general["damage_range"] = it }
            damagePerTick?.let { general["damage_per_tick"] = it }
            cause?.let { general["cause"] = it.toString().lowercase() }
            return general
        }
    }
    var damageRange: Float? = null
    var damagePerTick: Int? = null

    var cause: DamageType? = null

    fun entityFilter(value: BehEntityFilter.() -> Unit) {
        unsafe.general["entity_filter"] = BehEntityFilter().apply(value).getData()
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy