physics

package
v0.0.0-...-18e7427 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Explosion

type Explosion struct {
	// The position of the explosion
	Position maths.Vec3d
	// Strength of the explosion
	Strength ExplosionStrength
}

func (Explosion) CalculateDamage

func (e Explosion) CalculateDamage(pos maths.Vec3d, entity core.EntityLiving, world *world.World, explosionType ExplosionStrength) float64

func (Explosion) GetAffectedEntities

func (e Explosion) GetAffectedEntities() []maths.Vec3d

type ExplosionStrength

type ExplosionStrength float64
const (
	EndCrystal     ExplosionStrength = 6.0
	ChargedCreeper ExplosionStrength = 6.0
	Bed            ExplosionStrength = 5.0
	TNT            ExplosionStrength = 4.0
	Creeper        ExplosionStrength = 3.0
	WitherSkull    ExplosionStrength = 1.0
	Fireball       ExplosionStrength = 1.0
)

func (ExplosionStrength) GetExplosionRadius

func (e ExplosionStrength) GetExplosionRadius() float64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL