Mule .java

net.minecraft.world.entity.animal.equine.Mule (class, 59 lines): members: playChestEquipsSound, playJumpSound, getAngrySound, getEatingSound, getHurtSound.

net.minecraft.world.entity.animal.equineclass59 linescommonextends AbstractChestedHorse1.5 KB

API Surface (7)

SoundEvent getAmbientSound()
SoundEvent getAngrySound()
SoundEvent getDeathSound()
SoundEvent getEatingSound()
SoundEvent getHurtSound(final DamageSource source)
void playJumpSound()
void playChestEquipsSound()

Full Source

Mule.java59 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.entity.animal.equine;
2
3
import net.minecraft.server.level.ServerLevel;
4
import net.minecraft.sounds.SoundEvent;
5
import net.minecraft.sounds.SoundEvents;
6
import net.minecraft.world.damagesource.DamageSource;
7
import net.minecraft.world.entity.AgeableMob;
8
import net.minecraft.world.entity.EntitySpawnReason;
9
import net.minecraft.world.entity.EntityType;
10
import net.minecraft.world.entity.EntityTypes;
11
import net.minecraft.world.level.Level;
12
import org.jspecify.annotations.Nullable;
13
14
public class Mule extends AbstractChestedHorse {
15
	public Mule(final EntityType<? extends Mule> type, final Level level) {
16
		super(type, level);
17
	}
18
19
	@Override
20
	protected SoundEvent getAmbientSound() {
21
		return SoundEvents.MULE_AMBIENT;
22
	}
23
24
	@Override
25
	protected SoundEvent getAngrySound() {
26
		return SoundEvents.MULE_ANGRY;
27
	}
28
29
	@Override
30
	protected SoundEvent getDeathSound() {
31
		return SoundEvents.MULE_DEATH;
32
	}
33
34
	@Override
35
	protected SoundEvent getEatingSound() {
36
		return SoundEvents.MULE_EAT;
37
	}
38
39
	@Override
40
	protected SoundEvent getHurtSound(final DamageSource source) {
41
		return SoundEvents.MULE_HURT;
42
	}
43
44
	@Override
45
	protected void playJumpSound() {
46
		this.playSound(SoundEvents.MULE_JUMP, 0.4F, 1.0F);
47
	}
48
49
	@Override
50
	protected void playChestEquipsSound() {
51
		this.playSound(SoundEvents.MULE_CHEST, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
52
	}
53
54
	@Override
55
	public @Nullable AgeableMob getBreedOffspring(final ServerLevel level, final AgeableMob partner) {
56
		return EntityTypes.MULE.create(level, EntitySpawnReason.BREEDING);
57
	}
58
}
59

Decompiled Minecraft 26.3 source of Mule (net/minecraft/world/entity/animal/equine/Mule.java) with Mojang official mappings, stored verbatim on the site.