Skip to content

Instantly share code, notes, and snippets.

Created March 2, 2014 12:32
Show Gist options
  • Save anonymous/9305890 to your computer and use it in GitHub Desktop.
Save anonymous/9305890 to your computer and use it in GitHub Desktop.
Particles not working
@SubscribeEvent
public void onItemPickup(EntityItemPickupEvent event){
if(event.entityLiving instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer)event.entityLiving;
if(player.inventory.hasItem(NewItems.unstableVoidItem)){
System.out.println(event.entityLiving.posX);
double x = event.entityLiving.posX;
double y = event.entityLiving.posY;
double z = event.entityLiving.posZ;
for(int i = 0; i <= 30; i++){
event.entityPlayer.worldObj.spawnParticle("portal", x,y,z, 1D, 1D,1D);
}
event.entity.setDead();
event.setCanceled(true);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment