2017-11-08 16:13:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								From 31343663dd75e733ce5d1112dabc76dae04f3ec1 Mon Sep 17 00:00:00 2001
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								From: Byteflux <byte@byteflux.net>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Date: Mon, 29 Feb 2016 17:50:31 -0600
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Subject: [PATCH] Entity Origin API
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-08 16:13:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index 219ec25f..69fbdb3c 100644
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								--- a/src/main/java/org/bukkit/entity/Entity.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/src/main/java/org/bukkit/entity/Entity.java
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-08 16:13:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -497,4 +497,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable {
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-15 11:25:20 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								     @Override
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								     Spigot spigot();
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-15 11:25:20 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								     // Spigot end
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    // 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
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 }
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-02 23:41:05 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index bc56fa22..ad2cd13e 100644
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								--- a/src/main/java/org/bukkit/entity/FallingBlock.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-02 23:41:05 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -59,4 +59,15 @@ public interface FallingBlock extends Entity {
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      * @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
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+     * @deprecated replaced by {@link Entity#getOrigin()}
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+     */
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+    @Deprecated
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-02 23:41:05 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+    default org.bukkit.Location getSourceLoc() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+        return this.getOrigin();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    }
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-02 23:41:05 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index fcd0a9b2..2abef57c 100644
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-02 23:41:05 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -35,4 +35,15 @@ public interface TNTPrimed extends Explosive {
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      * @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
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+     * @deprecated replaced by {@link Entity#getOrigin()}
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+     */
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-25 02:02:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+    @Deprecated
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-02 23:41:05 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+    default org.bukkit.Location getSourceLoc() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+        return this.getOrigin();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    }
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								-- 
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-08 16:13:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								2.14.3
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 |