Package org.spoutcraft.client

Examples of org.spoutcraft.client.SpoutcraftWorld


  public BlockDesign setVertex(Vertex vertex) {
    return setVertex(vertex.getQuadNum(), vertex.getIndex(), vertex.getX(), vertex.getY(), vertex.getZ(), vertex.getTextureX(), vertex.getTextureY(), vertex.getTextureWidth(), vertex.getTextureHeight());
  }

  public boolean renderBlock(Block block, int x, int y, int z) {
    SpoutcraftWorld world = Spoutcraft.getWorld();
    if (block != null) {
      boolean enclosed = true;
      enclosed &= world.isOpaque(x, y + 1, z);
      enclosed &= world.isOpaque(x, y - 1, z);
      enclosed &= world.isOpaque(x, y, z + 1);
      enclosed &= world.isOpaque(x, y, z - 1);
      enclosed &= world.isOpaque(x + 1, y, z);
      enclosed &= world.isOpaque(x - 1, y, z);
      if (enclosed) {
        return false;
      }
    }

    if (getX() == null) {
      return false;
    }

    setBrightness(1F);

    MinecraftTessellator tessellator = Spoutcraft.getTessellator();

    int internalLightLevel = 0;
    if (block == null) {
      internalLightLevel = 0x00F000F0;
    } else {
      internalLightLevel = world.getMixedBrightnessAt(block, x, y, z);
    }

    for (int i = 0; i < getX().length; i++) {
      MutableIntegerVector sourceBlock = getLightSource(i, x, y, z);

      int sideBrightness;

      if (block != null && sourceBlock != null) {
        sideBrightness = world.getMixedBrightnessAt(block, sourceBlock.getBlockX(), sourceBlock.getBlockY(), sourceBlock.getBlockZ());
      } else {
        sideBrightness = internalLightLevel;
      }

      if (block == null) {
View Full Code Here


          title = player.vip.getTitle();
        }
      }
      if (title.equals("reset")) {
        living.resetTitle();
        SpoutcraftWorld spworld = (SpoutcraftWorld) living.getWorld();
        spworld.getHandle().customTitles.remove(entityId);
      } else {
        living.setTitle(title);
        SpoutcraftWorld spworld = (SpoutcraftWorld) living.getWorld();
        spworld.getHandle().customTitles.put(living.getEntityId(), title);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.spoutcraft.client.SpoutcraftWorld

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.