Package net.minecraft.world

Examples of net.minecraft.world.World.spawnEntityInWorld()


                ei.setDead();
              else
                result = ei;
            }

            if ( !w.spawnEntityInWorld( result ) )
            {
              result.setDead();
              worked = false;
            }
View Full Code Here


                    World world = player.worldObj;
                    world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

                    if (!world.isRemote)
                    {
                        world.spawnEntityInWorld(new LaunchedPotion(world, player, potion));
                    }
                    tags.removeTag("LoadedPotion");
                    tags.setBoolean("Loaded", false);
                }
                return true;
View Full Code Here

                        }
                    }
                    EntityItem entityitem = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, spawnme);

                    entityitem.delayBeforeCanPickup = 10;
                    world.spawnEntityInWorld(entityitem);
                    world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));

                    int i = spawnme.stackSize;
                    float f = FurnaceRecipes.smelting().func_151398_b(spawnme);
                    int j;
View Full Code Here

        ItemStack arrowItem = stack.splitStack(1);

        ArrowEntity projectile = new ArrowEntity(world, iposition.getX(), iposition.getY(), iposition.getZ(), arrowItem);
        projectile.canBePickedUp = 1;
        projectile.setThrowableHeading((double) enumfacing.getFrontOffsetX(), (double) ((float) enumfacing.getFrontOffsetY() + 0.1F), (double) enumfacing.getFrontOffsetZ(), this.func_82500_b(), this.func_82498_a());
        world.spawnEntityInWorld(projectile);

        return stack;
    }

    @Override
View Full Code Here

      float f3 = 0.05F;
      entityitem.motionX = (float) world.rand.nextGaussian() * f3;
      entityitem.motionY = (float) world.rand.nextGaussian() * f3 + 1.0F;
      entityitem.motionZ = (float) world.rand.nextGaussian() * f3;
      world.spawnEntityInWorld(entityitem);
    }
  }

  @Override
  public void invalidate() {
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.