mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
c0d07c1b67
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: f009c3dd SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround e677c370 Update ECJ version 5058a35d SPIGOT-5860: Item.setItemStack should be NotNull CraftBukkit Changes:d77f4d9b
SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround53c95627
SPIGOT-5865: Piglin does not trigger EntityPickupItemEvent2ab04d24
Update ECJ version7884e079
SPIGOT-5868: Blocks do not tick in custom nether / end2a848286
SPIGOT-5863: Don't check colour in scoreboard length validationf2cbce30
SPIGOT-5866: Beehive unknown TargetReason Spigot Changes: ad703da0 SPIGOT-5870: /plugins "website" field shows "version" 1a27cfd8 #98: Improve output of /plugins command using text components 732d5bab Disable checkstyle in Spigot blocks 0199a9a6 #97: Add Memory Usage to Ticks Per Second Command. 33ea98fc SPIGOT-5858: NPE: Joining the server with an invalid dimension
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 4 Jul 2018 02:25:48 -0400
|
|
Subject: [PATCH] Entity#getChunk API
|
|
|
|
Get the chunk the entity is currently registered to
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
|
index 15e9ecd898b27d87a2d4f05c5b22de7c1b9a260c..d9922f0777d018f1e6c5673b9fc907fde3fbfa8d 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
import java.util.UUID;
|
|
+import org.bukkit.Chunk; // Paper
|
|
import org.bukkit.EntityEffect;
|
|
import org.bukkit.Location;
|
|
import org.bukkit.Nameable;
|
|
@@ -617,5 +618,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
|
* @return True if entity spawned from a mob spawner
|
|
*/
|
|
boolean fromMobSpawner();
|
|
+
|
|
+ /**
|
|
+ * Gets the latest chunk an entity is currently or was in.
|
|
+ *
|
|
+ * @return The current, or most recent chunk if the entity is invalid (which may load the chunk)
|
|
+ */
|
|
+ @NotNull
|
|
+ Chunk getChunk();
|
|
// Paper end
|
|
}
|