|
5 | 5 | import net.kaupenjoe.tutorialmod.sound.ModSounds; |
6 | 6 | import net.minecraft.client.gui.screens.Screen; |
7 | 7 | import net.minecraft.client.multiplayer.ClientLevel; |
| 8 | +import net.minecraft.core.particles.BlockParticleOption; |
| 9 | +import net.minecraft.core.particles.ParticleTypes; |
8 | 10 | import net.minecraft.network.chat.Component; |
9 | 11 | import net.minecraft.server.level.ServerLevel; |
10 | 12 | import net.minecraft.sounds.SoundEvents; |
@@ -51,6 +53,14 @@ public InteractionResult useOn(UseOnContext context) { |
51 | 53 |
|
52 | 54 | level.playSound(null, context.getClickedPos(), ModSounds.CHISEL_USE.get(), SoundSource.BLOCKS); |
53 | 55 |
|
| 56 | + ((ServerLevel) level).sendParticles(new BlockParticleOption(ParticleTypes.BLOCK, clickedBlock.defaultBlockState()), |
| 57 | + context.getClickedPos().getX() + 0.5, context.getClickedPos().getY() + 1.0, |
| 58 | + context.getClickedPos().getZ() + 0.5, 5, 0, 0, 0, 1); |
| 59 | + |
| 60 | + ((ServerLevel) level).sendParticles(ParticleTypes.DOLPHIN, |
| 61 | + context.getClickedPos().getX() + 0.5, context.getClickedPos().getY() + 1.5, |
| 62 | + context.getClickedPos().getZ() + 0.5, 5, 0, 0, 0, 3); |
| 63 | + |
54 | 64 | context.getItemInHand().set(ModDataComponents.COORDINATES, context.getClickedPos()); |
55 | 65 | } |
56 | 66 | } |
|
0 commit comments