Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
1e39773b53
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: 9d0221aa API to get client side view distance. 9be7f0ea SPIGOT-4395: Additions to PlayerBedEnterEvent. 01e534c6 Minor cosmetic cleanups to imports etc CraftBukkit Changes:96c461b3
API to get client side view distance.e2785f4e
Remove note about development builda8000588
SPIGOT-4395: Additions to PlayerBedEnterEvent. Spigot Changes: 117d4f7e Rebuild patches
70 Zeilen
2.4 KiB
Diff
70 Zeilen
2.4 KiB
Diff
From d79b1de71ec4b1352fe7c1c060ec3df5b79dc1f7 Mon Sep 17 00:00:00 2001
|
|
From: Byteflux <byte@byteflux.net>
|
|
Date: Mon, 29 Feb 2016 17:50:31 -0600
|
|
Subject: [PATCH] Entity Origin API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
|
index 4f5eb3676..d793de62c 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -557,4 +557,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable {
|
|
@Override
|
|
Spigot spigot();
|
|
// Spigot end
|
|
+
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Gets the location where this entity originates from.
|
|
+ * <p>
|
|
+ * This value can be null if the entity hasn't yet been added to the world.
|
|
+ *
|
|
+ * @return Location where entity originates or null if not yet added
|
|
+ */
|
|
+ Location getOrigin();
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
|
|
index 0cd830d90..170a9aee5 100644
|
|
--- a/src/main/java/org/bukkit/entity/FallingBlock.java
|
|
+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
|
|
@@ -51,4 +51,15 @@ public interface FallingBlock extends Entity {
|
|
* @param hurtEntities whether entities will be damaged by this block.
|
|
*/
|
|
void setHurtEntities(boolean hurtEntities);
|
|
+
|
|
+ /**
|
|
+ * Gets the source block location of the FallingBlock
|
|
+ *
|
|
+ * @return the source block location the FallingBlock was spawned from
|
|
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
|
+ */
|
|
+ @Deprecated
|
|
+ default org.bukkit.Location getSourceLoc() {
|
|
+ return this.getOrigin();
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
|
|
index a439eaf56..04cc23ef1 100644
|
|
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
|
|
+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
|
|
@@ -37,4 +37,15 @@ public interface TNTPrimed extends Explosive {
|
|
* @return the source of this primed TNT
|
|
*/
|
|
public Entity getSource();
|
|
+
|
|
+ /**
|
|
+ * Gets the source block location of the TNTPrimed
|
|
+ *
|
|
+ * @return the source block location the TNTPrimed was spawned from
|
|
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
|
+ */
|
|
+ @Deprecated
|
|
+ default org.bukkit.Location getSourceLoc() {
|
|
+ return this.getOrigin();
|
|
+ }
|
|
}
|
|
--
|
|
2.19.1
|
|
|