Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.mcreator.yofaddacompat.procedures;
- import net.minecraftforge.registries.ForgeRegistries;
- import net.minecraft.world.level.LevelAccessor;
- import net.minecraft.world.level.Level;
- import net.minecraft.world.item.ItemStack;
- import net.minecraft.sounds.SoundSource;
- import net.minecraft.server.level.ServerLevel;
- import net.minecraft.resources.ResourceLocation;
- import net.minecraft.core.particles.ParticleTypes;
- import net.minecraft.core.BlockPos;
- import net.mcreator.ghostriderbyyofadda.network.GhostriderByYofaddaModVariables;
- public class RippedContractRightclickedProcedure {
- public static void execute(LevelAccessor world, double x, double y, double z, ItemStack itemstack) {
- if (world instanceof ServerLevel _level)
- _level.sendParticles(ParticleTypes.ELECTRIC_SPARK, x, y, z, 12, 1, 1, 1, 0.5);
- if (world instanceof ServerLevel _level)
- _level.sendParticles(ParticleTypes.LAVA, x, y, z, 8, 1, 1, 1, 0.5);
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.firework_rocket.large_blast")), SoundSource.PLAYERS, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.firework_rocket.large_blast")), SoundSource.PLAYERS, 1, 1, false);
- }
- }
- itemstack.shrink(1);
- GhostriderByYofaddaModVariables.PlayerVariables.RiderPossessed = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment