From b0348aea3ebe7e94846806701e8386730c7a4c03 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Fri, 20 Jan 2017 05:21:44 -0600 Subject: [PATCH] Update upstream B/CB/S --- .../Arrow-pickup-rule-API.patch | 17 ++++-- .../Arrow-pickup-rule-API.patch | 56 ------------------- ...llow-entities-to-ride-themselves-572.patch | 4 +- .../Enforce-Sync-Player-Saves.patch | 2 +- ...-API-Replenishable-Lootables-Feature.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 8 files changed, 19 insertions(+), 68 deletions(-) delete mode 100644 Spigot-Server-Patches/Arrow-pickup-rule-API.patch diff --git a/Spigot-API-Patches/Arrow-pickup-rule-API.patch b/Spigot-API-Patches/Arrow-pickup-rule-API.patch index 6bdc17f8e4..a1c0e45696 100644 --- a/Spigot-API-Patches/Arrow-pickup-rule-API.patch +++ b/Spigot-API-Patches/Arrow-pickup-rule-API.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Arrow.java +++ b/src/main/java/org/bukkit/entity/Arrow.java @@ -0,0 +0,0 @@ public interface Arrow extends Projectile { - */ - public void setCritical(boolean critical); + CREATIVE_ONLY + } + // Paper start + /** @@ -20,16 +20,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * not fired from a bow with the infinity enchantment.

+ * + * @return The pickup rule ++ * @deprecated Use {@link Arrow#getPickupStatus()} as an upstream compatible replacement for this function + */ -+ PickupRule getPickupRule(); ++ @Deprecated ++ default PickupRule getPickupRule() { ++ return PickupRule.valueOf(this.getPickupStatus().name()); ++ } + + /** + * Set the rule for which players can pickup this arrow as an item. + * + * @param rule The pickup rule ++ * @deprecated Use {@link Arrow#setPickupStatus(PickupStatus)} with {@link PickupStatus} as an upstream compatible replacement for this function + */ -+ void setPickupRule(PickupRule rule); ++ @Deprecated ++ default void setPickupRule(PickupRule rule) { ++ this.setPickupStatus(PickupStatus.valueOf(rule.name())); ++ } + ++ @Deprecated + enum PickupRule { + DISALLOWED, + ALLOWED, diff --git a/Spigot-Server-Patches/Arrow-pickup-rule-API.patch b/Spigot-Server-Patches/Arrow-pickup-rule-API.patch deleted file mode 100644 index 12d3bd1249..0000000000 --- a/Spigot-Server-Patches/Arrow-pickup-rule-API.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jedediah Smith -Date: Fri, 4 Mar 2016 03:16:11 -0500 -Subject: [PATCH] Arrow pickup rule API - - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -@@ -0,0 +0,0 @@ public class CraftArrow extends AbstractProjectile implements Arrow { - getHandle().shooter = ((CraftLivingEntity) shooter).getHandle(); - } - -+ // Paper start -+ @Override -+ public PickupRule getPickupRule() { -+ return convertPickupRule(this.getHandle().fromPlayer); -+ } -+ -+ @Override -+ public void setPickupRule(PickupRule rule) { -+ this.getHandle().fromPlayer = convertPickupRule(rule); -+ } -+ -+ public static PickupRule convertPickupRule(EntityArrow.PickupStatus nms) { -+ switch (nms) { -+ case DISALLOWED: -+ return PickupRule.DISALLOWED; -+ case ALLOWED: -+ return PickupRule.ALLOWED; -+ case CREATIVE_ONLY: -+ return PickupRule.CREATIVE_ONLY; -+ default: -+ throw new IllegalStateException(); -+ } -+ } -+ -+ public static EntityArrow.PickupStatus convertPickupRule(PickupRule bukkit) { -+ switch (bukkit) { -+ case DISALLOWED: -+ return EntityArrow.PickupStatus.DISALLOWED; -+ case ALLOWED: -+ return EntityArrow.PickupStatus.ALLOWED; -+ case CREATIVE_ONLY: -+ return EntityArrow.PickupStatus.CREATIVE_ONLY; -+ default: -+ throw new IllegalStateException(); -+ } -+ } -+ // Paper end -+ - // Spigot start - private final Arrow.Spigot spigot = new Arrow.Spigot() - { --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index 4f28264599..55a7c648da 100644 --- a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch @@ -16,6 +16,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (entity.bB() != this) { throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { --- -2.9.3 (Apple Git-75) - +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch index 08e0786d83..5fc4b39cdc 100644 --- a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 2f527f6ce..6a1e4f0f6 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index 72d44a3eed..ca696c8e9b 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -713,7 +713,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public CraftHopper(final Block block) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +index 8a7ce92b..02f56bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java @@ -0,0 +0,0 @@ diff --git a/work/Bukkit b/work/Bukkit index 39c5d6b4a1..4bef447a07 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 39c5d6b4a11b3e7c2eeb12a8bae5495f95ccc247 +Subproject commit 4bef447a073792a0858dc49e33593acb1c1948f5 diff --git a/work/CraftBukkit b/work/CraftBukkit index 775f1e1f7f..4d3bf20155 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 775f1e1f7f5783860ccb16feaf8c0cc53a6f9c18 +Subproject commit 4d3bf2015504897fc69af2a209d4c8bbe217394d diff --git a/work/Spigot b/work/Spigot index 7d78b81e39..b32c8f871b 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 7d78b81e398e61a69a774f05f427c24f0debd4fd +Subproject commit b32c8f871b2da575c1d9e9fa0532ba3e7e2eaa54