Jump to content

Spawn many entitys on break block


MikeDark

Recommended Posts

Hello, i would like to spawn many entitys on break block, but could only do spawn one:

 

My onBlockDestroyedByPlayer:

 

public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5)
    {
    if (!par1World.isRemote)
    {
    	EntityCupim entitycupim = new EntityCupim(par1World);
    	entitycupim.setLocationAndAngles((double)par2 + 0.5D, (double)par3, (double)par4 + 0.5D, 0.0F, 0.0F);
	    par1World.spawnEntityInWorld(entitycupim);
	    entitycupim.spawnExplosionParticle();
    }

    super.onBlockDestroyedByPlayer(par1World, par2, par3, par4, par5);
    }

Link to comment
Share on other sites

Basic Java, if you don't know it then you shouldn't be here.

 

for (int i = 0; i < 32; i++) {
    // Spawn entity
}

 

Good friend, I would first like to thank you. I believe should treat me better, I have head full of problems and simply forgot this detail, then came to the support, to ask a simple question...

 

Well, leveraging the same topic, could help me make my block spawn randomly my termites, if not is much ...

Link to comment
Share on other sites

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.