3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-18 05:50:04 +01:00
Paper/src/main/java/net/minecraft/server/Slot.java

55 Zeilen
1.1 KiB
Java

package net.minecraft.server;
public class Slot {
public final int index; // CraftBukkit: private -> public
public final IInventory inventory; // CraftBukkit: private -> public
2011-02-23 03:37:56 +01:00
public int a;
public int b;
public int c;
public Slot(IInventory iinventory, int i, int j, int k) {
this.inventory = iinventory;
this.index = i;
2011-02-23 03:37:56 +01:00
this.b = j;
this.c = k;
}
2011-03-31 22:40:00 +02:00
public void a(ItemStack itemstack) {
this.b();
}
public boolean isAllowed(ItemStack itemstack) {
return true;
}
public ItemStack getItem() {
return this.inventory.getItem(this.index);
}
2011-03-31 22:40:00 +02:00
public void c(ItemStack itemstack) {
this.inventory.setItem(this.index, itemstack);
2011-03-31 22:40:00 +02:00
this.b();
}
2011-03-31 22:40:00 +02:00
public void b() {
this.inventory.update();
}
2011-03-31 22:40:00 +02:00
public int c() {
return this.inventory.getMaxStackSize();
}
public ItemStack a(int i) {
return this.inventory.a(this.index, i);
}
public boolean a(IInventory iinventory, int i) {
return iinventory == this.inventory && i == this.index;
}
2011-03-31 22:40:00 +02:00
public boolean d() {
return false;
}
}