summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/Slot.java
blob: abec2db35564595b833041d910c1c6127224efc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package net.minecraft.server;

public class Slot {

    public final int a; // CraftBukkit: private -> public
    public final IInventory b; // CraftBukkit: private -> public
    public int c;
    public int d;
    public int e;

    public Slot(IInventory iinventory, int i, int j, int k) {
        this.b = iinventory;
        this.a = i;
        this.d = j;
        this.e = k;
    }

    public void b() {
        this.d();
    }

    public boolean a(ItemStack itemstack) {
        return true;
    }

    public ItemStack c() {
        return this.b.a(this.a);
    }

    public void b(ItemStack itemstack) {
        this.b.a(this.a, itemstack);
        this.d();
    }

    public void d() {
        this.b.d();
    }

    public int a() {
        return this.b.c();
    }

    public ItemStack a(int i) {
        return this.b.b(this.a, i);
    }

    public boolean a(IInventory iinventory, int i) {
        return iinventory == this.b && i == this.a;
    }
}