mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 04:32:11 -07:00
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 01bb6ba7 PR-936: Add new PersistentDataContainer methods and clean up docs bc145b90 PR-940: Create registry for banner pattern and cat type CraftBukkit Changes: cb2ea54de SPIGOT-7440, PR-1292: Fire EntityTeleportEvent for end gateways 4fea66e44 PR-1299: Add new PersistentDataContainer methods and clean up docs b483a20db PR-1303: Create registry for banner pattern and cat type 4642dd526 SPIGOT-7535: Fix maps not having an ID and also call MapInitializeEvent in more places
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: u9g <winworkswow@gmail.com>
|
||||
Date: Mon, 3 Jan 2022 23:27:21 -0500
|
||||
Subject: [PATCH] Add new overload to PersistentDataContainer#has
|
||||
|
||||
Adds the new overload: PersistentDataContainer#has(NamespacedKey key)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
+++ b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
@@ -0,0 +0,0 @@ public interface PersistentDataContainer {
|
||||
*/
|
||||
@NotNull
|
||||
PersistentDataAdapterContext getAdapterContext();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Returns if the persistent metadata provider has metadata registered
|
||||
+ * matching the provided key.
|
||||
+ *
|
||||
+ * @param key the key for which existence should be checked.
|
||||
+ *
|
||||
+ * @return whether the key exists
|
||||
+ *
|
||||
+ * @throws NullPointerException if the key to look up is null
|
||||
+ */
|
||||
+ boolean has(@NotNull NamespacedKey key);
|
||||
+ // Paper end
|
||||
}
|
@@ -10,10 +10,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
+++ b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
||||
@@ -0,0 +0,0 @@ public interface PersistentDataContainer {
|
||||
* @throws NullPointerException if the key to look up is null
|
||||
*/
|
||||
boolean has(@NotNull NamespacedKey key);
|
||||
@NotNull
|
||||
PersistentDataAdapterContext getAdapterContext();
|
||||
+
|
||||
+ // Paper start - byte array serialization
|
||||
+ /**
|
||||
+ * Serialize this {@link PersistentDataContainer} instance to a
|
||||
+ * byte array.
|
||||
@@ -43,8 +44,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param bytes the byte array to read from
|
||||
+ * @throws java.io.IOException if the byte array has an invalid format
|
||||
+ */
|
||||
+ default void readFromBytes(byte @NotNull [] bytes) throws java.io.IOException {
|
||||
+ default void readFromBytes(final byte @NotNull [] bytes) throws java.io.IOException {
|
||||
+ this.readFromBytes(bytes, true);
|
||||
+ }
|
||||
// Paper end
|
||||
+ // Paper end - byte array serialization
|
||||
}
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Wed, 8 Jun 2022 18:23:17 -0400
|
||||
Subject: [PATCH] Keyed Cat Type
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -0,0 +0,0 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
/**
|
||||
* Represents the various different cat types there are.
|
||||
*/
|
||||
- public enum Type {
|
||||
+ public enum Type implements org.bukkit.Keyed { // Paper
|
||||
TABBY,
|
||||
BLACK,
|
||||
RED,
|
||||
@@ -0,0 +0,0 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
WHITE,
|
||||
JELLIE,
|
||||
ALL_BLACK;
|
||||
+
|
||||
+ // Paper start
|
||||
+ private final org.bukkit.NamespacedKey key;
|
||||
+
|
||||
+ Type() {
|
||||
+ this.key = org.bukkit.NamespacedKey.minecraft(name().toLowerCase(java.util.Locale.ROOT));
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public org.bukkit.NamespacedKey getKey() {
|
||||
+ return key;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
// Paper Start - More cat api
|
@@ -327,8 +327,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -0,0 +0,0 @@ public interface Cat extends Tameable, Sittable {
|
||||
JELLIE,
|
||||
ALL_BLACK;
|
||||
return key;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Paper Start - More cat api
|
||||
|
Reference in New Issue
Block a user