Skip to content

Commit

Permalink
fix: aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Jun 14, 2024
1 parent f311843 commit 40dc6f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/net/zepalesque/redux/item/VeridiumItem.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.zepalesque.redux.item;

import net.minecraft.core.Holder;
import net.minecraft.nbt.ByteTag;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.protocol.game.ClientboundSoundPacket;
Expand Down Expand Up @@ -72,15 +73,15 @@ default ItemStack deplete(ItemStack stack, @Nullable LivingEntity user, int amou
stack.addTagElement(NBT_KEY, ByteTag.valueOf(infusion));
} else {
if (user != null && !user.level().isClientSide() && user instanceof ServerPlayer sp) {
sp.connection.send(new ClientboundSoundPacket(ReduxSounds.INFUSION_EXPIRE, SoundSource.PLAYERS, sp.getX(), sp.getY(), sp.getZ(), 0.8F, 0.8F + sp.level().getRandom().nextFloat() * 0.4F, sp.level().getRandom().nextLong()));
sp.connection.send(new ClientboundSoundPacket(getUninfuseSound(), SoundSource.PLAYERS, sp.getX(), sp.getY(), sp.getZ(), 0.8F, 0.8F + sp.level().getRandom().nextFloat() * 0.4F, sp.level().getRandom().nextLong()));
}
return vi.getUninfusedStack(stack);
}
}
return null;
}

default SoundEvent getUninfuseSound() {
return ReduxSounds.INFUSION_EXPIRE.get();
default Holder<SoundEvent> getUninfuseSound() {
return ReduxSounds.INFUSION_EXPIRE;
}
}

0 comments on commit 40dc6f7

Please sign in to comment.