13
0
geforkt von Mirrors/Paper

Add Owner UUID api for AreaEffectCloud (#9364)

Dieser Commit ist enthalten in:
Jake Potrebic 2023-07-13 14:26:42 -07:00
Ursprung eb5257d3a5
Commit 5be287d725
2 geänderte Dateien mit 50 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Date: Fri, 28 May 2021 21:06:59 -0400
Subject: [PATCH] Missing Entity Behavior API
Subject: [PATCH] Missing Entity API
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
@ -151,6 +151,31 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void setEating(boolean eating);
+ // Paper end - Horse API
}
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
@@ -0,0 +0,0 @@ public interface AreaEffectCloud extends Entity {
* @param source the {@link ProjectileSource} that threw the LingeringPotion
*/
public void setSource(@Nullable ProjectileSource source);
+
+ // Paper start - owner API
+ /**
+ * Get the entity UUID for the owner of this area effect cloud.
+ *
+ * @return the entity owner uuid or null
+ */
+ @Nullable java.util.UUID getOwnerUniqueId();
+
+ /**
+ * Sets the entity UUID for the owner of this area effect cloud.
+ *
+ * @param ownerUuid the entity owner uuid or null to clear
+ */
+ void setOwnerUniqueId(@Nullable java.util.UUID ownerUuid);
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Bat.java b/src/main/java/org/bukkit/entity/Bat.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Bat.java

Datei anzeigen

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Date: Mon, 21 Jun 2021 23:56:07 -0400
Subject: [PATCH] Missing Entity Behavior API
Subject: [PATCH] Missing Entity API
== AT ==
public net.minecraft.world.entity.animal.Fox isDefending()Z
@ -30,6 +30,7 @@ public net.minecraft.world.entity.npc.WanderingTrader getWanderTarget()Lnet/mine
public net.minecraft.world.entity.animal.AbstractSchoolingFish leader
public net.minecraft.world.entity.animal.AbstractSchoolingFish schoolSize
public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks
public net.minecraft.world.entity.AreaEffectCloud ownerUUID
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
@ -428,6 +429,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end - Horse API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
@@ -0,0 +0,0 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud
this.getHandle().setOwner(null);
}
}
+
+ // Paper start - owner API
+ @Override
+ public java.util.UUID getOwnerUniqueId() {
+ return this.getHandle().ownerUUID;
+ }
+
+ @Override
+ public void setOwnerUniqueId(final java.util.UUID ownerUuid) {
+ this.getHandle().setOwner(null);
+ this.getHandle().ownerUUID = ownerUuid;
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java