Skip to content

Commit

Permalink
entity sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaupenjoe committed Dec 8, 2024
1 parent b26b1b9 commit 814c0c7
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.*;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
Expand Down Expand Up @@ -124,4 +127,24 @@ public SpawnGroupData finalizeSpawn(ServerLevelAccessor level, DifficultyInstanc
this.setVariant(variant);
return super.finalizeSpawn(level, difficulty, spawnType, spawnGroupData);
}

/* SOUNDS */

@Nullable
@Override
protected SoundEvent getAmbientSound() {
return SoundEvents.PANDA_AMBIENT;
}

@Nullable
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
return SoundEvents.FROG_HURT;
}

@Nullable
@Override
protected SoundEvent getDeathSound() {
return SoundEvents.BAT_DEATH;
}
}

0 comments on commit 814c0c7

Please sign in to comment.