Examples of worldServerForDimension()


Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

      message.player = TTClientProxy.getPlayer();
    else {
      message.player = ctx.getServerHandler().playerEntity;
    }
    if (server != null) {
      World world = server.worldServerForDimension(message.dim);

      if (world == null) {
        MiscHelper.printCurrentStackTrace("No world found for dimension " + message.dim + "!");
        return null;
      }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

  public void travelToDimension(int par1, Entity e) {
    if (!e.worldObj.isRemote && !e.isDead) {
      e.worldObj.theProfiler.startSection("changeDimension");
      MinecraftServer minecraftserver = MinecraftServer.getServer();
      int j = e.dimension;
      WorldServer worldserver = minecraftserver.worldServerForDimension(j);
      WorldServer worldserver1 = minecraftserver.worldServerForDimension(par1);
      e.dimension = par1;

      if (j == 1 && par1 == 1) {
        worldserver1 = minecraftserver.worldServerForDimension(0);
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

    if (!e.worldObj.isRemote && !e.isDead) {
      e.worldObj.theProfiler.startSection("changeDimension");
      MinecraftServer minecraftserver = MinecraftServer.getServer();
      int j = e.dimension;
      WorldServer worldserver = minecraftserver.worldServerForDimension(j);
      WorldServer worldserver1 = minecraftserver.worldServerForDimension(par1);
      e.dimension = par1;

      if (j == 1 && par1 == 1) {
        worldserver1 = minecraftserver.worldServerForDimension(0);
        e.dimension = 0;
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

      WorldServer worldserver = minecraftserver.worldServerForDimension(j);
      WorldServer worldserver1 = minecraftserver.worldServerForDimension(par1);
      e.dimension = par1;

      if (j == 1 && par1 == 1) {
        worldserver1 = minecraftserver.worldServerForDimension(0);
        e.dimension = 0;
      }

      e.worldObj.removeEntity(e);
      e.isDead = false;
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

    int toX = reciever.xCoord;
    int toY = reciever.yCoord + 1;
    int toZ = reciever.zCoord;

    MinecraftServer minecraftserver = MinecraftServer.getServer();
    WorldServer worldserver1 = minecraftserver.worldServerForDimension(toDimension);
    EntityMinecart newCart = (EntityMinecart) EntityList.createEntityByName(EntityList.getEntityString(cart), worldserver1);
    if(newCart == null) {
      return null;
    }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

        cont.setInventorySlotContents(i, null);
      }
    }

    MinecraftServer minecraftserver = MinecraftServer.getServer();
    WorldServer worldserver = minecraftserver.worldServerForDimension(world.provider.dimensionId);

    Entity passenger = cart.riddenByEntity;
    if(passenger != null && !(passenger instanceof EntityPlayer)) {
      worldserver.removeEntity(passenger);
      passenger.isDead = true;
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

  }

  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) {
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

    }
    double oX = entity.posX;
    double oZ = entity.posZ;
    World world = transciever.getWorldObj();
    MinecraftServer minecraftserver = MinecraftServer.getServer();
    WorldServer worldserver = minecraftserver.worldServerForDimension(world.provider.dimensionId);
    for (int i = 0; i < 4; i++) {
      int x = transciever.xCoord + randOffset(2);
      int y = transciever.yCoord + 1;
      int z = transciever.zCoord + randOffset(2);
      Block b = world.getBlock(x, y, z);
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

    if(server == null)
      return Blocks.air;

    String[] tokens = key.split(":");
    int worldId = Integer.parseInt(tokens[0]), x = Integer.parseInt(tokens[1]), y = Integer.parseInt(tokens[2]), z = Integer.parseInt(tokens[3]);
    World world = server.worldServerForDimension(worldId);
    return world.getBlock(x, y, z);
  }

  static int getBlockMetaAt(String key) {
    MinecraftServer server = MinecraftServer.getServer();
View Full Code Here

Examples of net.minecraft.server.MinecraftServer.worldServerForDimension()

    if(server == null)
      return 0;

    String[] tokens = key.split(":");
    int worldId = Integer.parseInt(tokens[0]), x = Integer.parseInt(tokens[1]), y = Integer.parseInt(tokens[2]), z = Integer.parseInt(tokens[3]);
    World world = server.worldServerForDimension(worldId);
    return world.getBlockMetadata(x, y, z);
  }

  @Override
  public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side) {
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.