Package dev.latvian.mods.kubejs.level
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
ConstructorsConstructorDescriptionExplosionProperties(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 aExplosionPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecausesFirerecord component.net.minecraft.world.level.ExplosionDamageCalculatorReturns the value of thedamageCalculatorrecord component.net.minecraft.world.damagesource.DamageSourceReturns the value of thedamageSourcerecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.level.Explosionexplode(net.minecraft.world.level.Level level, double x, double y, double z) net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> Returns the value of theexplosionSoundrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.core.particles.ParticleOptionsReturns the value of thelargeParticlesrecord component.net.minecraft.world.level.Level.ExplosionInteractionmode()Returns the value of themoderecord component.Returns the value of theparticlesrecord component.net.minecraft.core.particles.ParticleOptionsReturns the value of thesmallParticlesrecord component.net.minecraft.world.entity.Entitysource()Returns the value of thesourcerecord component.strength()Returns the value of thestrengthrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aExplosionPropertiesrecord class.- Parameters:
source- the value for thesourcerecord componentdamageSource- the value for thedamageSourcerecord componentdamageCalculator- the value for thedamageCalculatorrecord componentstrength- the value for thestrengthrecord componentcausesFire- the value for thecausesFirerecord componentmode- the value for themoderecord componentparticles- the value for theparticlesrecord componentsmallParticles- the value for thesmallParticlesrecord componentlargeParticles- the value for thelargeParticlesrecord componentexplosionSound- the value for theexplosionSoundrecord component
-
-
Method Details
-
explode
public net.minecraft.world.level.Explosion explode(net.minecraft.world.level.Level level, double x, double y, double z) -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
source
@Nullable public net.minecraft.world.entity.Entity source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
damageSource
@Nullable public net.minecraft.world.damagesource.DamageSource damageSource()Returns the value of thedamageSourcerecord component.- Returns:
- the value of the
damageSourcerecord component
-
damageCalculator
@Nullable public net.minecraft.world.level.ExplosionDamageCalculator damageCalculator()Returns the value of thedamageCalculatorrecord component.- Returns:
- the value of the
damageCalculatorrecord component
-
strength
Returns the value of thestrengthrecord component.- Returns:
- the value of the
strengthrecord component
-
causesFire
Returns the value of thecausesFirerecord component.- Returns:
- the value of the
causesFirerecord component
-
mode
@Nullable public net.minecraft.world.level.Level.ExplosionInteraction mode()Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
particles
Returns the value of theparticlesrecord component.- Returns:
- the value of the
particlesrecord component
-
smallParticles
@Nullable public net.minecraft.core.particles.ParticleOptions smallParticles()Returns the value of thesmallParticlesrecord component.- Returns:
- the value of the
smallParticlesrecord component
-
largeParticles
@Nullable public net.minecraft.core.particles.ParticleOptions largeParticles()Returns the value of thelargeParticlesrecord component.- Returns:
- the value of the
largeParticlesrecord component
-
explosionSound
@Nullable public net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> explosionSound()Returns the value of theexplosionSoundrecord component.- Returns:
- the value of the
explosionSoundrecord component
-