Posted September 21, 201510 yr 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.
September 21, 201510 yr Author 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.
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.