@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/server/TileEntityHopper.java
|
||||
+++ b/net/minecraft/server/TileEntityHopper.java
|
||||
@@ -6,12 +6,46 @@
|
||||
import java.util.stream.Collectors;
|
||||
@@ -7,12 +7,51 @@
|
||||
import java.util.stream.IntStream;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -16,8 +16,8 @@
|
||||
public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable {
|
||||
|
||||
private NonNullList<ItemStack> items;
|
||||
private int f;
|
||||
private long j;
|
||||
private int j;
|
||||
private long k;
|
||||
|
||||
+ // CraftBukkit start - add fields and methods
|
||||
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
||||
@@ -39,6 +39,11 @@
|
||||
+ return transaction;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getMaxStackSize() {
|
||||
+ return maxStack;
|
||||
+ }
|
||||
+
|
||||
+ public void setMaxStackSize(int size) {
|
||||
+ maxStack = size;
|
||||
+ }
|
||||
@@ -47,16 +52,7 @@
|
||||
public TileEntityHopper() {
|
||||
super(TileEntityTypes.HOPPER);
|
||||
this.items = NonNullList.a(5, ItemStack.a);
|
||||
@@ -71,7 +105,7 @@
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
- return 64;
|
||||
+ return maxStack; // CraftBukkit
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
@@ -164,7 +198,28 @@
|
||||
@@ -159,7 +198,28 @@
|
||||
for (int i = 0; i < this.getSize(); ++i) {
|
||||
if (!this.getItem(i).isEmpty()) {
|
||||
ItemStack itemstack = this.getItem(i).cloneItemStack();
|
||||
@@ -86,7 +82,7 @@
|
||||
|
||||
if (itemstack1.isEmpty()) {
|
||||
iinventory.update();
|
||||
@@ -289,7 +344,34 @@
|
||||
@@ -224,7 +284,34 @@
|
||||
|
||||
if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) {
|
||||
ItemStack itemstack1 = itemstack.cloneItemStack();
|
||||
@@ -122,7 +118,7 @@
|
||||
|
||||
if (itemstack2.isEmpty()) {
|
||||
iinventory.update();
|
||||
@@ -304,6 +386,13 @@
|
||||
@@ -239,6 +326,13 @@
|
||||
|
||||
public static boolean a(IInventory iinventory, EntityItem entityitem) {
|
||||
boolean flag = false;
|
||||
|
||||
Reference in New Issue
Block a user