Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Mod.EventBusSubscriber(Dist.CLIENT)
- public class PlaySoundClass {
- private final ClientPlayerEntity player;
- public PlaySoundClass(ClientPlayerEntity player) {
- this.player = player;
- }
- @SubscribeEvent
- public void tick() {
- if (player.getHeldItemMainhand().getItem() == ItemList.blue_lightsaber) {
- this.player.playSound(SoundEvents.AMBIENT_CAVE, 1.0F, 1.0F);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement