Examples of spawnEntityInWorld()


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

    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);
  }

 
  @Override
  public int powerRequest() {
View Full Code Here

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

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

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

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

    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

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

            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

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

                        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

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

                        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

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

                        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

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

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

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

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