Examples of spawnEntityInWorld()


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

    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

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

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

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

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

                    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

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

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

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

        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

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

      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

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

          ChunkCoordinates chunkcoordinates = worldserver1.getSpawnPoint();
          chunkcoordinates.posY = e.worldObj.getTopSolidOrLiquidBlock(chunkcoordinates.posX, chunkcoordinates.posZ);
          entity.setLocationAndAngles((double) chunkcoordinates.posX, (double) chunkcoordinates.posY, (double) chunkcoordinates.posZ, entity.rotationYaw, entity.rotationPitch);
        }

        worldserver1.spawnEntityInWorld(entity);
      }

      e.isDead = true;
      e.worldObj.theProfiler.endSection();
      worldserver.resetUpdateEntityTick();
View Full Code Here

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

  public static void spawn(World world, Entity entity) {
    if(entity != null) {
      MinecraftServer minecraftserver = MinecraftServer.getServer();
      WorldServer worldserver = minecraftserver.worldServerForDimension(world.provider.dimensionId);
      worldserver.spawnEntityInWorld(entity);
    }
  }

  public static void spawnTeleportEffects(World world, Entity entity) {
    PacketHandler.INSTANCE.sendToAllAround(new PacketTeleportEffects(entity), new TargetPoint(world.provider.dimensionId, entity.posX, entity.posY,
View Full Code Here

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

      int z = transciever.zCoord + randOffset(2);
      Block b = world.getBlock(x, y, z);
      entity.setPosition(x + 0.5, entity.posY, z + 0.5);
      if(world.canPlaceEntityOnSide(b, x, y, z, false, ForgeDirection.UP.ordinal(), entity, null)) {
        resetForRandomRandomSpawn(entity);
        if(worldserver.spawnEntityInWorld(entity)) {
          //entity.onUpdate();
          worldserver.updateEntity(entity);
          return;
        }
      }
View Full Code Here

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

        }
      }
    }
    entity.setPosition(oX, entity.posY, oZ);
    resetForRandomRandomSpawn(entity);
    worldserver.spawnEntityInWorld(entity);
  }

  private void resetForRandomRandomSpawn(Entity entity) {
    CartLinkUtil.breakLinks(transciever.getWorldObj(), entity);
    entity.riddenByEntity = 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.