Jump to content

Recommended Posts

Posted

Hi again,

i have a problem with spawning particles on top of a block. I allready set the position 2 up and nothing is blocking. The block is in free position. Just to be sure. Checked it several times. The console print out is telling me, that it works and gives the right coordinated, but no particles.

Here's the part, where i try it. The block is a pedestral with tile entity, special renderer  and a rotating item on top.

 

  @Override
  public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) {
	  
	  if(!worldIn.isRemote)
	  {
		  System.out.println("spawn " + pos.getX() + " " + (pos.getY() + 2) + " " + pos.getZ());
		  worldIn.spawnParticle(EnumParticleTypes.DRAGON_BREATH, pos.getX(), pos.getY() + 2, pos.getZ(), 0, 1F, 0);
	  }
	  
	  worldIn.scheduleBlockUpdate(pos, state.getBlock(), 1, 0);
	  super.updateTick(worldIn, pos, state, rand);
  }

 

EhKXW4P.png

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.