Updated Upstream (Bukkit/CraftBukkit) (#8823)

This commit is contained in:
Jake Potrebic
2023-02-07 07:55:53 -08:00
parent 3212d9fcf5
commit 5fba40cc67
6 changed files with 10 additions and 43 deletions

View File

@@ -8,27 +8,12 @@ diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chun
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -0,0 +0,0 @@
package org.bukkit;
import java.util.Collection;
+import java.util.function.Predicate;
+
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.data.BlockData;
@@ -0,0 +0,0 @@ public interface Chunk extends PersistentDataHolder {
@NotNull
Entity[] getEntities();
+ // Paper start
/**
* Get a list of all tile entities in the chunk.
*
* @return The tile entities.
*/
@NotNull
- BlockState[] getTileEntities();
+ // Paper start
+ default BlockState[] getTileEntities() {
+ return getTileEntities(true);
+ }
@@ -50,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @return The tile entities.
+ */
+ @NotNull
+ Collection<BlockState> getTileEntities(@NotNull Predicate<Block> blockPredicate, boolean useSnapshot);
+ Collection<BlockState> getTileEntities(java.util.function.@NotNull Predicate<Block> blockPredicate, boolean useSnapshot);
+ // Paper end
/**

View File

@@ -126,8 +126,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
*/
- @Deprecated
public NamespacedKey(@NotNull String namespace, @NotNull String key) {
Preconditions.checkArgument(namespace != null && VALID_NAMESPACE.matcher(namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
Preconditions.checkArgument(key != null && VALID_KEY.matcher(key).matches(), "Invalid key. Must be [a-z0-9/._-]: %s", key);
Preconditions.checkArgument(namespace != null && isValidNamespace(namespace), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
Preconditions.checkArgument(key != null && isValidKey(key), "Invalid key. Must be [a-z0-9/._-]: %s", key);
diff --git a/src/main/java/org/bukkit/NetherWartsState.java b/src/main/java/org/bukkit/NetherWartsState.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/NetherWartsState.java