mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 05:03:55 -07:00
Added getContents() to IInventory and implemented it.
Implemented Inventory and PlayerInventory and updated StorageMinecart and Slot. Added getMaxStackSize to CraftItemStack.
This commit is contained in:
51
src/main/java/net/minecraft/server/Slot.java
Normal file
51
src/main/java/net/minecraft/server/Slot.java
Normal file
@@ -0,0 +1,51 @@
|
||||
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) {
|
||||
b = iinventory;
|
||||
a = i;
|
||||
d = j;
|
||||
e = k;
|
||||
}
|
||||
|
||||
public void b() {
|
||||
d();
|
||||
}
|
||||
|
||||
public boolean a(ItemStack itemstack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ItemStack c() {
|
||||
return b.a(a);
|
||||
}
|
||||
|
||||
public void b(ItemStack itemstack) {
|
||||
b.a(a, itemstack);
|
||||
d();
|
||||
}
|
||||
|
||||
public void d() {
|
||||
b.d();
|
||||
}
|
||||
|
||||
public int a() {
|
||||
return b.c();
|
||||
}
|
||||
|
||||
public ItemStack a(int i) {
|
||||
return b.a(a, i);
|
||||
}
|
||||
|
||||
public boolean a(IInventory iinventory, int i) {
|
||||
return iinventory == b && i == a;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user