Examples of onCollideWithPlayer()


Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

            world.setBlock(x, y, z, this, meta - 4, 3);
            EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(NContent.berryItem, 1, meta - 12));
            world.spawnEntityInWorld(entityitem);
            if (!(player instanceof FakePlayer))
                entityitem.onCollideWithPlayer(player);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

            if (meta == 8)
            {
                world.setBlock(x, y, z, this, 6, 3);
                EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(NContent.plantItem, 1, 3));
                world.spawnEntityInWorld(entityitem);
                entityitem.onCollideWithPlayer(player);
            }
        }
    }

    /* Right-click harvests berries */
 
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

                return true;

            world.setBlock(x, y, z, this, 6, 3);
            EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(NContent.plantItem, 1, 3));
            world.spawnEntityInWorld(entityitem);
            entityitem.onCollideWithPlayer(player);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

            if (meta >= 12)
            {
                world.setBlock(x, y, z, this, meta - 4, 3);
                EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(NContent.netherBerryItem, 1, meta - 12));
                world.spawnEntityInWorld(entityitem);
                entityitem.onCollideWithPlayer(player);
            }
        }
    }

    /* Right-click harvests berries */
 
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

                return true;

            world.setBlock(x, y, z, this, meta - 4, 3);
            EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(NContent.netherBerryItem, 1, meta - 12));
            world.spawnEntityInWorld(entityitem);
            entityitem.onCollideWithPlayer(player);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

            {
                world.setBlock(x, y, z, this, meta - 4, 3);
                EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(NContent.berryItem, 1, meta - 12));
                world.spawnEntityInWorld(entityitem);
                if (!(player instanceof FakePlayer))
                    entityitem.onCollideWithPlayer(player);
            }
        }
    }

    /* Right-click harvests berries */
 
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

      EntityItem drop = new EntityItem(world, player.posX,
          player.posY - 1.0, player.posZ, new ItemStack(
              this.getCropItem(), 1, 0));
      // spawn the drop, then force collide it with the player
      world.spawnEntityInWorld(drop);
      drop.onCollideWithPlayer(player);

      // revert the meta on the block to our regrow stage
      doRegrow(world, x, y, z, growth);
      return true;
    }
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem.onCollideWithPlayer()

        if (!player.worldObj.isRemote)
        {
            EntityItem entityitem = new EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, stack);
            player.worldObj.spawnEntityInWorld(entityitem);
            if (!(player instanceof FakePlayer))
                entityitem.onCollideWithPlayer(player);
        }

    }

    /* Ranged weapons */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.