⡶⠶⠂⠐⠲⠶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⡶⠶⡶⣶
⣗⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⠿⣿⠿⣿⣿⣿⣿⠿⠿⠿⠟⠛⠉⠁⠀⠀⠀⢠⣿ ⣿⣷⣀⠀⠈⠛⠢⠥⠴⠟⠂⠀⠀⠀⠉⣛⠉⠁⠀⠐⠲⠤⠖⠛⠁⠀⠀⣐⣿⣿ ⣿⣿⣿⣦⣄⡀⠀⠀⠀⠀⣀⡠⣤⣦⣿⣿⣿⣆⣴⣠⣀⣀⡀⣀⣀⣚⣿⣿⣿⢳ ⣧⠉⠙⢿⣿⣿⣶⣶⣾⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢇⣿ ⣿⣷⡄⠈⣿⣿⣿⣿⣯⣥⣦⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢉⣴⣿⣿ ⣿⣿⣿⣦⣘⠋⢻⠿⢿⣿⣿⣿⣾⣭⣛⣛⣛⣯⣷⣿⣿⠿⠟⠋⠉⣴⣿⣿⣿
This commit is contained in:
parent
5e3fcddd34
commit
b212959490
@ -173,6 +173,31 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
||||
level().addFreshEntity(fireball)
|
||||
}
|
||||
|
||||
fun shootMissile(math: Float) {
|
||||
if (level().isClientSide) return
|
||||
|
||||
val offset_dist = 1.4
|
||||
val viewVector = this.getViewVector(1.0F).normalize()
|
||||
val leftVec = Vec3(-viewVector.z, 0.0, viewVector.x).normalize().scale(offset_dist)
|
||||
|
||||
val gun_x = x + leftVec.x
|
||||
val gun_z = z + leftVec.z
|
||||
val gun_y = y + 1.2
|
||||
|
||||
//stfu idea i like my underscores
|
||||
|
||||
val missileX = gun_x
|
||||
val missileY = gun_y
|
||||
val missileZ = gun_z
|
||||
|
||||
val fireball = SmallFireball(level(), missileX, missileY, missileZ, viewVector)
|
||||
fireball.shootFromRotation(this, this.xRot, this.yHeadRot, 0.0F, 1.5F, 0.2F)
|
||||
fireball.setPos(missileX, missileY, missileZ)
|
||||
fireball.owner = this
|
||||
|
||||
level().addFreshEntity(fireball)
|
||||
}
|
||||
|
||||
//charge attack, could possibly leave a smoke trail too idk
|
||||
class RammingGoal(private val mob: Enforcer) : Goal() {
|
||||
private var target: LivingEntity? = null
|
||||
|
@ -1,10 +1,12 @@
|
||||
package ru.dbotthepony.mc.otm.entity
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes
|
||||
import net.minecraft.network.syncher.EntityDataAccessor
|
||||
import net.minecraft.network.syncher.EntityDataSerializers
|
||||
import net.minecraft.network.syncher.SynchedEntityData
|
||||
import net.minecraft.resources.ResourceKey
|
||||
import net.minecraft.core.registries.Registries
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import ru.dbotthepony.mc.otm.core.ResourceLocation
|
||||
import net.minecraft.world.level.storage.loot.LootTable
|
||||
import net.minecraft.sounds.SoundEvent
|
||||
@ -131,6 +133,16 @@ class Loader(type: EntityType<Loader>, level: Level) : Monster(type, level) {
|
||||
isAttacking = false
|
||||
}
|
||||
}
|
||||
|
||||
if (level() is ServerLevel && this.health <= 30.0 && tickCount % 5 == 0){
|
||||
(level() as ServerLevel).sendParticles(
|
||||
ParticleTypes.CAMPFIRE_COSY_SMOKE,
|
||||
x, y+2, z,
|
||||
1,
|
||||
0.0, 0.0, 0.0,
|
||||
0.01
|
||||
)
|
||||
}
|
||||
}
|
||||
override fun getAmbientSound(): SoundEvent {
|
||||
return MSoundEvents.LOADER_AMBIENT
|
||||
|
Loading…
Reference in New Issue
Block a user