Guest User

Untitled

a guest
Jan 19th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. protected void entityInit() {
  2. super.entityInit();
  3. if (arrow == null) arrow = new ItemStack(Item.arrow,1);
  4. }
  5. public void onCollideWithPlayer(EntityPlayer par1EntityPlayer) {
  6. if (worldObj.isRemote) return;
  7. if (inGround && arrowShake <= 0) {
  8. if (arrow != null) {
  9. if (Math.random() < pickupChance) {
  10. EntityItem a = new EntityItem(worldObj, posX, posY, posZ, arrow);
  11. a.setVelocity(0,0,0);
  12. worldObj.spawnEntityInWorld(a);
  13. }
  14. setDead();
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment