1.16.2 Release (#4123)

PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues.

Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong.

This is now resolved.

Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me.

Please as always, backup your worlds and test before updating to 1.16.2!

If you update to 1.16.2, there is no going back to an older build than this.

---------------------------------

Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com>
Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com>
Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: commandblockguy <commandblockguy1@gmail.com>
Co-authored-by: DigitalRegent <misterwener@gmail.com>
Co-authored-by: ishland <ishlandmc@yeah.net>
This commit is contained in:
Daniel Ennis
2020-08-24 22:22:08 -04:00
parent 773a850390
commit 69ee95fa42
234 changed files with 2154 additions and 2036 deletions

View File

@@ -9,10 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
@@ -0,0 +0,0 @@ public interface ArmorStand extends LivingEntity {
* @param marker whether this is a marker
*/
void setMarker(boolean marker);
+
*/
ADDING;
}
+ // Paper start
+ /**
+ * Tests if this armor stand can move.

View File

@@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
+ .endsWith("_SPAWN_EGG")
+ .ensureSize("SPAWN_EGGS", 63);
+ .ensureSize("SPAWN_EGGS", 64);
+
+ /**
+ * Covers all colors of stained glass.

View File

@@ -356,6 +356,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ GoalKey<Slime> SLIME_RANDOM_JUMP = GoalKey.of(Slime.class, NamespacedKey.minecraft("slime_random_jump"));
+ GoalKey<Spider> SPIDER_MELEE_ATTACK = GoalKey.of(Spider.class, NamespacedKey.minecraft("spider_melee_attack"));
+ GoalKey<Spider> SPIDER_NEAREST_ATTACKABLE_TARGET = GoalKey.of(Spider.class, NamespacedKey.minecraft("spider_nearest_attackable_target"));
+ GoalKey<Strider> STRIDER_GO_TO_LAVA = GoalKey.of(Strider.class, NamespacedKey.minecraft("strider_go_to_lava"));
+ GoalKey<Squid> SQUID = GoalKey.of(Squid.class, NamespacedKey.minecraft("squid"));
+ GoalKey<Squid> SQUID_FLEE = GoalKey.of(Squid.class, NamespacedKey.minecraft("squid_flee"));
+ GoalKey<Turtle> TURTLE_BREED = GoalKey.of(Turtle.class, NamespacedKey.minecraft("turtle_breed"));

View File

@@ -177,6 +177,80 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/SmithingInventory.java b/src/main/java/org/bukkit/inventory/SmithingInventory.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/SmithingInventory.java
+++ b/src/main/java/org/bukkit/inventory/SmithingInventory.java
@@ -0,0 +0,0 @@
package org.bukkit.inventory;
+import org.jetbrains.annotations.Nullable; // Paper
+
/**
* Interface to the inventory of a Smithing table.
*/
-public interface SmithingInventory extends Inventory { }
+public interface SmithingInventory extends Inventory {
+
+ // Paper start
+ /**
+ * Gets the input equipment (first slot).
+ *
+ * @return input equipment item
+ */
+ @Nullable
+ default ItemStack getInputEquipment() {
+ return getItem(0);
+ }
+
+ /**
+ * Sets the input equipment (first slot).
+ *
+ * @param itemStack item to set
+ */
+ default void setInputEquipment(@Nullable ItemStack itemStack) {
+ setItem(0, itemStack);
+ }
+
+ /**
+ * Gets the input mineral (second slot).
+ *
+ * @return input mineral item
+ */
+ @Nullable
+ default ItemStack getInputMineral() {
+ return getItem(1);
+ }
+
+ /**
+ * Sets the input mineral (second slot).
+ *
+ * @param itemStack item to set
+ */
+ default void setInputMineral(@Nullable ItemStack itemStack) {
+ setItem(1, itemStack);
+ }
+
+ /**
+ * Gets the result item.
+ *
+ * @return result
+ */
+ @Nullable
+ default ItemStack getResult() {
+ return getItem(2);
+ }
+
+ /**
+ * Sets the result item.
+ *
+ * @param itemStack item to set
+ */
+ default void setResult(@Nullable ItemStack itemStack) {
+ setItem(2, itemStack);
+ }
+ // Paper end
+}
diff --git a/src/main/java/org/bukkit/inventory/StonecutterInventory.java b/src/main/java/org/bukkit/inventory/StonecutterInventory.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/StonecutterInventory.java

View File

@@ -12,7 +12,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
*/
@Deprecated
public void setShoulderEntityRight(@Nullable Entity entity);
+
+ // Paper start - Add method to open already placed sign
+ /**
+ * Opens an editor window for the specified sign
@@ -21,4 +20,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ void openSign(@NotNull org.bukkit.block.Sign sign);
+ // Paper end
}
/**
* Make the entity drop the item in their hand.

View File

@@ -0,0 +1,65 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 23 Aug 2020 16:32:03 +0200
Subject: [PATCH] Add moon phase API
diff --git a/src/main/java/io/papermc/paper/world/MoonPhase.java b/src/main/java/io/papermc/paper/world/MoonPhase.java
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/io/papermc/paper/world/MoonPhase.java
@@ -0,0 +0,0 @@
+package io.papermc.paper.world;
+
+import org.jetbrains.annotations.NotNull;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum MoonPhase {
+ FULL_MOON(0L),
+ WANING_GIBBOUS(1L),
+ LAST_QUARTER(2L),
+ WANING_CRESCENT(3L),
+ NEW_MOON(4L),
+ WAXING_CRESCENT(5L),
+ FIRST_QUARTER(6L),
+ WAXING_GIBBOUS(7L);
+
+ private final long day;
+
+ MoonPhase(long day) {
+ this.day = day;
+ }
+
+ private static final Map<Long, MoonPhase> BY_DAY = new HashMap<>();
+
+ static {
+ for (MoonPhase phase : values()) {
+ BY_DAY.put(phase.day, phase);
+ }
+ }
+
+ @NotNull
+ public static MoonPhase getPhase(long day) {
+ return BY_DAY.get(day % 8L);
+ }
+}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @return The amount of Players in this world
*/
int getPlayerCount();
+
+ /**
+ * @return the current moon phase at the current time in the world
+ */
+ @NotNull
+ io.papermc.paper.world.MoonPhase getMoonPhase();
// Paper end
/**

View File

@@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/buk
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -0,0 +0,0 @@ public interface Zombie extends Monster {
@@ -0,0 +0,0 @@ public interface Zombie extends Monster, Ageable {
* @param time new conversion time
*/
void setConversionTime(int time);

View File

@@ -0,0 +1,48 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mariell Hoversholm <proximyst@proximyst.com>
Date: Sat, 22 Aug 2020 23:59:25 +0200
Subject: [PATCH] Add #setMaxPlayers API
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
return server.getMaxPlayers();
}
+ // Paper start
+ /**
+ * Set the maximum amount of players which can login to this server.
+ *
+ * @param maxPlayers the amount of players this server allows
+ */
+ public static void setMaxPlayers(int maxPlayers) {
+ server.setMaxPlayers(maxPlayers);
+ }
+ // Paper end
+
/**
* Get the game port that the server runs on.
*
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
*/
public int getMaxPlayers();
+ // Paper start
+ /**
+ * Set the maximum amount of players which can login to this server.
+ *
+ * @param maxPlayers the amount of players this server allows
+ */
+ public void setMaxPlayers(int maxPlayers);
+ // Paper end
+
/**
* Get the game port that the server runs on.
*

View File

@@ -11,14 +11,6 @@ diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
@@ -0,0 +0,0 @@
package org.bukkit.entity;
import org.bukkit.inventory.EntityEquipment;
+import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
import org.jetbrains.annotations.NotNull;
@@ -0,0 +0,0 @@ public interface ArmorStand extends LivingEntity {
* Returns the item the armor stand is currently holding.
*

View File

@@ -56,26 +56,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return "(" + plugins.size() + "): " + pluginList.toString();
+ // Paper end
}
// Spigot start
@NotNull
private BaseComponent[] getPluginListSpigot() {
- Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
- ComponentBuilder pluginList = new ComponentBuilder("Plugins (" + plugins.length + "): ");
+ // Paper start
+ TreeMap<String, Plugin> plugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
+ plugins.put(plugin.getDescription().getName(), plugin);
+ }
+ ComponentBuilder pluginList = new ComponentBuilder("Plugins (" + plugins.size() + "): ");
+ // Paper end
int index = 0;
- for (Plugin plugin : plugins) {
+ // Paper start
+ for (Map.Entry<String, Plugin> entry : plugins.entrySet()) {
+ Plugin plugin = entry.getValue();
+ // Paper end
if (index++ > 0) {
pluginList.append(", ", FormatRetention.NONE).color(net.md_5.bungee.api.ChatColor.WHITE);
}
+
}

View File

@@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<version>1.16.2-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>

View File

@@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 22 Sep 2018 18:41:01 -0400
Subject: [PATCH] Remove Precondition on name for AttributeModifier
Vanilla allows empty names
diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/attribute/AttributeModifier.java
+++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java
@@ -0,0 +0,0 @@ public class AttributeModifier implements ConfigurationSerializable {
public AttributeModifier(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull Operation operation, @Nullable EquipmentSlot slot) {
Validate.notNull(uuid, "UUID cannot be null");
- Validate.notEmpty(name, "Name cannot be empty");
+ //Validate.notEmpty(name, "Name cannot be empty"); // Paper
Validate.notNull(operation, "Operation cannot be null");
this.uuid = uuid;
- this.name = name;
+ this.name = name != null ? name : ""; // Paper
this.amount = amount;
this.operation = operation;
this.slot = slot;