package net.minecraft.client.renderer.block.model;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import java.lang.reflect.Type;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class ItemCameraTransforms
{
    public static final ItemCameraTransforms field_178357_a = new ItemCameraTransforms(ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a, ItemTransformVec3f.field_178366_a);
    public final ItemTransformVec3f field_178355_b;
    public final ItemTransformVec3f field_178356_c;
    public final ItemTransformVec3f field_178353_d;
    public final ItemTransformVec3f field_178354_e;
    private static final String __OBFID = "CL_00002482";

    public ItemCameraTransforms(ItemTransformVec3f p_i46213_1_, ItemTransformVec3f p_i46213_2_, ItemTransformVec3f p_i46213_3_, ItemTransformVec3f p_i46213_4_)
    {
        this.field_178355_b = p_i46213_1_;
        this.field_178356_c = p_i46213_2_;
        this.field_178353_d = p_i46213_3_;
        this.field_178354_e = p_i46213_4_;
    }

    @SideOnly(Side.CLIENT)
    static class Deserializer implements JsonDeserializer
        {
            private static final String __OBFID = "CL_00002481";

            public ItemCameraTransforms func_178352_a(JsonElement p_178352_1_, Type p_178352_2_, JsonDeserializationContext p_178352_3_)
            {
                JsonObject jsonobject = p_178352_1_.getAsJsonObject();
                ItemTransformVec3f itemtransformvec3f = ItemTransformVec3f.field_178366_a;
                ItemTransformVec3f itemtransformvec3f1 = ItemTransformVec3f.field_178366_a;
                ItemTransformVec3f itemtransformvec3f2 = ItemTransformVec3f.field_178366_a;
                ItemTransformVec3f itemtransformvec3f3 = ItemTransformVec3f.field_178366_a;

                if (jsonobject.has("thirdperson"))
                {
                    itemtransformvec3f = (ItemTransformVec3f)p_178352_3_.deserialize(jsonobject.get("thirdperson"), ItemTransformVec3f.class);
                }

                if (jsonobject.has("firstperson"))
                {
                    itemtransformvec3f1 = (ItemTransformVec3f)p_178352_3_.deserialize(jsonobject.get("firstperson"), ItemTransformVec3f.class);
                }

                if (jsonobject.has("head"))
                {
                    itemtransformvec3f2 = (ItemTransformVec3f)p_178352_3_.deserialize(jsonobject.get("head"), ItemTransformVec3f.class);
                }

                if (jsonobject.has("gui"))
                {
                    itemtransformvec3f3 = (ItemTransformVec3f)p_178352_3_.deserialize(jsonobject.get("gui"), ItemTransformVec3f.class);
                }

                return new ItemCameraTransforms(itemtransformvec3f, itemtransformvec3f1, itemtransformvec3f2, itemtransformvec3f3);
            }

            public Object deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_)
            {
                return this.func_178352_a(p_deserialize_1_, p_deserialize_2_, p_deserialize_3_);
            }
        }

    @SideOnly(Side.CLIENT)
    public static enum TransformType
    {
        NONE,
        THIRD_PERSON,
        FIRST_PERSON,
        HEAD,
        GUI;

        private static final String __OBFID = "CL_00002480";
    }
}