feat: more voice

This commit is contained in:
xtex 2023-07-11 09:58:40 +08:00
parent e3cdc60d22
commit 7f49b0a84f
Signed by: xtex
GPG Key ID: B918086ED8045B91
9 changed files with 39 additions and 6 deletions

View File

@ -247,10 +247,10 @@ class ProjectedPersonEntity(entityType: EntityType<out PathfinderMob>, level: Le
return null return null
} }
override fun getSoundVolume() = super.getSoundVolume() * (random.nextFloat() * 0.5f + 0.6f) override fun getSoundVolume() = super.getSoundVolume() * (random.nextFloat() * 1.1f + 0.4f)
override fun getVoicePitch() = super.getVoicePitch() * (random.nextFloat() * 0.4f + 0.8f) override fun getVoicePitch() = super.getVoicePitch() * (random.nextFloat() * 0.55f + 0.7f)
override fun getAmbientSoundInterval() = -(160 + random.nextInt(1000 - 160)) override fun getAmbientSoundInterval() = 60 - random.nextInt(850)
} }

View File

@ -39,11 +39,9 @@ data class SwarmProjectionEffect(
level.random.nextInt(area.minY(), area.maxY()), level.random.nextInt(area.minY(), area.maxY()),
level.random.nextInt(area.minZ(), area.maxZ()), level.random.nextInt(area.minZ(), area.maxZ()),
) )
spawnPos = spawnPos.atY(level.getHeight(Heightmap.Types.WORLD_SURFACE, spawnPos.x, spawnPos.z)) spawnPos = spawnPos.atY(level.getHeight(Heightmap.Types.WORLD_SURFACE, spawnPos.x, spawnPos.z)).above()
if (level.getBlockState(spawnPos.below()).isAir) if (level.getBlockState(spawnPos.below()).isAir)
return return
if (!level.getBlockState(spawnPos).isAir)
return
ProjectedPersonEntity.entity.get().spawn(level, spawnPos, MobSpawnType.TRIGGERED) ProjectedPersonEntity.entity.get().spawn(level, spawnPos, MobSpawnType.TRIGGERED)
} }
} }

View File

@ -55,6 +55,41 @@
"name": "entity.wandering_trader.yes", "name": "entity.wandering_trader.yes",
"weight": 3, "weight": 3,
"type": "event" "type": "event"
},
{
"name": "quaedam:entity/projected_person/1",
"weight": 1,
"type": "file"
},
{
"name": "quaedam:entity/projected_person/2",
"weight": 1,
"type": "file"
},
{
"name": "quaedam:entity/projected_person/3",
"weight": 1,
"type": "file"
},
{
"name": "quaedam:entity/projected_person/3",
"weight": 1,
"type": "file"
},
{
"name": "quaedam:entity/projected_person/4",
"weight": 1,
"type": "file"
},
{
"name": "quaedam:entity/projected_person/5",
"weight": 1,
"type": "file"
},
{
"name": "quaedam:entity/projected_person/6",
"weight": 1,
"type": "file"
} }
] ]
} }