Package net.minecraft.world

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


                createdEntity.readFromNBT(tag);
            }

            createdEntity.setLocationAndAngles(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());

            world.spawnEntityInWorld(createdEntity);
            return new ForgeEntity(createdEntity);
        } else {
            return null;
        }
    }
View Full Code Here


      }
     
      if(owner instanceof EntityLiving)
      {
        EntityRocket r = new EntityRocket(world, ((EntityLiving)owner), target);
        world.spawnEntityInWorld(r);
      }
    }
  }
}
View Full Code Here

    World world = dispenser.getWorld();
    IPosition dispenserPos = BlockDispenser.getIPositionFromBlockSource(dispenser);
    EnumFacing dispenserFacing = BlockDispenser.getFacing(dispenser.getBlockMetadata());
    EntitySafariNet proj = new EntitySafariNet(world, dispenserPos.getX(), dispenserPos.getY(), dispenserPos.getZ(), stack.copy());
    proj.setThrowableHeading(dispenserFacing.getFrontOffsetX(), dispenserFacing.getFrontOffsetY() + 0.1, dispenserFacing.getFrontOffsetZ(), 1.1F, 6.0F);
    world.spawnEntityInWorld(proj);
    stack.splitStack(1);
    return stack;
  }
 
  @Override
View Full Code Here

            world.setBlockToAir(x, y, z);
            if(ConfigHandler.blockBreakParticles)
              entity.worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));

            for(ItemStack stack_ : items)
              world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack_));
            burst.setMana(mana - 24);
          }
        }

        dead = false;
View Full Code Here

                        final EntityMeteor meteor = new EntityMeteor(world, player.posX + x, player.posY + y, player.posZ + z, motX - 2.5D, 0, motZ - 2.5D, 1);

                        if (!world.isRemote)
                        {
                            world.spawnEntityInWorld(meteor);
                        }
                    }
                }

                if (world.rand.nextInt(f * 3) == 0)
View Full Code Here

                        final EntityMeteor meteor = new EntityMeteor(world, player.posX + x, player.posY + y, player.posZ + z, motX - 2.5D, 0, motZ - 2.5D, 6);

                        if (!world.isRemote)
                        {
                            world.spawnEntityInWorld(meteor);
                        }
                    }
                }
            }
        }
View Full Code Here

                        double d = rand.nextFloat() * f + (1.0F - f) * 0.5D;
                        double d1 = rand.nextFloat() * f + (1.0F - f) * 0.5D;
                        double d2 = rand.nextFloat() * f + (1.0F - f) * 0.5D;
                        EntityItem entityitem = new EntityItem(world, hitMOP.blockX + d, hitMOP.blockY + d1, hitMOP.blockZ + d2, stack);
                        entityitem.delayBeforeCanPickup = 10;
                        world.spawnEntityInWorld(entityitem);
                    }
                    if (this.shootingEntity instanceof EntityPlayer) {
                        ((EntityPlayer) shootingEntity).addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(block)], 1);
                    }
                }
View Full Code Here

                }
                if (mob instanceof EntityLiving) {
                  ((EntityLiving)mob).onSpawnWithEgg((IEntityLivingData)null);
                }
                mob.setPosition(x, y, z);
                world.spawnEntityInWorld(mob);
                mob.spawnExplosionParticle();
            }
        }
        else
        {
View Full Code Here

          // Don't spawn friendly endermen in the end or end biome, would make them too easy to get.
          (world.provider.dimensionId != 1) &&
          (world.getBiomeGenForCoords((int)entity.posX, (int)entity.posZ) != BiomeGenBase.sky)) {
        EntityFrienderman frienderman = new EntityFrienderman(world);
        frienderman.setPositionAndRotation(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, 0);
        world.spawnEntityInWorld(frienderman);
        ItemBackpack.getBackpackData(frienderman).spawnsWithBackpack = true;
        entity.setDead();
      }
    // Otherwise, just mark it to spawn with a backpack.
    } else if (BetterStorageTiles.backpack != null)
View Full Code Here

    int i = dispenser.getXInt() + enumfacing.getFrontOffsetX();
    int j = dispenser.getYInt() + enumfacing.getFrontOffsetY();
    int k = dispenser.getZInt() + enumfacing.getFrontOffsetZ();
    EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( world, i + 0.5F, j + 0.5F,
        k + 0.5F, null );
    world.spawnEntityInWorld( primedTinyTNTEntity );
    --dispensedItem.stackSize;
    return dispensedItem;
  }

}
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.