    001package net.minecraft.client.renderer.texture;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005
    006@SideOnly(Side.CLIENT)
    007public class Rect2i
    008{
    009    private int field_94164_a;
    010    private int field_94162_b;
    011    private int field_94163_c;
    012    private int field_94161_d;
    013
    014    public Rect2i(int par1, int par2, int par3, int par4)
    015    {
    016        this.field_94164_a = par1;
    017        this.field_94162_b = par2;
    018        this.field_94163_c = par3;
    019        this.field_94161_d = par4;
    020    }
    021
    022    public Rect2i func_94156_a(Rect2i par1Rect2i)
    023    {
    024        int i = this.field_94164_a;
    025        int j = this.field_94162_b;
    026        int k = this.field_94164_a + this.field_94163_c;
    027        int l = this.field_94162_b + this.field_94161_d;
    028        int i1 = par1Rect2i.func_94158_a();
    029        int j1 = par1Rect2i.func_94160_b();
    030        int k1 = i1 + par1Rect2i.func_94159_c();
    031        int l1 = j1 + par1Rect2i.func_94157_d();
    032        this.field_94164_a = Math.max(i, i1);
    033        this.field_94162_b = Math.max(j, j1);
    034        this.field_94163_c = Math.max(0, Math.min(k, k1) - this.field_94164_a);
    035        this.field_94161_d = Math.max(0, Math.min(l, l1) - this.field_94162_b);
    036        return this;
    037    }
    038
    039    public int func_94158_a()
    040    {
    041        return this.field_94164_a;
    042    }
    043
    044    public int func_94160_b()
    045    {
    046        return this.field_94162_b;
    047    }
    048
    049    public int func_94159_c()
    050    {
    051        return this.field_94163_c;
    052    }
    053
    054    public int func_94157_d()
    055    {
    056        return this.field_94161_d;
    057    }
    058}