mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b097a24 Expose isUnderWater to Entity (#8454) PaperMC/Paper@6b26cfc Add missing Entity + Projectile API (#7632) PaperMC/Paper@de2d2d4 Add PlayerInventorySlotChangeEvent (#7321) PaperMC/Paper@f7c8d79 Fix stacktrace in server tests PaperMC/Paper@b9cf1ac Fix a classloading issue in tests (#8459) PaperMC/Paper@7fe34e9 Make CraftMinecartTNT public PaperMC/Paper@514a606 Elder Guardian appearance API (#8455) PaperMC/Paper@2094011 Update settings directory path in exceptions (#7968) PaperMC/Paper@0bdf997 Avoid cycle deprecation (#8466) PaperMC/Paper@eb68bd4 Allow changing bed's 'occupied' property (#8458)
This commit is contained in:
@@ -5,24 +5,15 @@ Subject: [PATCH] Llama API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Llama.java b/src/main/java/org/bukkit/entity/Llama.java
|
||||
index d23226ccb0f6c25028f000ce31346cd0a8898e6a..1ef9479c962b3f4f6fed46671a1209c34040d16d 100644
|
||||
index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc04d6a829 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Llama.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Llama.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
import com.destroystokyo.paper.entity.RangedEntity;
|
||||
import org.bukkit.inventory.LlamaInventory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable; // Purpur
|
||||
|
||||
/**
|
||||
* Represents a Llama.
|
||||
@@ -67,4 +68,65 @@ public interface Llama extends ChestedHorse, RangedEntity { // Paper
|
||||
@NotNull
|
||||
@Override
|
||||
LlamaInventory getInventory();
|
||||
@@ -119,4 +119,20 @@ public interface Llama extends ChestedHorse, RangedEntity { // Paper
|
||||
@org.jetbrains.annotations.Nullable
|
||||
Llama getCaravanTail();
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur start
|
||||
+
|
||||
+ /**
|
||||
+ * Check if this Llama should attempt to join a caravan
|
||||
+ *
|
||||
@@ -36,50 +27,6 @@ index d23226ccb0f6c25028f000ce31346cd0a8898e6a..1ef9479c962b3f4f6fed46671a1209c3
|
||||
+ * @param shouldJoinCaravan True to allow joining a caravan
|
||||
+ */
|
||||
+ void setShouldJoinCaravan(boolean shouldJoinCaravan);
|
||||
+
|
||||
+ /**
|
||||
+ * Check if Llama is in a caravan
|
||||
+ *
|
||||
+ * @return True if in caravan
|
||||
+ */
|
||||
+ boolean inCaravan();
|
||||
+
|
||||
+ /**
|
||||
+ * Join a caravan
|
||||
+ *
|
||||
+ * @param llama Head of caravan to join
|
||||
+ */
|
||||
+ void joinCaravan(@NotNull Llama llama);
|
||||
+
|
||||
+ /**
|
||||
+ * Leave current caravan if in one
|
||||
+ */
|
||||
+ void leaveCaravan();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if another Llama is following this Llama
|
||||
+ *
|
||||
+ * @return True if being followed in the caravan
|
||||
+ */
|
||||
+ boolean hasCaravanTail();
|
||||
+
|
||||
+ /**
|
||||
+ * Get the Llama that this Llama is following
|
||||
+ * <p>
|
||||
+ * Does not necessarily mean the leader of the entire caravan
|
||||
+ *
|
||||
+ * @return The Llama being followed
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ Llama getCaravanHead();
|
||||
+
|
||||
+ /**
|
||||
+ * Get the Llama following this Llama, if any
|
||||
+ *
|
||||
+ * @return The Llama following this one
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ Llama getCaravanTail();
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/event/entity/LlamaJoinCaravanEvent.java b/src/main/java/org/purpurmc/purpur/event/entity/LlamaJoinCaravanEvent.java
|
||||
|
||||
Reference in New Issue
Block a user