Package net.minecraft.world

Examples of net.minecraft.world.World


    GL11.glPushMatrix();
    GL11.glTranslated(pos.posX - RenderManager.renderPosX, pos.posY - RenderManager.renderPosY, pos.posZ - RenderManager.renderPosZ + 1);
    Color colorRGB = new Color(color);
    GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 255);

    World world = Minecraft.getMinecraft().theWorld;
    Block block = world.getBlock(pos.posX, pos.posY, pos.posZ);
    drawWireframe : {
      if(block != null) {
        AxisAlignedBB axis;

        if(block instanceof IWireframeAABBProvider)
View Full Code Here


  private static final String PREFIX = EnumChatFormatting.GREEN + "[Botania] " + EnumChatFormatting.RESET;

  @SubscribeEvent
  public void onDrawDebugText(RenderGameOverlayEvent.Text event) {
    World world = Minecraft.getMinecraft().theWorld;
    if(Minecraft.getMinecraft().gameSettings.showDebugInfo) {
      event.left.add(null);
      event.left.add(PREFIX + "pS: " + ParticleRenderDispatcher.sparkleFxCount + ", pFS: " + ParticleRenderDispatcher.fakeSparkleFxCount + ", pW: " + ParticleRenderDispatcher.wispFxCount + ", pDIW: " + ParticleRenderDispatcher.depthIgnoringWispFxCount + ", pLB: " + ParticleRenderDispatcher.lightningCount);
      event.left.add(PREFIX + "netColl: " + ManaNetworkHandler.instance.getAllCollectorsInWorld(world).size() + ", netPool: " + ManaNetworkHandler.instance.getAllPoolsInWorld(world).size());
    }
View Full Code Here

    super(BotaniaAPI.elementiumToolMaterial, LibItemNames.ELEMENTIUM_SHOVEL);
  }

  @Override
  public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) {
    World world = player.worldObj;
    Material mat = world.getBlock(x, y, z).getMaterial();
    if (!ToolCommons.isRightMaterial(mat, materialsShovel))
      return false;
    MovingObjectPosition block = ToolCommons.raytraceFromEntity(world, player, true, 4.5);
    if (block == null)
      return false;

    ForgeDirection.getOrientation(block.sideHit);
    int fortune = EnchantmentHelper.getFortuneModifier(player);
    boolean silk = EnchantmentHelper.getSilkTouchModifier(player);

    Block blk = world.getBlock(x, y, z);
    if(blk instanceof BlockFalling)
      ToolCommons.removeBlocksInIteration(player, stack, world, x, y, z, 0, -12, 0, 1, 12, 1, blk, materialsShovel, silk, fortune, false);

    return false;
  }
View Full Code Here

    ChunkCoordinates coords = getPoolCoords(stack);
    if(coords.posY == -1)
      return null;

    int dim = getDimension(stack);
    World world = null;
    for(World w : server.worldServers)
      if(w.provider.dimensionId == dim) {
        world = w;
        break;
      }

    if(world != null) {
      TileEntity tile = world.getTileEntity(coords.posX, coords.posY, coords.posZ);
      if(tile != null && tile instanceof IManaPool)
        return (IManaPool) tile;
    }

View Full Code Here

  @Override
  public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) {
    if(!isEnabled(stack))
      return false;

    World world = player.worldObj;
    Material mat = world.getBlock(x, y, z).getMaterial();
    if(!ToolCommons.isRightMaterial(mat, MATERIALS))
      return false;

    MovingObjectPosition block = ToolCommons.raytraceFromEntity(world, player, true, 4.5);
    if(block == null)
View Full Code Here

        }
      }
      break;
    }
    case MINE : {
      World world = entity.worldObj;
      int x = pos.blockX;
      int y = pos.blockY;
      int z = pos.blockZ;
      Block block = world.getBlock(x, y, z);
      TileEntity tile = world.getTileEntity(x, y, z);

      int meta = world.getBlockMetadata(x, y, z);
      float hardness = block.getBlockHardness(world, x, y, z);
      int mana = burst.getMana();

      ChunkCoordinates coords = burst.getBurstSourceChunkCoordinates();
      if((coords.posX != x || coords.posY != y || coords.posZ != z) && !(tile instanceof IManaBlock) && block != null && hardness != -1 && hardness < 50F && (burst.isFake() || mana >= 24)) {
        List<ItemStack> items = new ArrayList();

        items.addAll(block.getDrops(world, x, y, z, meta, 0));

        if(!burst.hasAlreadyCollidedAt(x, y, z)) {
          if(!burst.isFake() && !entity.worldObj.isRemote) {
            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

    return StatCollector.translateToLocal(LibTriggerNames.TRIGGER_MANA_DETECTOR);
  }

  @Override
  public boolean isTriggerActive(IStatementContainer source, IStatementParameter[] parameters) {
    World world = source.getTile().getWorldObj();
    int x = source.getTile().xCoord, y = source.getTile().yCoord, z = source.getTile().zCoord;
   
    boolean output = world.getEntitiesWithinAABB(IManaBurst.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1)).size() != 0;
   
    if(output) for(int i = 0; i < 4; i++)
        Botania.proxy.sparkleFX(world, x + Math.random(), y + Math.random(), z + Math.random(), 1F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
   
    return output;
View Full Code Here

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

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

            String newPos;

            {
              String[] tokens = s.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);
              world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.pistonRelay);
              newPos = getCoordsAsString(world.provider.dimensionId, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
            }

            if(mappedPositions.containsKey(s)) {
              String pos = mappedPositions.get(s);
              String[] tokens = pos.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);

              Block srcBlock = world.getBlock(x, y, z);
              int srcMeta = world.getBlockMetadata(x, y, z);
              TileEntity tile = world.getTileEntity(x, y, z);
              Material mat = srcBlock.getMaterial();

              if(!sticky && tile == null && mat.getMaterialMobility() == 0 && srcBlock.getBlockHardness(world, x, y, z) != -1 && !srcBlock.isAir(world, x, y, z)) {
                Material destMat = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial();
                if(world.isAirBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) || destMat.isReplaceable()) {
                  world.setBlock(x, y, z, Blocks.air);
                  world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, srcBlock, srcMeta, 1 | 2);
                  mappedPositions.put(s, getCoordsAsString(world.provider.dimensionId, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ));
                }
              }

              pos = mappedPositions.get(s);
View Full Code Here

TOP

Related Classes of net.minecraft.world.World

Copyright © 2018 www.massapicom. 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.