Firefly sounds
This commit is contained in:
parent
70e9813002
commit
be7fdf20e6
8 changed files with 44 additions and 16 deletions
|
@ -23,12 +23,15 @@ import net.minecraft.entity.mob.MobEntity;
|
|||
import net.minecraft.entity.passive.AnimalEntity;
|
||||
import net.minecraft.entity.passive.PassiveEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.registry.EntityRegistry;
|
||||
import ru.betterend.registry.SoundRegistry;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class EntityDragonfly extends AnimalEntity implements Flutterer {
|
||||
public EntityDragonfly(EntityType<EntityDragonfly> entityType, World world) {
|
||||
|
@ -104,6 +107,16 @@ public class EntityDragonfly extends AnimalEntity implements Flutterer {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEvent getAmbientSound() {
|
||||
return SoundRegistry.ENTITY_DRAGONFLY;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getSoundVolume() {
|
||||
return MHelper.randRange(0.25F, 0.5F, random);
|
||||
}
|
||||
|
||||
class DragonflyLookControl extends LookControl {
|
||||
DragonflyLookControl(MobEntity entity) {
|
||||
super(entity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue