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) {