Record Class ExplosionProperties

java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.level.ExplosionProperties

public record ExplosionProperties(@Nullable net.minecraft.world.entity.Entity source, @Nullable net.minecraft.world.damagesource.DamageSource damageSource, @Nullable net.minecraft.world.level.ExplosionDamageCalculator damageCalculator, Optional<Float> strength, Optional<Boolean> causesFire, @Nullable net.minecraft.world.level.Level.ExplosionInteraction mode, Optional<Boolean> particles, @Nullable net.minecraft.core.particles.ParticleOptions smallParticles, @Nullable net.minecraft.core.particles.ParticleOptions largeParticles, @Nullable net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> explosionSound) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExplosionProperties(net.minecraft.world.entity.Entity source, net.minecraft.world.damagesource.DamageSource damageSource, net.minecraft.world.level.ExplosionDamageCalculator damageCalculator, Optional<Float> strength, Optional<Boolean> causesFire, net.minecraft.world.level.Level.ExplosionInteraction mode, Optional<Boolean> particles, net.minecraft.core.particles.ParticleOptions smallParticles, net.minecraft.core.particles.ParticleOptions largeParticles, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> explosionSound)
    Creates an instance of a ExplosionProperties record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the causesFire record component.
    net.minecraft.world.level.ExplosionDamageCalculator
    Returns the value of the damageCalculator record component.
    net.minecraft.world.damagesource.DamageSource
    Returns the value of the damageSource record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.world.level.Explosion
    explode(net.minecraft.world.level.Level level, double x, double y, double z)
     
    net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent>
    Returns the value of the explosionSound record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.core.particles.ParticleOptions
    Returns the value of the largeParticles record component.
    net.minecraft.world.level.Level.ExplosionInteraction
    Returns the value of the mode record component.
    Returns the value of the particles record component.
    net.minecraft.core.particles.ParticleOptions
    Returns the value of the smallParticles record component.
    net.minecraft.world.entity.Entity
    Returns the value of the source record component.
    Returns the value of the strength record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ExplosionProperties

      public ExplosionProperties(@Nullable net.minecraft.world.entity.Entity source, @Nullable net.minecraft.world.damagesource.DamageSource damageSource, @Nullable net.minecraft.world.level.ExplosionDamageCalculator damageCalculator, Optional<Float> strength, Optional<Boolean> causesFire, @Nullable net.minecraft.world.level.Level.ExplosionInteraction mode, Optional<Boolean> particles, @Nullable net.minecraft.core.particles.ParticleOptions smallParticles, @Nullable net.minecraft.core.particles.ParticleOptions largeParticles, @Nullable net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> explosionSound)
      Creates an instance of a ExplosionProperties record class.
      Parameters:
      source - the value for the source record component
      damageSource - the value for the damageSource record component
      damageCalculator - the value for the damageCalculator record component
      strength - the value for the strength record component
      causesFire - the value for the causesFire record component
      mode - the value for the mode record component
      particles - the value for the particles record component
      smallParticles - the value for the smallParticles record component
      largeParticles - the value for the largeParticles record component
      explosionSound - the value for the explosionSound record component
  • Method Details

    • explode

      public net.minecraft.world.level.Explosion explode(net.minecraft.world.level.Level level, double x, double y, double z)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • source

      @Nullable public net.minecraft.world.entity.Entity source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • damageSource

      @Nullable public net.minecraft.world.damagesource.DamageSource damageSource()
      Returns the value of the damageSource record component.
      Returns:
      the value of the damageSource record component
    • damageCalculator

      @Nullable public net.minecraft.world.level.ExplosionDamageCalculator damageCalculator()
      Returns the value of the damageCalculator record component.
      Returns:
      the value of the damageCalculator record component
    • strength

      public Optional<Float> strength()
      Returns the value of the strength record component.
      Returns:
      the value of the strength record component
    • causesFire

      public Optional<Boolean> causesFire()
      Returns the value of the causesFire record component.
      Returns:
      the value of the causesFire record component
    • mode

      @Nullable public net.minecraft.world.level.Level.ExplosionInteraction mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • particles

      public Optional<Boolean> particles()
      Returns the value of the particles record component.
      Returns:
      the value of the particles record component
    • smallParticles

      @Nullable public net.minecraft.core.particles.ParticleOptions smallParticles()
      Returns the value of the smallParticles record component.
      Returns:
      the value of the smallParticles record component
    • largeParticles

      @Nullable public net.minecraft.core.particles.ParticleOptions largeParticles()
      Returns the value of the largeParticles record component.
      Returns:
      the value of the largeParticles record component
    • explosionSound

      @Nullable public net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> explosionSound()
      Returns the value of the explosionSound record component.
      Returns:
      the value of the explosionSound record component