Skip to content

Commit 7552a62

Browse files
committed
Add eyezor sounds
1 parent 4ede5d2 commit 7552a62

File tree

8 files changed

+35
-0
lines changed

8 files changed

+35
-0
lines changed

src/main/java/de/ellpeck/nyx/entity/NyxEntityEyezor.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
import net.minecraft.network.datasync.DataParameter;
1313
import net.minecraft.network.datasync.DataSerializers;
1414
import net.minecraft.network.datasync.EntityDataManager;
15+
import net.minecraft.util.DamageSource;
1516
import net.minecraft.util.ResourceLocation;
1617
import net.minecraft.util.SoundCategory;
18+
import net.minecraft.util.SoundEvent;
1719
import net.minecraft.world.World;
1820

1921
import javax.annotation.Nonnull;
22+
import javax.annotation.Nullable;
2023

2124
public class NyxEntityEyezor extends EntityZombie implements IRangedAttackMob {
2225
public static final DataParameter<Integer> TYPE = EntityDataManager.createKey(NyxEntityEyezor.class, DataSerializers.VARINT);
@@ -89,6 +92,23 @@ public void attackEntityWithRangedAttack(EntityLivingBase target, float distance
8992

9093
@Override
9194
public void setSwingingArms(boolean swingingArms) {
95+
}
96+
97+
@Nullable
98+
@Override
99+
protected SoundEvent getAmbientSound() {
100+
return null;
101+
}
102+
103+
@Nonnull
104+
@Override
105+
protected SoundEvent getHurtSound(DamageSource damageSource) {
106+
return NyxSoundEvents.ENTITY_EYEZOR_HURT.getSoundEvent();
107+
}
92108

109+
@Nonnull
110+
@Override
111+
protected SoundEvent getDeathSound() {
112+
return NyxSoundEvents.ENTITY_EYEZOR_DEATH.getSoundEvent();
93113
}
94114
}

src/main/java/de/ellpeck/nyx/init/NyxSoundEvents.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public enum NyxSoundEvents {
2626
ENTITY_ALIEN_CREEPER_IDLE("entity.alien_creeper.idle"),
2727
ENTITY_ALIEN_KITTY_IDLE("entity.alien_kitty.idle"),
2828
ENTITY_COMET_KITTY_IDLE("entity.comet_kitty.idle"),
29+
ENTITY_EYEZOR_DEATH("entity.eyezor.death"),
30+
ENTITY_EYEZOR_HURT("entity.eyezor.hurt"),
2931
ENTITY_METEOR_FALLING("entity.meteor.falling"),
3032
ENTITY_METEOR_IMPACT_FAR("entity.meteor.impact.far"),
3133
ENTITY_METEOR_IMPACT("entity.meteor.impact"),

src/main/resources/assets/nyx/sounds.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@
134134
"nyx:entity/comet_kitty/idle5"
135135
]
136136
},
137+
"entity.eyezor.death": {
138+
"sounds": [
139+
"nyx:entity/eyezor/death"
140+
]
141+
},
142+
"entity.eyezor.hurt": {
143+
"sounds": [
144+
"nyx:entity/eyezor/hurt1",
145+
"nyx:entity/eyezor/hurt2",
146+
"nyx:entity/eyezor/hurt3",
147+
"nyx:entity/eyezor/hurt4"
148+
]
149+
},
137150
"entity.meteor.falling": {
138151
"sounds": [
139152
"nyx:entity/meteor/falling_loop"
13.8 KB
Binary file not shown.
9.21 KB
Binary file not shown.
9.66 KB
Binary file not shown.
7.44 KB
Binary file not shown.
8.98 KB
Binary file not shown.

0 commit comments

Comments
 (0)