Class EntityData

java.lang.Object
valorless.rarespawns.datamodels.EntityData

public class EntityData extends Object
Mutable data container representing a rare entity definition and its runtime state.

This structure is populated from configuration (and sometimes dynamically) and then referenced while spawning, updating, running abilities, and handling lifecycle events for rare entities. Unless otherwise stated collections are initialised (never null) to simplify external iteration. Fields may remain null when absence is a meaningful state (e.g., optional strings, numeric overrides, flags).

Runtime maps keyed by LivingEntity (e.g., runnables, abilityRunnables, bossbars) track per-instance scheduler task ids or UI elements and should be cleaned up on despawn/death to avoid leaks.

  • Field Details

    • runnables

      public HashMap<org.bukkit.entity.LivingEntity,Integer> runnables
      Primary runnable task id per entity (e.g., main tick/update loop).
    • id

      public String id
      Definition identifier (config id).
    • entities

      public List<org.bukkit.entity.LivingEntity> entities
      Active entity instances bound to this definition.
    • weight

      public Integer weight
      Spawn weight (used in random selection logic).
    • spawnGroup

      public SpawnGroup spawnGroup
      Optional spawn group membership and chance configuration. When set, ties this entity to a SpawnGroup which may influence selection/weighting in spawn logic.
    • selectNew

      public boolean selectNew
      Whether to select a new rare entity if conditions not met.
    • biomes

      public List<String> biomes
      Biome names for spawn condition checking.
    • biomeBlacklist

      public boolean biomeBlacklist
      Whether biome list is a blacklist (true) or whitelist (false).
    • weather

      public String weather
      Weather condition for spawning (e.g., rain, clear).
    • time

      public String time
      Time condition for spawning (e.g., day, night, or custom range i.e. '0-24000').
    • name

      public List<String> name
      Multi-line nameplate (raw lines with formatting tokens).
    • customName

      public String customName
      Single custom name override (if provided) shown by Minecraft.
    • customNameVisible

      public Boolean customNameVisible
      Whether the custom name is always visible.
    • nameTextShadow

      public Boolean nameTextShadow
      Whether rendered name text uses shadow.
    • nameLineWidth

      public Integer nameLineWidth
      Maximum line width for wrapped name text.
    • nameBillboard

      public String nameBillboard
      Billboard mode for name (e.g., fixed, centered) if supported.
    • nameScale

      public Double nameScale
      Name scale multiplier.
    • nameBackgrond

      public Boolean nameBackgrond
      Whether a background panel is drawn behind name.
    • nameBackgroundColor

      public String nameBackgroundColor
      Background color (hex / named) for name panel.
    • nameSeeThrough

      public Boolean nameSeeThrough
      Whether the name is visible through walls (see-through).
    • nameViewDistance

      public Integer nameViewDistance
      View distance (blocks) for name rendering.
    • nameOffset

      public org.bukkit.util.Vector nameOffset
      Positional offset applied to the nameplate.
    • hostile

      public boolean hostile
      Whether entity is considered hostile (affects AI/targeting logic).
    • type

      public org.bukkit.entity.EntityType type
      Minecraft entity type to spawn.
    • health

      public Integer health
      Base health value.
    • absorption

      public Integer absorption
      Base absorption value (extra hearts).
    • effects

      public HashMap<org.bukkit.potion.PotionEffectType,Integer> effects
      Persistent potion effects with amplifiers.
    • inventory

      public InventoryData inventory
      Inventory / equipment specification.
    • despawn

      public Boolean despawn
      Allow natural despawn flag.
    • antiStuck

      public Boolean antiStuck
      Enable anti-stuck logic (teleport/unstick).
    • attributes

      public HashMap<org.bukkit.attribute.Attribute,Double> attributes
      Attribute overrides (GENERIC_* etc.) mapped to values.
    • abilities

      public List<String> abilities
      Ability identifiers applied to this entity.
    • abilityRunnables

      public HashMap<org.bukkit.entity.LivingEntity,List<Integer>> abilityRunnables
      Scheduler task ids for ability per-entity periodic runnables.
    • spawnMessage

      public List<String> spawnMessage
      Lines broadcast to nearby players when spawned.
    • spawnMessageRadius

      public Integer spawnMessageRadius
      Radius in blocks for spawn message distribution.
    • spawnMessageSound

      public Sound spawnMessageSound
      Sound played on spawn announcement.
    • deathMessage

      public List<String> deathMessage
      Lines broadcast when entity dies.
    • deathMessageRadius

      public Integer deathMessageRadius
      Radius in blocks for death message distribution.
    • deathMessageSound

      public Sound deathMessageSound
      Sound played on death announcement.
    • dropTableReal

      public Boolean dropTableReal
      Whether the drop table uses real (natural) drop mechanics.
    • dropTable

      public List<String> dropTable
      Drop table specification entries (id:chance, etc.).
    • bossbar

      public Boolean bossbar
      Enable boss bar UI.
    • bossbarName

      public String bossbarName
      Boss bar displayed name.
    • bossbarColor

      public org.bukkit.boss.BarColor bossbarColor
      Boss bar color.
    • bossbarStyle

      public org.bukkit.boss.BarStyle bossbarStyle
      Boss bar style (segments, solid).
    • bossbarDistance

      public Integer bossbarDistance
      Max render distance for boss bar.
    • bossbars

      public HashMap<org.bukkit.entity.LivingEntity,RareEntityBossBar> bossbars
      Active boss bar handles per living entity.
    • ai

      public Boolean ai
      AI enabled flag.
    • arrowsInBody

      public Integer arrowsInBody
      Arrow count visually in body.
    • arrowsDespawnTicks

      public Integer arrowsDespawnTicks
      Ticks until arrows despawn.
    • baby

      public Boolean baby
      Spawn as baby variant.
    • canPickUpItems

      public Boolean canPickUpItems
      Can pick up dropped items.
    • collidable

      public Boolean collidable
      Is collidable with other entities.
    • gliding

      public Boolean gliding
      Currently gliding (elytra).
    • invisible

      public Boolean invisible
      Invisible flag.
    • breath

      public Integer breath
      Remaining air supply (breath).
    • removeWhenFarAway

      public Boolean removeWhenFarAway
      Remove when far from players (vanilla despawn).
    • riptiding

      public Boolean riptiding
      Currently performing riptide.
    • swimming

      public Boolean swimming
      Swimming state.
    • passenger

      public String passenger
      Passenger (entity id / config reference).
    • passengerUUID

      public UUID passengerUUID
      Passenger unique UUID reference.
    • fallDistance

      public Double fallDistance
      Accumulated fall distance.
    • fireTicks

      public Integer fireTicks
      Current fire ticks remaining.
    • onFire

      public Boolean onFire
      Whether entity visually on fire.
    • glowing

      public Boolean glowing
      Glowing outline flag.
    • gravity

      public Boolean gravity
      Gravity enabled flag.
    • canUsePortals

      public Boolean canUsePortals
      Can use portals.
    • silent

      public Boolean silent
      Silent (no sounds) flag.
    • visibleByDefault

      public Boolean visibleByDefault
      Visible by default to players (not requiring reveal).
    • slimeSize

      public Integer slimeSize
      Slime size (for slime/magma cube).
    • slimeSplit

      public boolean slimeSplit
      Whether slime splits on death.
    • wolfAngry

      public Boolean wolfAngry
      Wolf angry state.
    • immuneTo

      public List<org.bukkit.event.entity.EntityDamageEvent.DamageCause> immuneTo
      Damage causes this entity is immune to.
    • aggroRange

      public double aggroRange
      Aggro acquisition range.
    • leadable

      public Boolean leadable
      Whether the entity can be leashed.
    • tameableVanilla

      public Boolean tameableVanilla
      Whether vanilla taming logic applies.
    • tameableItem

      public String tameableItem
      Required item key for taming.
    • tameableChance

      public Double tameableChance
      Chance (0-100) of successful tame per attempt.
    • tameableSoundFail

      public Sound tameableSoundFail
      Sound played on tame failure.
    • tameableParticleFail

      public org.bukkit.Particle tameableParticleFail
      Particle effect on tame failure.
    • tameableParticleAmountFail

      public Integer tameableParticleAmountFail
      Particle count on tame failure.
    • tameableSoundTame

      public Sound tameableSoundTame
      Sound played on successful tame.
    • tameableParticleTame

      public org.bukkit.Particle tameableParticleTame
      Particle effect on tame success.
    • tameableParticleAmountTame

      public Integer tameableParticleAmountTame
      Particle count on tame success.
    • wolfType

      public String wolfType
      Wolf variant/type id.
    • catType

      public String catType
      Cat variant/type id.
    • horseColor

      public String horseColor
      Horse base color.
    • horseStyle

      public String horseStyle
      Horse style (markings).
    • horseArmor

      public String horseArmor
      Horse armor.
    • parrotType

      public String parrotType
      Parrot variant.
    • rabbitType

      public String rabbitType
      Rabbit variant.
    • axolotlType

      public String axolotlType
      Axolotl variant.
    • tropicalColor

      public String tropicalColor
      Tropical fish body color.
    • tropicalPattern

      public String tropicalPattern
      Tropical fish pattern id.
    • tropicalPatternColor

      public String tropicalPatternColor
      Tropical fish pattern color.
    • pandaMainGene

      public String pandaMainGene
      Panda main gene.
    • pandaHiddenGene

      public String pandaHiddenGene
      Panda hidden gene.
    • spells

      public List<org.bukkit.entity.Spellcaster.Spell> spells
      List of spell types this entity can cast.
    • iframes

      public Integer iframes
  • Constructor Details

    • EntityData

      public EntityData()
      Constructs a new data container marking it initialised.
  • Method Details

    • getInit

      public Boolean getInit()
      Indicates the data object has been constructed (legacy placeholder).