<commit_before>package mariculture.core.render;

import mariculture.core.tile.TileTankBlock;
import net.minecraftforge.fluids.FluidStack;

public class RenderCopperTank extends RenderBase {
    public RenderCopperTank() {}

    @Override
    public void renderBlock() {
        if (!isItem()) {
            TileTankBlock tank = (TileTankBlock) world.getTileEntity(x, y, z);
            if (tank != null) if (tank.tank.getFluidAmount() > 0) {
                FluidStack fluid = tank.tank.getFluid();
                if (fluid != null) {
                    double height = fluid.amount * 1D / tank.getCapacity();
                    setTexture(fluid.getFluid().getIcon());
                    if(fluid.getFluid().isGaseous()) {
                        renderFluidBlock(0, 1 - height, 0, 1, 1, 1);
                    } else {
                        renderFluidBlock(0, 0, 0, 1, height, 1);
                    }
                }
            }
        }

        setTexture(block);
        renderBlock(-0.01D, -0.01D, -0.01D, 1.01D, 1.01D, 1.01D);<commit_msg>Fix pressurised water render in copper tanks.<commit_after>package mariculture.core.render;

import mariculture.core.tile.TileTankBlock;
import net.minecraftforge.fluids.FluidStack;

public class RenderCopperTank extends RenderBase {
    public RenderCopperTank() {}

    @Override
    public void renderBlock() {
        if (!isItem()) {
            TileTankBlock tank = (TileTankBlock) world.getTileEntity(x, y, z);
            if (tank != null) if (tank.tank.getFluidAmount() > 0) {
                FluidStack fluid = tank.tank.getFluid();
                if (fluid != null) {
                    double height = fluid.amount * 1D / tank.getCapacity();
                    setTexture(fluid.getFluid().getStillIcon());
                    if(fluid.getFluid().getBlock() != null) {
                        setTexture(fluid.getFluid().getBlock().getIcon(world, x, y, z, 0));
                    }
                    
                    if(fluid.getFluid().isGaseous()) {
                        renderFluidBlock(0, 1 - height, 0, 1, 1, 1);
                    } else {
                        renderFluidBlock(0, 0, 0, 1, height, 1);
                    }
                }
            }
        }

        setTexture(block);
        renderBlock(-0.01D, -0.01D, -0.01D, 1.01D, 1.01D, 1.01D);
{'fraction_non_alphanumeric': 0.12287414965986394, 'fraction_numerical': 0.026785714285714284, 'mean_word_length': 1.6144444444444443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '372072', 'n_tokens_mistral': 771, 'n_tokens_neox': 694, 'n_words': 142}