Package net.minecraft.src

Examples of net.minecraft.src.EntityItem


      TileEntityCraftingTableII theTile = (TileEntityCraftingTableII) par1World.getBlockTileEntity(par2, par3, par4);
      for (int i=0; i < theTile.getSizeInventory()-1; i++)
    {
      if (theTile.getStackInSlot(i) != null)
      {
        EntityItem theItem = new EntityItem(par1World, par2, par3, par4, theTile.getStackInSlot(i));
        par1World.spawnEntityInWorld(theItem);
      }
       
    }
      super.onBlockRemoval(par1World, par2, par3, par4);
View Full Code Here


      );
      int removedDrops = 0;
      for(int entityIndex = 0; entityIndex < nearbyEntities.size(); entityIndex++) {
         Entity entity = (Entity)nearbyEntities.get(entityIndex);
         if(entity instanceof EntityItem) {
            EntityItem entityItem = (EntityItem)entity;
            if(entityItem.age >= 0) {
               player.getWorld().getMinecraftWorld().removeEntity(entityItem);
               removedDrops++;
            }
         }
View Full Code Here

      // if(rand.nextInt(10) < 2) {
      // int x = rand.nextInt(ItemShout.shoutNames.length);
      // worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY,
      // posZ, new ItemStack(mod_Dragon.shoutId, 1, x)));
      // }
      worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY,
          posZ, new ItemStack(mod_Dragon.scaleId,
              rand.nextInt(4) + 2, 0)));
      onEntityDeath();
      setDead();
    }
View Full Code Here

    if (Utils.addToRandomPipeEntry(this, Orientations.Unknown, stack) && stack.stackSize <= 0) return;
    float f = world.rand.nextFloat() * 0.8F + 0.1F;
    float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
    float f2 = world.rand.nextFloat() * 0.8F + 0.1F;

    EntityItem entityitem = new EntityItem(world, xCoord + f, yCoord + f1 + 0.5F, zCoord + f2, stack);
    float f3 = 0.05F;
    entityitem.motionX = (float) world.rand.nextGaussian() * f3;
    entityitem.motionY = (float) world.rand.nextGaussian() * f3 + 0.2F;
    entityitem.motionZ = (float) world.rand.nextGaussian() * f3;
    world.spawnEntityInWorld(entityitem);
 
View Full Code Here

TOP

Related Classes of net.minecraft.src.EntityItem

Copyright © 2018 www.massapicom. 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.