Jump to content

Sound doesn't play in updateTick


gluszak

Recommended Posts

 

package gluszak.minecraft.pedowiewiur;

import java.util.Random;
import net.minecraft.src.Block;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Material;
import net.minecraft.src.World;

public class BlockDuba extends GenericBlock{

    public BlockDuba(int id, int texture, Material material)
    {
        super(id, texture, material);
    }
    

   
    public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
    {
	par1World.playSound(par2, par3, par4, "step.grass", 100f, 0f);
	par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, 100);
    	return true;
    }
    
    
    
    public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
	par1World.playSound(par2, par3, par4, "step.grass", 100f, 0f);
	System.out.println("asd");
    }
    
}

 

 

"asd" shows up but sound plays only once

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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