diff options
author | md_5 <git@md-5.net> | 2016-05-10 21:47:39 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-05-10 21:47:39 +1000 |
commit | c5e9a169fa564f3b8119b6666f8df59d5a9b45c3 (patch) | |
tree | 9f3b1ce732f0082b71512b1dddb7abb35526226e /nms-patches/InventoryMerchant.patch | |
parent | 4cb32587ac1ff543b2efa9498f8d0d358cb90c12 (diff) | |
download | craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.gz craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.lz craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.xz craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.zip |
Minecraft 1.9.4
Diffstat (limited to 'nms-patches/InventoryMerchant.patch')
-rw-r--r-- | nms-patches/InventoryMerchant.patch | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/nms-patches/InventoryMerchant.patch b/nms-patches/InventoryMerchant.patch index 26027d36..51bf4d59 100644 --- a/nms-patches/InventoryMerchant.patch +++ b/nms-patches/InventoryMerchant.patch @@ -1,8 +1,9 @@ --- a/net/minecraft/server/InventoryMerchant.java +++ b/net/minecraft/server/InventoryMerchant.java -@@ -1,12 +1,54 @@ +@@ -1,6 +1,13 @@ package net.minecraft.server; + import javax.annotation.Nullable; +// CraftBukkit start +import java.util.List; +import org.bukkit.Location; @@ -10,16 +11,13 @@ +import org.bukkit.craftbukkit.entity.CraftVillager; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end -+ + public class InventoryMerchant implements IInventory { - private final IMerchant merchant; - private ItemStack[] itemsInSlots = new ItemStack[3]; - private final EntityHuman player; +@@ -10,6 +17,40 @@ private MerchantRecipe recipe; -- private int e; -+ public int e; // PAIL: private -> public, selectedIndex -+ + public int selectedIndex; + + // CraftBukkit start - add fields and methods + public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>(); + private int maxStack = MAX_STACK; @@ -53,10 +51,11 @@ + return ((EntityVillager) this.merchant).getBukkitEntity().getLocation(); + } + // CraftBukkit end - ++ public InventoryMerchant(EntityHuman entityhuman, IMerchant imerchant) { this.player = entityhuman; -@@ -68,7 +110,7 @@ + this.merchant = imerchant; +@@ -73,7 +114,7 @@ } public int getMaxStackSize() { |