mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05: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:
1 parent
b72dad0a61
commit
e8a565e6cf
15 files changed
+1557
-35
No files matched your search
@@ -0,0 +1,54 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
|
||||
public class InventoryCraftResult
|
||||
implements IInventory {
|
||||
|
||||
private ItemStack a[];
|
||||
|
||||
// CraftBukkit
|
||||
public ItemStack[] getContents() {
|
||||
return a;
|
||||
}
|
||||
|
||||
public InventoryCraftResult() {
|
||||
a = new ItemStack[1];
|
||||
}
|
||||
|
||||
public int a() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public ItemStack a(int i) {
|
||||
return a[i];
|
||||
}
|
||||
|
||||
public String b() {
|
||||
return "Result";
|
||||
}
|
||||
|
||||
public ItemStack a(int i, int j) {
|
||||
if (a[i] != null) {
|
||||
ItemStack itemstack = a[i];
|
||||
|
||||
a[i] = null;
|
||||
return itemstack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void a(int i, ItemStack itemstack) {
|
||||
a[i] = itemstack;
|
||||
}
|
||||
|
||||
public int c() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
public void d() {}
|
||||
|
||||
public boolean a_(EntityPlayer entityplayer) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user