Using an Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice
Using an Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice, once from the logical server and once from the client.
Steps to reproduce:
- Apply the attached resource pack. It replaces the sound with the pig and wolf death sounds to be more audibly distinct.
- Enter a world with strongholds enabled.
- Give yourself an Eye of Ender.
- Use the Eye of Ender.
- Notice how two sounds play instead of one. Note: due to the randomness in pitch in one of the two invoked sound events, as well as the randomness of sound definitions, you may hear slightly different sounds every time you use the item.
Code analysis:
The net.minecraft.world.item.EnderEyeItem::use method contains the following:
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionHand) { // ... if (/* ... */) { // ... } else { // ... if (level instanceof ServerLevel) { // ... if (blockPos != null) { // ... level.playSound((Player)null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); level.levelEvent((Player)null, 1003, player.blockPosition(), 0); // ... } } // ... } }
The first instance is played directly from the item by the playSound method above. Note that it always does this on the logical server because of the instanceof check earlier in the method. The second instance is played on the client later in the LevelRenderer::levelEvent method:
public void levelEvent(int i, BlockPos blockPos, int j) { // ... switch (i) { // ... case 1003: this.level.playLocalSound(blockPos, SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 1.0F, 1.2F, false); break; // ... } }
Created Issue:
Using and Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice
Using and Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice, once from the logical server and once from the client.
Steps to reproduce:
- Apply the attached resource pack. It replaces the sound with the pig and wolf death sounds to be more audibly distinct.
- Enter a world with strongholds enabled.
- Give yourself an Eye of Ender.
- Use the Eye of Ender.
- Notice how two sounds play instead of one. Note: due to the randomness in pitch in one of the two invoked sound events, as well as the randomness of sound definitions, you may hear slightly different sounds every time you use the item.
Code analysis:
The net.minecraft.world.item.EnderEyeItem::use method contains the following:public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionHand) { // ... if (/* ... */) { // ... } else { // ... if (level instanceof ServerLevel) { // ... if (blockPos != null) { // ... level.playSound((Player)null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); level.levelEvent((Player)null, 1003, player.blockPosition(), 0); // ... } } // ... } }The first instance is played directly from the item by the playSound method above. Note that it always does this on the logical server because of the instanceof check earlier in the method. The second instance is played on the client later in the LevelRenderer::levelEvent method:
public void levelEvent(int i, BlockPos blockPos, int j) { // ... switch (i) { // ... case 1003: this.level.playLocalSound(blockPos, SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 1.0F, 1.2F, false); break; // ... } }
Using an
dEye of Ender plays the minecraft:entity.ender_eye.launch sound event twice, once from the logical server and once from the client.Steps to reproduce:
- Apply the attached resource pack. It replaces the sound with the pig and wolf death sounds to be more audibly distinct.
- Enter a world with strongholds enabled.
- Give yourself an Eye of Ender.
- Use the Eye of Ender.
- Notice how two sounds play instead of one. Note: due to the randomness in pitch in one of the two invoked sound events, as well as the randomness of sound definitions, you may hear slightly different sounds every time you use the item.
Code analysis:
The net.minecraft.world.item.EnderEyeItem::use method contains the following:public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionHand) { // ... if (/* ... */) { // ... } else { // ... if (level instanceof ServerLevel) { // ... if (blockPos != null) { // ... level.playSound((Player)null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); level.levelEvent((Player)null, 1003, player.blockPosition(), 0); // ... } } // ... } }The first instance is played directly from the item by the playSound method above. Note that it always does this on the logical server because of the instanceof check earlier in the method. The second instance is played on the client later in the LevelRenderer::levelEvent method:
public void levelEvent(int i, BlockPos blockPos, int j) { // ... switch (i) { // ... case 1003: this.level.playLocalSound(blockPos, SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 1.0F, 1.2F, false); break; // ... } }
Using and Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice
Using adEye of Ender plays the minecraft:entity.ender_eye.launch sound event twiceUsing an Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice
Using an Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice, once from the logical server and once from the client.
Steps to reproduce:
- Apply the attached resource pack. It replaces the sound with the pig and wolf death sounds to be more audibly distinct.
- Enter a world with strongholds enabled.
- Give yourself an Eye of Ender.
- Use the Eye of Ender.
- Notice how two sounds play instead of one. Note: due to the randomness in pitch in one of the two invoked sound events, as well as the randomness of sound definitions, you may hear slightly different sounds every time you use the item.
Code analysis:
The net.minecraft.world.item.EnderEyeItem::use method contains the following:public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionHand) { // ... if (/* ... */) { // ... } else { // ... if (level instanceof ServerLevel) { // ... if (blockPos != null) { // ... level.playSound((Player)null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); level.levelEvent((Player)null, 1003, player.blockPosition(), 0); // ... } } // ... } }The first instance is played directly from the item by the playSound method above. Note that it always does this on the logical server because of the instanceof check earlier in the method. The second instance is played on the client later in the LevelRenderer::levelEvent method:
public void levelEvent(int i, BlockPos blockPos, int j) { // ... switch (i) { // ... case 1003: this.level.playLocalSound(blockPos, SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 1.0F, 1.2F, false); break; // ... } }Using an Eye of Ender plays the minecraft:entity.ender_eye.launch sound event twice, once from the logical server and once from the client.
Steps to reproduce:
- Apply the attached resource pack. It replaces the sound with the pig and wolf death sounds to be more audibly distinct.
- Enter a world with strongholds enabled.
- Give yourself an Eye of Ender.
- Use the Eye of Ender.
- Notice how two sounds play instead of one. Note: due to the randomness in pitch in one of the two invoked sound events, as well as the randomness of sound definitions, you may hear slightly different sounds every time you use the item.
Code analysis:
The net.minecraft.world.item.EnderEyeItem::use method contains the following:
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionHand) { // ... if (/* ... */) { // ... } else { // ... if (level instanceof ServerLevel) { // ... if (blockPos != null) { // ... level.playSound((Player)null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); level.levelEvent((Player)null, 1003, player.blockPosition(), 0); // ... } } // ... } }The first instance is played directly from the item by the playSound method above. Note that it always does this on the logical server because of the instanceof check earlier in the method. The second instance is played on the client later in the LevelRenderer::levelEvent method:
public void levelEvent(int i, BlockPos blockPos, int j) { // ... switch (i) { // ... case 1003: this.level.playLocalSound(blockPos, SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 1.0F, 1.2F, false); break; // ... } }
Ever since MC-267154 was fixed, the sound for throwing an eye of ender is too low-pitched (0.5 factor instead of 1, like eggs and snowballs) due to a smartness issue in the game.
If you wish to reproduce this issue, throw an eye of ender and listen to the sound. This issues did not occur before 24w18a.
Can confirm in/for 1.20.3 Release Candidate 1
Can confirm in/for 1.20.3