Update upstream, fix accidental removal from last

This commit is contained in:
Zach Brown 2016-12-02 21:11:39 -06:00
parent 7e6d4b54e1
commit 6c7152dbfe
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
19 changed files with 24 additions and 103 deletions

View File

@ -1,79 +0,0 @@
From ba3e15745ed9c595c8b787eff25b4092ab524e97 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 22:31:18 -0400
Subject: [PATCH] Process NMS Data Conversion post ItemMeta on Copy
ItemMeta apply is a destructive process that expects to be the authority on
what the items NBT data is.
When CraftItemStack.asNMSCopy was called, the conversion ran, potentially setting
the converted data into the ItemStacks tag.
Then if that item had ItemMeta, it would completely undo that conversion by
erasing the NBT Tag.
On copy, run conversion post ItemMeta apply.
diff --git a/src/main/java/net/minecraft/server/DataInspectorBlockEntity.java b/src/main/java/net/minecraft/server/DataInspectorBlockEntity.java
index 4a8820e68..27fb802bf 100644
--- a/src/main/java/net/minecraft/server/DataInspectorBlockEntity.java
+++ b/src/main/java/net/minecraft/server/DataInspectorBlockEntity.java
@@ -32,7 +32,7 @@ public class DataInspectorBlockEntity implements DataInspector {
boolean flag;
if (s1 == null) {
- DataInspectorBlockEntity.a.warn("Unable to resolve BlockEntity for ItemInstance: {}", new Object[] { s});
+ //DataInspectorBlockEntity.a.warn("Unable to resolve BlockEntity for ItemInstance: {}", new Object[] { s}); // Paper - no need to nag about an ok condition
flag = false;
} else {
flag = !nbttagcompound2.hasKey("id");
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 66973051a..1218c005e 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -55,13 +55,24 @@ public final class ItemStack {
this(item, i, 0);
}
+ // Paper start
public ItemStack(Item item, int i, int j) {
+ this(item, i, j, true);
+ }
+ public ItemStack(Item item, int i, int j, boolean convert) {
+ // Paper end
this.item = item;
this.damage = j;
this.count = i;
// CraftBukkit start - Pass to setData to do filtering
+ // Paper start
+ if (convert) convertData(j);
+ }
+
+ public final void convertData(int data) {
+ // Paper end
if (MinecraftServer.getServer() != null) {
- this.setData(j);
+ this.setData(data);
NBTTagCompound savedStack = new NBTTagCompound();
this.save(savedStack);
MinecraftServer.getServer().getDataConverterManager().a(DataConverterTypes.ITEM_INSTANCE, savedStack); // PAIL: convert
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 4afd3a99a..a862e946c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -41,10 +41,11 @@ public final class CraftItemStack extends ItemStack {
return net.minecraft.server.ItemStack.a;
}
- net.minecraft.server.ItemStack stack = new net.minecraft.server.ItemStack(item, original.getAmount(), original.getDurability());
+ net.minecraft.server.ItemStack stack = new net.minecraft.server.ItemStack(item, original.getAmount(), original.getDurability(), false); // Paper
if (original.hasItemMeta()) {
setItemMeta(stack, original.getItemMeta());
}
+ stack.convertData(original.getDurability()); // Paper
return stack;
}
--
2.11.0

View File

@ -1,4 +1,4 @@
From 106fc9dcf2bf6ce78a01c8316ea056ac21fe6b6e Mon Sep 17 00:00:00 2001
From 7342a055c028ef8bc6511d931e50eb5c5176ee9b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 16 Jun 2016 00:17:23 -0400
Subject: [PATCH] Remove FishingHook reference on Craft Entity removal

View File

@ -1,4 +1,4 @@
From 88454efd54140bc08bfec25fb2b0c7ebfa0e7efb Mon Sep 17 00:00:00 2001
From ff13b1139f11a5c3e9f4645d524d8aece960e3ca Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 23:48:39 -0400
Subject: [PATCH] Auto fix bad Y levels on player login
@ -6,7 +6,7 @@ Subject: [PATCH] Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index ee3bdcf..ec06d8e 100644
index 722367b..e72d6bb 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -126,6 +126,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -1,4 +1,4 @@
From c8a48fee9053fddd2e1e1158075b0dc4ffba5498 Mon Sep 17 00:00:00 2001
From 51bf651bfa762b1b94e2998f414718e8dbfbe551 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 23:54:20 -0400
Subject: [PATCH] Raise string limit for packet serialization

View File

@ -1,4 +1,4 @@
From ddc177a9b7773ff2f78d79d5cc92d24344a146c9 Mon Sep 17 00:00:00 2001
From ff30d0c74a5f78ca1e17141adcdb4d0b19e41c2d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 26 Sep 2016 01:51:30 -0400
Subject: [PATCH] Disable Vanilla Chunk GC

View File

@ -1,4 +1,4 @@
From e5044d41763ffa0757be073aac90a82b7135a1e5 Mon Sep 17 00:00:00 2001
From 3f23c1b94aee59ba0147e16c5de5956a4c5bb637 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 5 Oct 2016 16:27:36 -0500
Subject: [PATCH] Option to remove corrupt tile entities

View File

@ -1,4 +1,4 @@
From b2d17b7139de38cbd10a1bd239e0b4f67704e8e4 Mon Sep 17 00:00:00 2001
From 1aedffb7a373c068a1444d2f2c870235a56eb6b8 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:30 -0700
Subject: [PATCH] Add EntityZapEvent
@ -48,7 +48,7 @@ index a2e68c5..4a6b3da 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 96560f9..e7fa96c 100644
index f8846ff..102ff6b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -670,6 +670,14 @@ public class CraftEventFactory {

View File

@ -1,4 +1,4 @@
From 6d8ae6ccc27d04cfc36e663794f51d8b56830b6d Mon Sep 17 00:00:00 2001
From a4322ea60fbb664e3dc2fb4c35f3efce09a4a794 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Nov 2016 20:28:12 -0400
Subject: [PATCH] Don't load Chunks from Hoppers and other things

View File

@ -1,4 +1,4 @@
From c3f763f58510c0a5ec0fe27df4ff0c32f16baa61 Mon Sep 17 00:00:00 2001
From 9f09ca2a4183dce2ce00f47ed4c17d42699a0158 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Nov 2016 21:52:22 -0400
Subject: [PATCH] Prevent Auto Save if Save Queue is full

View File

@ -1,4 +1,4 @@
From 806edb9e1acefb50e81049f8154ea1f610de031b Mon Sep 17 00:00:00 2001
From 120160b9b4a6ca345a7246104380ef7b07e8e3ff Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 4 Nov 2016 02:12:10 -0400
Subject: [PATCH] Chunk Save Stats Debug Option

View File

@ -1,4 +1,4 @@
From bffd69d3d23fed57a8b8a797fed318356bdc9144 Mon Sep 17 00:00:00 2001
From 1a47c05d6dfd88710e000e82b165b231b7cded01 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 12 Nov 2016 23:25:22 -0600
Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items

View File

@ -1,4 +1,4 @@
From 6e07c554045c64fca0dded4fb63035fccef449d6 Mon Sep 17 00:00:00 2001
From 2c1a61f0eac80134adb181157e9e32ea3d99d612 Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Wed, 23 Nov 2016 08:31:45 -0500
Subject: [PATCH] Cache user authenticator threads

View File

@ -1,4 +1,4 @@
From bd884b008613a8f2f3a04d49a8b7e85964ada2a0 Mon Sep 17 00:00:00 2001
From 08cf7bcd0a6eb494ee8b05d579381539dc72348a Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Wed, 23 Nov 2016 12:54:56 -0500
Subject: [PATCH] Optimize Network Queue

View File

@ -1,4 +1,4 @@
From 1098877b9639553cb4075c565fe700e82ed3e3c3 Mon Sep 17 00:00:00 2001
From 7002b0c4ea6fec54a9a40d23d91dfb03eb3e1016 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 20:35:05 +0000
Subject: [PATCH] Optimise NetworkManager

View File

@ -1,11 +1,11 @@
From 50a3c5f506683281ab5c96c1b135fe2a794208c5 Mon Sep 17 00:00:00 2001
From 1d7ec33233736bb1d6a954199624e923e6c1c841 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 13:22:40 +0000
Subject: [PATCH] Optimise removeQueue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4b57278..75d67da 100644
index e72d6bb..3e81336 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists;

View File

@ -1,4 +1,4 @@
From 89091fadfcf6943042b97490048aa12e2d84aed5 Mon Sep 17 00:00:00 2001
From ebdaabf2be182bea341c4fcfeec3a8330790bc3a Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Mon, 28 Nov 2016 10:21:52 -0500
Subject: [PATCH] Allow Reloading of Command Aliases

View File

@ -1,4 +1,4 @@
From d31d8a65355e7a35e0ef7f574607ef6bec23740f Mon Sep 17 00:00:00 2001
From ca820327d41080f3cbe833840ba151e927c6316a Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Thu, 8 Sep 2016 08:48:33 -0700
Subject: [PATCH] Add source to PlayerExpChangeEvent
@ -18,7 +18,7 @@ index 9da8ae4..11f3b31 100644
this.die();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e7fa96c..777855d 100644
index 102ff6b..67669c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -44,6 +44,7 @@ import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
From 3e498c8197d48f4f8cdb709c7f7e980a54ae9af1 Mon Sep 17 00:00:00 2001
From 8f70d3bfbc06dc2d3b6ffeb06b2ca85c5797efe5 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Wed, 30 Nov 2016 20:56:58 -0600
Subject: [PATCH] Speedup BlockPos by fixing inlining

View File

@ -1,4 +1,4 @@
From 3fd7a8e63220cb6fe7d57df374d54cfc327b4354 Mon Sep 17 00:00:00 2001
From dfd4b6b5d6fb892d5456f3fa1782c0d286ff577a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 2 Dec 2016 00:11:43 -0500
Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e7ae4c706..51e05f414 100644
index e7ae4c7..51e05f4 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -286,7 +286,7 @@ public abstract class World implements IBlockAccess {
@ -19,5 +19,5 @@ index e7ae4c706..51e05f414 100644
public boolean a(BlockPosition blockposition, boolean flag) {
--
2.11.0
2.10.2