private boolean func_31080_c(Block block, int i, int j, int k, boolean flag) {
        int l = this.blockAccess.getBlockMetadata(i, j, k);
        int i1 = BlockPistonExtension.func_31050_c(l);
        float f = block.getBlockBrightness(this.blockAccess, i, j, k);
        float f1 = flag ? 1.0F : 0.5F;
        double d = flag ? 16.0D : 8.0D;

        switch (i1) {
            case 0:
                this.field_31087_g = 3;
                this.field_31086_h = 3;
                this.field_31085_i = 3;
                this.field_31084_j = 3;
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.25F, 1.0F);
                this.renderStandardBlock(block, i, j, k);
                this.func_31076_a((double) ((float) i + 0.375F), (double) ((float) i + 0.625F), (double) ((float) j + 0.25F), (double) ((float) j + 0.25F + f1), (double) ((float) k + 0.625F), (double) ((float) k + 0.625F), f * 0.8F, d);
                this.func_31076_a((double) ((float) i + 0.625F), (double) ((float) i + 0.375F), (double) ((float) j + 0.25F), (double) ((float) j + 0.25F + f1), (double) ((float) k + 0.375F), (double) ((float) k + 0.375F), f * 0.8F, d);
                this.func_31076_a((double) ((float) i + 0.375F), (double) ((float) i + 0.375F), (double) ((float) j + 0.25F), (double) ((float) j + 0.25F + f1), (double) ((float) k + 0.375F), (double) ((float) k + 0.625F), f * 0.6F, d);
                this.func_31076_a((double) ((float) i + 0.625F), (double) ((float) i + 0.625F), (double) ((float) j + 0.25F), (double) ((float) j + 0.25F + f1), (double) ((float) k + 0.625F), (double) ((float) k + 0.375F), f * 0.6F, d);
                break;

            case 1:
                block.setBlockBounds(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F);
                this.renderStandardBlock(block, i, j, k);
                this.func_31076_a((double) ((float) i + 0.375F), (double) ((float) i + 0.625F), (double) ((float) j - 0.25F + 1.0F - f1), (double) ((float) j - 0.25F + 1.0F), (double) ((float) k + 0.625F), (double) ((float) k + 0.625F), f * 0.8F, d);
                this.func_31076_a((double) ((float) i + 0.625F), (double) ((float) i + 0.375F), (double) ((float) j - 0.25F + 1.0F - f1), (double) ((float) j - 0.25F + 1.0F), (double) ((float) k + 0.375F), (double) ((float) k + 0.375F), f * 0.8F, d);
                this.func_31076_a((double) ((float) i + 0.375F), (double) ((float) i + 0.375F), (double) ((float) j - 0.25F + 1.0F - f1), (double) ((float) j - 0.25F + 1.0F), (double) ((float) k + 0.375F), (double) ((float) k + 0.625F), f * 0.6F, d);
                this.func_31076_a((double) ((float) i + 0.625F), (double) ((float) i + 0.625F), (double) ((float) j - 0.25F + 1.0F - f1), (double) ((float) j - 0.25F + 1.0F), (double) ((float) k + 0.625F), (double) ((float) k + 0.375F), f * 0.6F, d);
                break;

            case 2:
                this.field_31085_i = 1;
                this.field_31084_j = 2;
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.25F);
                this.renderStandardBlock(block, i, j, k);
                this.func_31081_b((double) ((float) i + 0.375F), (double) ((float) i + 0.375F), (double) ((float) j + 0.625F), (double) ((float) j + 0.375F), (double) ((float) k + 0.25F), (double) ((float) k + 0.25F + f1), f * 0.6F, d);
                this.func_31081_b((double) ((float) i + 0.625F), (double) ((float) i + 0.625F), (double) ((float) j + 0.375F), (double) ((float) j + 0.625F), (double) ((float) k + 0.25F), (double) ((float) k + 0.25F + f1), f * 0.6F, d);
                this.func_31081_b((double) ((float) i + 0.375F), (double) ((float) i + 0.625F), (double) ((float) j + 0.375F), (double) ((float) j + 0.375F), (double) ((float) k + 0.25F), (double) ((float) k + 0.25F + f1), f * 0.5F, d);
                this.func_31081_b((double) ((float) i + 0.625F), (double) ((float) i + 0.375F), (double) ((float) j + 0.625F), (double) ((float) j + 0.625F), (double) ((float) k + 0.25F), (double) ((float) k + 0.25F + f1), f, d);
                break;

            case 3:
                this.field_31085_i = 2;
                this.field_31084_j = 1;
                this.field_31083_k = 3;
                this.field_31082_l = 3;
                block.setBlockBounds(0.0F, 0.0F, 0.75F, 1.0F, 1.0F, 1.0F);
                this.renderStandardBlock(block, i, j, k);
                this.func_31081_b((double) ((float) i + 0.375F), (double) ((float) i + 0.375F), (double) ((float) j + 0.625F), (double) ((float) j + 0.375F), (double) ((float) k - 0.25F + 1.0F - f1), (double) ((float) k - 0.25F + 1.0F), f * 0.6F, d);
                this.func_31081_b((double) ((float) i + 0.625F), (double) ((float) i + 0.625F), (double) ((float) j + 0.375F), (double) ((float) j + 0.625F), (double) ((float) k - 0.25F + 1.0F - f1), (double) ((float) k - 0.25F + 1.0F), f * 0.6F, d);
                this.func_31081_b((double) ((float) i + 0.375F), (double) ((float) i + 0.625F), (double) ((float) j + 0.375F), (double) ((float) j + 0.375F), (double) ((float) k - 0.25F + 1.0F - f1), (double) ((float) k - 0.25F + 1.0F), f * 0.5F, d);
                this.func_31081_b((double) ((float) i + 0.625F), (double) ((float) i + 0.375F), (double) ((float) j + 0.625F), (double) ((float) j + 0.625F), (double) ((float) k - 0.25F + 1.0F - f1), (double) ((float) k - 0.25F + 1.0F), f, d);
                break;

            case 4:
                this.field_31087_g = 1;
                this.field_31086_h = 2;
                this.field_31083_k = 2;
                this.field_31082_l = 1;
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.25F, 1.0F, 1.0F);
                this.renderStandardBlock(block, i, j, k);
                this.func_31077_c((double) ((float) i + 0.25F), (double) ((float) i + 0.25F + f1), (double) ((float) j + 0.375F), (double) ((float) j + 0.375F), (double) ((float) k + 0.625F), (double) ((float) k + 0.375F), f * 0.5F, d);
                this.func_31077_c((double) ((float) i + 0.25F), (double) ((float) i + 0.25F + f1), (double) ((float) j + 0.625F), (double) ((float) j + 0.625F), (double) ((float) k + 0.375F), (double) ((float) k + 0.625F), f, d);
                this.func_31077_c((double) ((float) i + 0.25F), (double) ((float) i + 0.25F + f1), (double) ((float) j + 0.375F), (double) ((float) j + 0.625F), (double) ((float) k + 0.375F), (double) ((float) k + 0.375F), f * 0.6F, d);
                this.func_31077_c((double) ((float) i + 0.25F), (double) ((float) i + 0.25F + f1), (double) ((float) j + 0.625F), (double) ((float) j + 0.375F), (double) ((float) k + 0.625F), (double) ((float) k + 0.625F), f * 0.6F, d);
                break;

            case 5:
                this.field_31087_g = 2;
                this.field_31086_h = 1;
                this.field_31083_k = 1;
                this.field_31082_l = 2;
                block.setBlockBounds(0.75F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                this.renderStandardBlock(block, i, j, k);
                this.func_31077_c((double) ((float) i - 0.25F + 1.0F - f1), (double) ((float) i - 0.25F + 1.0F), (double) ((float) j + 0.375F), (double) ((float) j + 0.375F), (double) ((float) k + 0.625F), (double) ((float) k + 0.375F), f * 0.5F, d);
                this.func_31077_c((double) ((float) i - 0.25F + 1.0F - f1), (double) ((float) i - 0.25F + 1.0F), (double) ((float) j + 0.625F), (double) ((float) j + 0.625F), (double) ((float) k + 0.375F), (double) ((float) k + 0.625F), f, d);
                this.func_31077_c((double) ((float) i - 0.25F + 1.0F - f1), (double) ((float) i - 0.25F + 1.0F), (double) ((float) j + 0.375F), (double) ((float) j + 0.625F), (double) ((float) k + 0.375F), (double) ((float) k + 0.375F), f * 0.6F, d);
                this.func_31077_c((double) ((float) i - 0.25F + 1.0F - f1), (double) ((float) i - 0.25F + 1.0F), (double) ((float) j + 0.625F), (double) ((float) j + 0.375F), (double) ((float) k + 0.625F), (double) ((float) k + 0.625F), f * 0.6F, d);
        }

        this.field_31087_g = 0;
        this.field_31086_h = 0;
        this.field_31085_i = 0;
        this.field_31084_j = 0;
        this.field_31083_k = 0;
        this.field_31082_l = 0;
        block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
        return true;
    }