    001package net.minecraft.world;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005
    006@SideOnly(Side.CLIENT)
    007public class ColorizerGrass
    008{
    009    /** Color buffer for grass */
    010    private static int[] grassBuffer = new int[65536];
    011
    012    public static void setGrassBiomeColorizer(int[] par0ArrayOfInteger)
    013    {
    014        grassBuffer = par0ArrayOfInteger;
    015    }
    016
    017    /**
    018     * Gets grass color from temperature and humidity. Args: temperature, humidity
    019     */
    020    public static int getGrassColor(double par0, double par2)
    021    {
    022        par2 *= par0;
    023        int var4 = (int)((1.0D - par0) * 255.0D);
    024        int var5 = (int)((1.0D - par2) * 255.0D);
    025        return grassBuffer[var5 << 8 | var4];
    026    }
    027}