Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -8,15 +8,15 @@
+import java.util.List;
+import org.bukkit.Location;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.craftbukkit.entity.CraftVillager;
+import org.bukkit.craftbukkit.entity.CraftAbstractVillager;
+import org.bukkit.entity.HumanEntity;
+// CraftBukkit end
public class InventoryMerchant implements IInventory {
@@ -11,6 +18,40 @@
private MerchantRecipe recipe;
@@ -12,6 +19,45 @@
public int selectedIndex;
private int e;
+ // CraftBukkit start - add fields and methods
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
@@ -38,12 +38,17 @@
+ return transaction;
+ }
+
+ @Override
+ public int getMaxStackSize() {
+ return maxStack;
+ }
+
+ public void setMaxStackSize(int i) {
+ maxStack = i;
+ }
+
+ public org.bukkit.inventory.InventoryHolder getOwner() {
+ return (merchant instanceof EntityVillager) ? (CraftVillager) ((EntityVillager) this.merchant).getBukkitEntity() : null;
+ return (merchant instanceof EntityVillager) ? (CraftAbstractVillager) ((EntityVillager) this.merchant).getBukkitEntity() : null;
+ }
+
+ @Override
@@ -52,24 +57,6 @@
+ }
+ // CraftBukkit end
+
public InventoryMerchant(EntityHuman entityhuman, IMerchant imerchant) {
public InventoryMerchant(IMerchant imerchant) {
this.itemsInSlots = NonNullList.a(3, ItemStack.a);
this.player = entityhuman;
@@ -78,7 +119,7 @@
}
public IChatBaseComponent getDisplayName() {
- return new ChatMessage("mob.villager", new Object[0]);
+ return merchant.getScoreboardDisplayName(); // CraftBukkit
}
public boolean hasCustomName() {
@@ -91,7 +132,7 @@
}
public int getMaxStackSize() {
- return 64;
+ return maxStack; // CraftBukkit
}
public boolean a(EntityHuman entityhuman) {
this.merchant = imerchant;