Jump to content

Lightminer

Members
  • Posts

    2
  • Joined

  • Last visited

Lightminer's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Did, but now the function requires something called DistanceDelay at the end of the parameters. I also tried setting the player to NULL but it still isnt working
  2. Hey Recently started learning modding and ive looked all over but i cant find a specific solution to my problem. I have basic java knowledge (currently studying computer science). Here is my code: @Override public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) { if(!level.isClientSide() && hand == InteractionHand.MAIN_HAND) { level.playSound(player, player.getX(), player.getY(), player.getZ(), ModSoundEvents.WILLIAM_STICK_INTERACT.get(), SoundSource.AMBIENT, 1.0f, 1.0f); player.getCooldowns().addCooldown(this, 20); } return super.use(level, player, hand); } I want my item to play a sound everytime i press mouse button 2. But it doesnt work. The cooldown function also stops working when i havent greyed out the sound part.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.