Class BulletType

java.lang.Object
mindustry.ctype.Content
mindustry.entities.bullet.BulletType
All Implemented Interfaces:
Cloneable, Comparable<Content>
Direct Known Subclasses:
BasicBulletType, ContinuousBulletType, ExplosionBulletType, FireBulletType, LaserBulletType, LightningBulletType, LiquidBulletType, MassDriverBolt, PointBulletType, PointLaserBulletType, RailBulletType, SapBulletType, ShrapnelBulletType, SpaceLiquidBulletType

public class BulletType extends Content implements Cloneable
  • Nested Class Summary

    Nested classes/interfaces inherited from class mindustry.ctype.Content

    Content.ModContentInfo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    Whether this projectile can be absorbed by shields.
    float
    How many bullets get created per ammo item/liquid.
    boolean
    Whether to move the bullet back depending on delta to fix some delta-time related issues.
    float
    Multiplier of how much base damage is done to tiles.
    float
    Interval, in ticks, between which bullet spawn.
    Effect created when charging starts; only usable in single-shot weapons with a firstShotDelay / shotDelay.
    boolean
    If true, this projectile collides with non-surface floors.
    boolean
    Whether this bullet types collides with anything at all.
    boolean
    Whether this bullet type collides with air/ground units.
    boolean
    Whether this bullet type collides with air/ground units.
    boolean
    Whether this bullet type collides with tiles that are of the same team.
    boolean
    Whether this bullet type collides with tiles.
    boolean
    If true, this projectile collides with static walls
    float
    Chance for this bullet to be created.
    float
    Direct damage dealt on hit.
    Effect shown when bullet despawns.
    boolean
    Whether to create hit effects on despawn.
    float
    Amount of shaking produced when this bullet hits something or despawns.
    Sound made when hitting something or getting removed.
    Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime.
    float
    The chance for despawn units to spawn.
    int
    Amount of units spawned when this bullet despawns.
    float
    Random offset distance from the original bullet despawn/hit coordinate.
    boolean
    Whether to display the ammo multiplayer for this bullet type in its stats.
    float
    Drag as fraction of velocity.
    float
    Clipping hitbox.
    boolean
    If true, units spawned when this bullet despawns face away from the bullet instead of the same direction as the bullet.
    float
    Angle offset of fragmentation bullets.
    Bullet type that is created when this bullet expires.
    int
    Number of fragmentation bullets created.
    float
    Random range of frag lifetime as a multiplier.
    float
    Random range of frag lifetime as a multiplier.
    boolean
    If false, this bullet will not create fraags when absorbed by a shield.
    boolean
    If true, this bullet will create bullets when it hits anything, not just when it despawns.
    float
    Degree spread range of fragmentation bullets.
    float
    Uniform spread between each frag bullet in degrees.
    float
    Random range of frag velocity as a multiplier.
    float
    Random range of frag velocity as a multiplier.
    float
    flat amount of block health healed
    Color used for block heal effects.
    Effect emitted upon blocks that are healed.
    float
    % of block health healed
    Color used for hit/despawn effects.
    Effect shown on direct hit.
    float
    Amount of shaking produced when this bullet hits something or despawns.
    float
    Hitbox size.
    Sound made when hitting something or getting removed.
    float
    Pitch of the sound made when hitting something
    float
    Volume of the sound made when hitting something
    boolean
    Whether this bullet can be hit by point defense.
    float
    Use a negative value to disable homing delay.
    float
    Power of bullet ability.
    float
    Range of homing effect around bullet.
    boolean
    If true, the angle param in create is ignored.
    boolean
    Should knockback follow the bullet's direction
    float
    Extra inaccuracy when firing.
    int
    Amount of fires attempted around bullet.
    float
    Chance of fire being created.
    float
    Spread of fires around bullet.
    boolean
    Whether to instantly make the bullet disappear.
    float
    Angle offset for interval bullets.
    Bullet that is created at a fixed interval.
    int
    Number of bullet spawned per interval.
    float
    Use a negative value to disable interval bullet delay.
    float
    Random spread of interval bullets.
    float
    Angle spread between individual interval bullets.
    boolean
    Whether velocity is inherited from the shooter.
    boolean
    Whether to kill the shooter when this is shot.
    float
    Knockback in velocity.
    boolean
    For piercing lasers, setting this to true makes it get absorbed by plastanium walls.
    float
    Z layer to drawn on.
    float
    Lifetime in ticks.
    Color of light emitted by this bullet.
    int
    Number of separate lightning "roots".
    float
    Offset of lightning relative to bullet rotation.
    Color of lightning created by bullet.
    float
    Spread of lightning, relative to bullet rotation.
    float
    Use a negative value to use default bullet damage.
    int
    Length of each lightning strand.
    int
    Extra random length added onto base length of lightning.
    The bullet created at lightning points.
    float
    Opacity of light color.
    float
    Radius of light emitted by this bullet; <0 to use defaults.
    boolean
    Whether to make fire on impact
    float
    Bullet range positive override.
    float
    Life fraction at which this bullet has the best range/damage/etc.
    Extra visual parts for this bullet.
    boolean
    Whether to pierce units.
    boolean
    If true, unit armor is ignored in damage calculations.
    boolean
    Whether to pierce buildings.
    int
    Maximum # of pierced objects.
    float
    Multiplier of damage decreased per health pierced.
    float
    Liquid count of each puddle created.
    Liquid that puddles created are made of.
    float
    Range of puddles around bullet position.
    int
    Number of individual puddles created.
    float
    Range initialized in init().
    float
    When used in a turret with multiple ammo types, this can be set to a non-zero value to influence range.
    float
    When > 0, overrides range even if smaller than base range.
    float
    Recoil from shooter entities.
    boolean
    Whether this bullet can be reflected.
    float
    Multiplied by turret reload speed to get final shoot speed.
    boolean
    If false, this bullet isn't removed after pierceCap is exceeded.
    boolean
    If true, splash damage is "correctly" affected by unit hitbox size.
    boolean
    Whether to scale lifetime (not actually velocity!) to disappear at the target position.
    boolean
    Whether status and despawnHit should automatically be set.
    Effect created when shooting.
    Extra smoke effect created when shooting.
    Bullets spawned when this bullet is created.
    Unit spawned _instead of_ this bullet.
    float
    Speed in units/tick.
    float
    Damage dealt in splash.
    boolean
    If true, splash damage pierces through tiles.
    float
    Use a negative value to disable splash damage.
    Status effect applied on hit.
    float
    Intensity of applied status effect in terms of duration.
    float
    Duration of healing block suppression effect.
    float
    Chance of suppression effect occurring on block, scaled down by number of blocks.
    float
    Range of healing block suppression effect.
    float
    Chance of trail effect spawning on bullet per tick.
    Color of trail behind bullet.
    Trail effect that is spawned.
    Interpolation for trail width as function of bullet lifetime
    float
    Uniform interval in which trail effect is spawned.
    int
    Length of trail quads.
    float
    Rotation/size parameter that is passed to trail.
    boolean
    Whether the parameter passed to the trail is the bullet rotation, instead of a flat value.
    float
    If trailSinMag > 0, these values are applied as a sine curve to trail width.
    float
    If trailSinMag > 0, these values are applied as a sine curve to trail width.
    float
    Width of trail, if trailLength > 0
    float
    Intensity of bullet weaving.
    boolean
    If true, the bullet weave will randomly switch directions on spawn.
    float
    Scale of bullet weave pattern.

    Fields inherited from class mindustry.ctype.Content

    id, minfo
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    BulletType(float speed, float damage)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected float
     
    float
     
     
    mindustry.gen.Bullet
    create(mindustry.gen.Bullet parent, float x, float y, float angle)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl, float lifeScale)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl, float lifetimeScl)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, Mover mover)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, Mover mover, float aimX, float aimY)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl, float lifetimeScl, Mover mover)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Entityc owner, mindustry.gen.Entityc shooter, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, Mover mover, float aimX, float aimY)
     
    mindustry.gen.Bullet
    create(mindustry.gen.Teamc owner, float x, float y, float angle)
     
    static void
    createBullet(BulletType type, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl)
     
    void
    createFrags(mindustry.gen.Bullet b, float x, float y)
     
    void
    createIncend(mindustry.gen.Bullet b, float x, float y)
     
    void
    createNet(Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl)
     
    void
    createPuddles(mindustry.gen.Bullet b, float x, float y)
     
    void
    createSplashDamage(mindustry.gen.Bullet b, float x, float y)
     
    void
    createUnits(mindustry.gen.Bullet b, float x, float y)
     
    float
    damageMultiplier(mindustry.gen.Bullet b)
     
    void
    despawned(mindustry.gen.Bullet b)
    Called when the bullet reaches the end of its lifetime or is destroyed by something external.
    void
    draw(mindustry.gen.Bullet b)
     
    void
    drawLight(mindustry.gen.Bullet b)
     
    void
    drawParts(mindustry.gen.Bullet b)
     
    void
    drawTrail(mindustry.gen.Bullet b)
     
    float
     
    Returns the type name of this piece of content.
    void
    handlePierce(mindustry.gen.Bullet b, float initialHealth, float x, float y)
     
    boolean
     
    void
    hit(mindustry.gen.Bullet b)
     
    void
    hit(mindustry.gen.Bullet b, float x, float y)
     
    void
    hitEntity(mindustry.gen.Bullet b, mindustry.gen.Hitboxc entity, float health)
     
    void
    hitTile(mindustry.gen.Bullet b, mindustry.gen.Building build, float x, float y, float initialHealth, boolean direct)
    If direct is false, this is an indirect hit and the tile was already damaged.
    void
    Called after all content and modules are created.
    void
    init(mindustry.gen.Bullet b)
     
    void
    Called after all content is created, only on non-headless versions.
    void
    removed(mindustry.gen.Bullet b)
    Called when the bullet is removed for any reason.
    boolean
    testCollision(mindustry.gen.Bullet bullet, mindustry.gen.Building tile)
     
    void
    update(mindustry.gen.Bullet b)
     
    void
    updateBulletInterval(mindustry.gen.Bullet b)
     
    void
    updateHoming(mindustry.gen.Bullet b)
     
    void
    updateTrail(mindustry.gen.Bullet b)
     
    void
    updateTrailEffects(mindustry.gen.Bullet b)
     
    void
    updateWeaving(mindustry.gen.Bullet b)
     

    Methods inherited from class mindustry.ctype.Content

    compareTo, hasErrored, isModded, isVanilla, loadIcon, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • lifetime

      public float lifetime
      Lifetime in ticks.
    • speed

      public float speed
      Speed in units/tick.
    • damage

      public float damage
      Direct damage dealt on hit.
    • hitSize

      public float hitSize
      Hitbox size.
    • drawSize

      public float drawSize
      Clipping hitbox.
    • drag

      public float drag
      Drag as fraction of velocity.
    • pierce

      public boolean pierce
      Whether to pierce units.
    • pierceBuilding

      public boolean pierceBuilding
      Whether to pierce buildings.
    • pierceCap

      public int pierceCap
      Maximum # of pierced objects.
    • pierceDamageFactor

      public float pierceDamageFactor
      Multiplier of damage decreased per health pierced.
    • removeAfterPierce

      public boolean removeAfterPierce
      If false, this bullet isn't removed after pierceCap is exceeded. Expert usage only.
    • laserAbsorb

      public boolean laserAbsorb
      For piercing lasers, setting this to true makes it get absorbed by plastanium walls.
    • optimalLifeFract

      public float optimalLifeFract
      Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets.
    • layer

      public float layer
      Z layer to drawn on.
    • hitEffect

      public Effect hitEffect
      Effect shown on direct hit.
    • despawnEffect

      public Effect despawnEffect
      Effect shown when bullet despawns.
    • shootEffect

      public Effect shootEffect
      Effect created when shooting.
    • chargeEffect

      public Effect chargeEffect
      Effect created when charging starts; only usable in single-shot weapons with a firstShotDelay / shotDelay.
    • smokeEffect

      public Effect smokeEffect
      Extra smoke effect created when shooting.
    • hitSound

      public Sound hitSound
      Sound made when hitting something or getting removed.
    • despawnSound

      public Sound despawnSound
      Sound made when hitting something or getting removed.
    • hitSoundPitch

      public float hitSoundPitch
      Pitch of the sound made when hitting something
    • hitSoundVolume

      public float hitSoundVolume
      Volume of the sound made when hitting something
    • inaccuracy

      public float inaccuracy
      Extra inaccuracy when firing.
    • ammoMultiplier

      public float ammoMultiplier
      How many bullets get created per ammo item/liquid.
    • reloadMultiplier

      public float reloadMultiplier
      Multiplied by turret reload speed to get final shoot speed.
    • buildingDamageMultiplier

      public float buildingDamageMultiplier
      Multiplier of how much base damage is done to tiles.
    • recoil

      public float recoil
      Recoil from shooter entities.
    • killShooter

      public boolean killShooter
      Whether to kill the shooter when this is shot. For suicide bombers.
    • instantDisappear

      public boolean instantDisappear
      Whether to instantly make the bullet disappear.
    • splashDamage

      public float splashDamage
      Damage dealt in splash. 0 to disable.
    • scaledSplashDamage

      public boolean scaledSplashDamage
      If true, splash damage is "correctly" affected by unit hitbox size. Used for projectiles that do not collide / have splash as their main source of damage.
    • knockback

      public float knockback
      Knockback in velocity.
    • impact

      public boolean impact
      Should knockback follow the bullet's direction
    • status

      public StatusEffect status
      Status effect applied on hit.
    • statusDuration

      public float statusDuration
      Intensity of applied status effect in terms of duration.
    • collidesTiles

      public boolean collidesTiles
      Whether this bullet type collides with tiles.
    • collidesTeam

      public boolean collidesTeam
      Whether this bullet type collides with tiles that are of the same team.
    • collidesAir

      public boolean collidesAir
      Whether this bullet type collides with air/ground units.
    • collidesGround

      public boolean collidesGround
      Whether this bullet type collides with air/ground units.
    • collides

      public boolean collides
      Whether this bullet types collides with anything at all.
    • collideFloor

      public boolean collideFloor
      If true, this projectile collides with non-surface floors.
    • collideTerrain

      public boolean collideTerrain
      If true, this projectile collides with static walls
    • keepVelocity

      public boolean keepVelocity
      Whether velocity is inherited from the shooter.
    • scaleLife

      public boolean scaleLife
      Whether to scale lifetime (not actually velocity!) to disappear at the target position. Used for artillery.
    • hittable

      public boolean hittable
      Whether this bullet can be hit by point defense.
    • reflectable

      public boolean reflectable
      Whether this bullet can be reflected.
    • absorbable

      public boolean absorbable
      Whether this projectile can be absorbed by shields.
    • backMove

      public boolean backMove
      Whether to move the bullet back depending on delta to fix some delta-time related issues. Do not change unless you know what you're doing.
    • ignoreSpawnAngle

      public boolean ignoreSpawnAngle
      If true, the angle param in create is ignored.
    • createChance

      public float createChance
      Chance for this bullet to be created.
    • maxRange

      public float maxRange
      Bullet range positive override.
    • rangeOverride

      public float rangeOverride
      When > 0, overrides range even if smaller than base range.
    • rangeChange

      public float rangeChange
      When used in a turret with multiple ammo types, this can be set to a non-zero value to influence range.
    • range

      public float range
      Range initialized in init().
    • healPercent

      public float healPercent
      % of block health healed
    • healAmount

      public float healAmount
      flat amount of block health healed
    • makeFire

      public boolean makeFire
      Whether to make fire on impact
    • despawnHit

      public boolean despawnHit
      Whether to create hit effects on despawn. Forced to true if this bullet has any special effects like splash damage.
    • fragOnHit

      public boolean fragOnHit
      If true, this bullet will create bullets when it hits anything, not just when it despawns.
    • fragOnAbsorb

      public boolean fragOnAbsorb
      If false, this bullet will not create fraags when absorbed by a shield.
    • pierceArmor

      public boolean pierceArmor
      If true, unit armor is ignored in damage calculations.
    • setDefaults

      public boolean setDefaults
      Whether status and despawnHit should automatically be set.
    • hitShake

      public float hitShake
      Amount of shaking produced when this bullet hits something or despawns.
    • despawnShake

      public float despawnShake
      Amount of shaking produced when this bullet hits something or despawns.
    • fragBullet

      @Nullable public BulletType fragBullet
      Bullet type that is created when this bullet expires.
    • fragRandomSpread

      public float fragRandomSpread
      Degree spread range of fragmentation bullets.
    • fragSpread

      public float fragSpread
      Uniform spread between each frag bullet in degrees.
    • fragAngle

      public float fragAngle
      Angle offset of fragmentation bullets.
    • fragBullets

      public int fragBullets
      Number of fragmentation bullets created.
    • fragVelocityMin

      public float fragVelocityMin
      Random range of frag velocity as a multiplier.
    • fragVelocityMax

      public float fragVelocityMax
      Random range of frag velocity as a multiplier.
    • fragLifeMin

      public float fragLifeMin
      Random range of frag lifetime as a multiplier.
    • fragLifeMax

      public float fragLifeMax
      Random range of frag lifetime as a multiplier.
    • intervalBullet

      @Nullable public BulletType intervalBullet
      Bullet that is created at a fixed interval.
    • bulletInterval

      public float bulletInterval
      Interval, in ticks, between which bullet spawn.
    • intervalBullets

      public int intervalBullets
      Number of bullet spawned per interval.
    • intervalRandomSpread

      public float intervalRandomSpread
      Random spread of interval bullets.
    • intervalSpread

      public float intervalSpread
      Angle spread between individual interval bullets.
    • intervalAngle

      public float intervalAngle
      Angle offset for interval bullets.
    • intervalDelay

      public float intervalDelay
      Use a negative value to disable interval bullet delay.
    • hitColor

      public Color hitColor
      Color used for hit/despawn effects.
    • healColor

      public Color healColor
      Color used for block heal effects.
    • healEffect

      public Effect healEffect
      Effect emitted upon blocks that are healed.
    • spawnBullets

      public Seq<BulletType> spawnBullets
      Bullets spawned when this bullet is created. Rarely necessary, used for visuals.
    • spawnUnit

      @Nullable public UnitType spawnUnit
      Unit spawned _instead of_ this bullet. Useful for missiles.
    • despawnUnit

      @Nullable public UnitType despawnUnit
      Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime.
    • despawnUnitChance

      public float despawnUnitChance
      The chance for despawn units to spawn.
    • despawnUnitCount

      public int despawnUnitCount
      Amount of units spawned when this bullet despawns.
    • despawnUnitRadius

      public float despawnUnitRadius
      Random offset distance from the original bullet despawn/hit coordinate.
    • faceOutwards

      public boolean faceOutwards
      If true, units spawned when this bullet despawns face away from the bullet instead of the same direction as the bullet.
    • parts

      public Seq<DrawPart> parts
      Extra visual parts for this bullet.
    • trailColor

      public Color trailColor
      Color of trail behind bullet.
    • trailChance

      public float trailChance
      Chance of trail effect spawning on bullet per tick.
    • trailInterval

      public float trailInterval
      Uniform interval in which trail effect is spawned.
    • trailEffect

      public Effect trailEffect
      Trail effect that is spawned.
    • trailParam

      public float trailParam
      Rotation/size parameter that is passed to trail. Usually, this controls size.
    • trailRotation

      public boolean trailRotation
      Whether the parameter passed to the trail is the bullet rotation, instead of a flat value.
    • trailInterp

      public Interp trailInterp
      Interpolation for trail width as function of bullet lifetime
    • trailLength

      public int trailLength
      Length of trail quads. Any value <= 0 disables the trail.
    • trailWidth

      public float trailWidth
      Width of trail, if trailLength > 0
    • trailSinMag

      public float trailSinMag
      If trailSinMag > 0, these values are applied as a sine curve to trail width.
    • trailSinScl

      public float trailSinScl
      If trailSinMag > 0, these values are applied as a sine curve to trail width.
    • splashDamageRadius

      public float splashDamageRadius
      Use a negative value to disable splash damage.
    • splashDamagePierce

      public boolean splashDamagePierce
      If true, splash damage pierces through tiles.
    • incendAmount

      public int incendAmount
      Amount of fires attempted around bullet.
    • incendSpread

      public float incendSpread
      Spread of fires around bullet.
    • incendChance

      public float incendChance
      Chance of fire being created.
    • homingPower

      public float homingPower
      Power of bullet ability. Usually a number between 0 and 1; try 0.1 as a starting point.
    • homingRange

      public float homingRange
      Range of homing effect around bullet.
    • homingDelay

      public float homingDelay
      Use a negative value to disable homing delay.
    • suppressionRange

      public float suppressionRange
      Range of healing block suppression effect.
    • suppressionDuration

      public float suppressionDuration
      Duration of healing block suppression effect.
    • suppressionEffectChance

      public float suppressionEffectChance
      Chance of suppression effect occurring on block, scaled down by number of blocks.
    • lightningColor

      public Color lightningColor
      Color of lightning created by bullet.
    • lightning

      public int lightning
      Number of separate lightning "roots".
    • lightningLength

      public int lightningLength
      Length of each lightning strand.
    • lightningLengthRand

      public int lightningLengthRand
      Extra random length added onto base length of lightning.
    • lightningDamage

      public float lightningDamage
      Use a negative value to use default bullet damage.
    • lightningCone

      public float lightningCone
      Spread of lightning, relative to bullet rotation.
    • lightningAngle

      public float lightningAngle
      Offset of lightning relative to bullet rotation.
    • lightningType

      @Nullable public BulletType lightningType
      The bullet created at lightning points.
    • weaveScale

      public float weaveScale
      Scale of bullet weave pattern. Higher -> less vibration.
    • weaveMag

      public float weaveMag
      Intensity of bullet weaving. Note that this may make bullets inaccurate.
    • weaveRandom

      public boolean weaveRandom
      If true, the bullet weave will randomly switch directions on spawn.
    • puddles

      public int puddles
      Number of individual puddles created.
    • puddleRange

      public float puddleRange
      Range of puddles around bullet position.
    • puddleAmount

      public float puddleAmount
      Liquid count of each puddle created.
    • puddleLiquid

      public Liquid puddleLiquid
      Liquid that puddles created are made of.
    • displayAmmoMultiplier

      public boolean displayAmmoMultiplier
      Whether to display the ammo multiplayer for this bullet type in its stats.
    • lightRadius

      public float lightRadius
      Radius of light emitted by this bullet; <0 to use defaults.
    • lightOpacity

      public float lightOpacity
      Opacity of light color.
    • lightColor

      public Color lightColor
      Color of light emitted by this bullet.
  • Constructor Details

    • BulletType

      public BulletType(float speed, float damage)
    • BulletType

      public BulletType()
  • Method Details

    • copy

      public BulletType copy()
    • load

      public void load()
      Description copied from class: Content
      Called after all content is created, only on non-headless versions. Use for loading regions or other image data.
      Overrides:
      load in class Content
    • estimateDPS

      public float estimateDPS()
      Returns:
      estimated damage per shot. this can be very inaccurate.
    • calculateRange

      protected float calculateRange()
      Returns:
      maximum distance the bullet this bullet type has can travel.
    • continuousDamage

      public float continuousDamage()
      Returns:
      continuous damage in damage/sec, or -1 if not continuous.
    • heals

      public boolean heals()
    • testCollision

      public boolean testCollision(mindustry.gen.Bullet bullet, mindustry.gen.Building tile)
    • hitTile

      public void hitTile(mindustry.gen.Bullet b, mindustry.gen.Building build, float x, float y, float initialHealth, boolean direct)
      If direct is false, this is an indirect hit and the tile was already damaged. TODO this is a mess.
    • hitEntity

      public void hitEntity(mindustry.gen.Bullet b, mindustry.gen.Hitboxc entity, float health)
    • handlePierce

      public void handlePierce(mindustry.gen.Bullet b, float initialHealth, float x, float y)
    • damageMultiplier

      public float damageMultiplier(mindustry.gen.Bullet b)
    • hit

      public void hit(mindustry.gen.Bullet b)
    • hit

      public void hit(mindustry.gen.Bullet b, float x, float y)
    • createIncend

      public void createIncend(mindustry.gen.Bullet b, float x, float y)
    • createPuddles

      public void createPuddles(mindustry.gen.Bullet b, float x, float y)
    • createSplashDamage

      public void createSplashDamage(mindustry.gen.Bullet b, float x, float y)
    • createFrags

      public void createFrags(mindustry.gen.Bullet b, float x, float y)
    • createUnits

      public void createUnits(mindustry.gen.Bullet b, float x, float y)
    • despawned

      public void despawned(mindustry.gen.Bullet b)
      Called when the bullet reaches the end of its lifetime or is destroyed by something external.
    • removed

      public void removed(mindustry.gen.Bullet b)
      Called when the bullet is removed for any reason.
    • draw

      public void draw(mindustry.gen.Bullet b)
    • drawTrail

      public void drawTrail(mindustry.gen.Bullet b)
    • drawParts

      public void drawParts(mindustry.gen.Bullet b)
    • drawLight

      public void drawLight(mindustry.gen.Bullet b)
    • init

      public void init(mindustry.gen.Bullet b)
    • update

      public void update(mindustry.gen.Bullet b)
    • updateBulletInterval

      public void updateBulletInterval(mindustry.gen.Bullet b)
    • updateHoming

      public void updateHoming(mindustry.gen.Bullet b)
    • updateWeaving

      public void updateWeaving(mindustry.gen.Bullet b)
    • updateTrailEffects

      public void updateTrailEffects(mindustry.gen.Bullet b)
    • updateTrail

      public void updateTrail(mindustry.gen.Bullet b)
    • init

      public void init()
      Description copied from class: Content
      Called after all content and modules are created. Do not use to load regions or texture data!
      Overrides:
      init in class Content
    • getContentType

      public ContentType getContentType()
      Description copied from class: Content
      Returns the type name of this piece of content. This should return the same value for all instances of this content type.
      Specified by:
      getContentType in class Content
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Teamc owner, float x, float y, float angle)
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle)
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl)
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl, float lifetimeScl)
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl, float lifetimeScl, Mover mover)
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Bullet parent, float x, float y, float angle)
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl, float lifeScale)
    • create

      @Nullable public mindustry.gen.Bullet create(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl)
    • create

      @Nullable public mindustry.gen.Bullet create(@Nullable mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data)
    • create

      @Nullable public mindustry.gen.Bullet create(@Nullable mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, @Nullable Mover mover)
    • create

      @Nullable public mindustry.gen.Bullet create(@Nullable mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, @Nullable Mover mover, float aimX, float aimY)
    • create

      @Nullable public mindustry.gen.Bullet create(@Nullable mindustry.gen.Entityc owner, @Nullable mindustry.gen.Entityc shooter, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, @Nullable Mover mover, float aimX, float aimY)
    • createNet

      public void createNet(Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl)
    • createBullet

      public static void createBullet(BulletType type, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl)