mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-17 16:15:24 +01:00
14513c3ce1
Upstream has released updates that appears 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: 92f24ff2 SPIGOT-5158: Add SuspiciousStewMeta b9bf4dae SPIGOT-5310: Add Chunk.contains b2adbb45 Add API to get/set inhabited time of a Chunk e3c812dd SPIGOT-5250: Add ChunkSnapshot.contains 71973d85 SPIGOT-5255: Raid / patrol spawn reasons CraftBukkit Changes:03b145b3
SPIGOT-5158: Add SuspiciousStewMeta9aa74304
SPIGOT-5310: Add Chunk.contains7ef2b20d
SPIGOT-3308: RecipeIterator cannot longer remove recipes023f438c
Add API to get/set inhabited time of a Chunkb79a86ed
SPIGOT-5250: Add ChunkSnapshot.containsaa492e55
SPIGOT-5255: Raid / patrol spawn reasons
42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
From 7c0eaa2f5e46b50360b8fa61518f57f5af913e00 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 15 Aug 2018 01:04:58 -0400
|
|
Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
|
|
index 7b0424d5..7909caef 100644
|
|
--- a/src/main/java/org/bukkit/Chunk.java
|
|
+++ b/src/main/java/org/bukkit/Chunk.java
|
|
@@ -102,13 +102,26 @@ public interface Chunk {
|
|
@NotNull
|
|
Entity[] getEntities();
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Get a list of all tile entities in the chunk.
|
|
+ *
|
|
+ * @return The tile entities.
|
|
+ */
|
|
+ @NotNull
|
|
+ default BlockState[] getTileEntities() {
|
|
+ return getTileEntities(true);
|
|
+ }
|
|
+
|
|
/**
|
|
* Get a list of all tile entities in the chunk.
|
|
*
|
|
+ * @param useSnapshot Take snapshots or direct references
|
|
* @return The tile entities.
|
|
*/
|
|
@NotNull
|
|
- BlockState[] getTileEntities();
|
|
+ BlockState[] getTileEntities(boolean useSnapshot);
|
|
+ // Paper end
|
|
|
|
/**
|
|
* Checks if the chunk is loaded.
|
|
--
|
|
2.23.0
|
|
|