@@ -1,13 +1,15 @@
|
||||
--- a/net/minecraft/server/Container.java
|
||||
+++ b/net/minecraft/server/Container.java
|
||||
@@ -7,6 +7,18 @@
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/inventory/Container.java
|
||||
+++ b/net/minecraft/world/inventory/Container.java
|
||||
@@ -21,6 +21,20 @@
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.TileEntity;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import java.util.HashMap;
|
||||
+import java.util.Map;
|
||||
+import net.minecraft.network.chat.IChatBaseComponent;
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutSetSlot;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
+import org.bukkit.event.Event.Result;
|
||||
@@ -19,7 +21,7 @@
|
||||
public abstract class Container {
|
||||
|
||||
public NonNullList<ItemStack> items = NonNullList.a();
|
||||
@@ -21,6 +33,27 @@
|
||||
@@ -35,6 +49,27 @@
|
||||
private final List<ICrafting> listeners = Lists.newArrayList();
|
||||
private final Set<EntityHuman> k = Sets.newHashSet();
|
||||
|
||||
@@ -47,7 +49,7 @@
|
||||
protected Container(@Nullable Containers<?> containers, int i) {
|
||||
this.e = containers;
|
||||
this.windowId = i;
|
||||
@@ -202,6 +235,7 @@
|
||||
@@ -216,6 +251,7 @@
|
||||
k = playerinventory.getCarried().getCount();
|
||||
Iterator iterator = this.i.iterator();
|
||||
|
||||
@@ -55,7 +57,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
Slot slot1 = (Slot) iterator.next();
|
||||
ItemStack itemstack3 = playerinventory.getCarried();
|
||||
@@ -217,12 +251,48 @@
|
||||
@@ -231,12 +267,48 @@
|
||||
}
|
||||
|
||||
k -= itemstack4.getCount() - j1;
|
||||
@@ -107,7 +109,7 @@
|
||||
}
|
||||
|
||||
this.d();
|
||||
@@ -239,8 +309,11 @@
|
||||
@@ -253,8 +325,11 @@
|
||||
if (i == -999) {
|
||||
if (!playerinventory.getCarried().isEmpty()) {
|
||||
if (j == 0) {
|
||||
@@ -120,7 +122,7 @@
|
||||
}
|
||||
|
||||
if (j == 1) {
|
||||
@@ -328,6 +401,15 @@
|
||||
@@ -342,6 +417,15 @@
|
||||
}
|
||||
|
||||
slot2.d();
|
||||
@@ -136,7 +138,7 @@
|
||||
}
|
||||
}
|
||||
} else if (inventoryclicktype == InventoryClickType.SWAP) {
|
||||
@@ -430,8 +512,11 @@
|
||||
@@ -444,8 +528,11 @@
|
||||
PlayerInventory playerinventory = entityhuman.inventory;
|
||||
|
||||
if (!playerinventory.getCarried().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user