Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void entityInit() {
- super.entityInit();
- if (arrow == null) arrow = new ItemStack(Item.arrow,1);
- }
- public void onCollideWithPlayer(EntityPlayer par1EntityPlayer) {
- if (worldObj.isRemote) return;
- if (inGround && arrowShake <= 0) {
- if (arrow != null) {
- if (Math.random() < pickupChance) {
- EntityItem a = new EntityItem(worldObj, posX, posY, posZ, arrow);
- a.setVelocity(0,0,0);
- worldObj.spawnEntityInWorld(a);
- }
- setDead();
- }
- }
- }
Add Comment
Please, Sign In to add comment