Created
March 2, 2014 12:32
-
-
Save anonymous/9305890 to your computer and use it in GitHub Desktop.
Particles not working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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