Merge pull request #2 from magneticflux-/1.17

Use standard `SoundEvent` instance for correct `Registry` behavior
This commit is contained in:
Andrew Lalis 2021-08-06 13:16:51 +02:00 committed by GitHub
commit 3f00e27b0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import net.minecraft.entity.MovementType;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.vehicle.AbstractMinecartEntity; import net.minecraft.entity.vehicle.AbstractMinecartEntity;
import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents;
import net.minecraft.state.property.Properties; import net.minecraft.state.property.Properties;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.DyeColor; import net.minecraft.util.DyeColor;
@ -156,7 +156,7 @@ public abstract class AbstractMinecartMixin extends Entity {
if (this.hasPlayerRider()) { if (this.hasPlayerRider()) {
PlayerEntity player = (PlayerEntity) this.getFirstPassenger(); PlayerEntity player = (PlayerEntity) this.getFirstPassenger();
if (player != null) { if (player != null) {
player.playSound(new SoundEvent(new Identifier("block.note_block.bell")), SoundCategory.PLAYERS, 1.0f, 1.0f); player.playSound(SoundEvents.BLOCK_NOTE_BLOCK_BELL, SoundCategory.PLAYERS, 1.0f, 1.0f);
} }
} }
return true; return true;