Jump to content

[1.8] Particle not showing up.


Warix

Recommended Posts

Hello , when i try to summon particle it doesn't show up. I tried with different particles but none work, also i checked coordinates and they were ok. So i don't really understand what is problem here.

Code where I spawn them:

 

public class ForgeEvents

{

@SubscribeEvent

public void LivingHurtEvent(LivingHurtEvent event)

{

if(EntityExtendedProperties.get(event.entityLiving).isFrozen())

{

event.entityLiving.worldObj.playSoundAtEntity(event.entityLiving, "dig.glass", 1, 1);

event.entityLiving.worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ+ 1, 0, 0, 0);

event.entityLiving.setDead();

}

}

}

 

 

I also tried from client side events and it didn't work there too. But sound works, so that code gets executed too.

:D
Link to comment
Share on other sites

I tried like this:

 

@SubscribeEvent

public void LivingHurtEvent(LivingHurtEvent event)

{

if(EntityExtendedProperties.get(event.entityLiving).isFrozen())

{

WorldServer server = (WorldServer) event.entityLiving.worldObj;

event.entityLiving.worldObj.playSoundAtEntity(event.entityLiving, "dig.glass", 1, 1);

server.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ+ 1, 0, 0, 0);

event.entityLiving.setDead();

}

}

}

 

But it didn't work.

:D
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.