mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Merge #26 Move some Goal from Server to Api
We move the Find Crystal and the Orbit Crystal from Purpur-Server to Purpur-API for the those who use the Mob Goal API and this can be useful to give this goal to mob
This commit is contained in:
committed by
William Blake Galbreath
parent
e7b1eb157b
commit
a03667bdd0
@@ -1,17 +1,33 @@
|
||||
From ccac8f08b0f9555958a6bf423cbe7cbd90756fe1 Mon Sep 17 00:00:00 2001
|
||||
From 4bca53682d571ec4fcd1b4dc823ba12f23fef801 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 4 May 2019 00:57:16 -0500
|
||||
Subject: [PATCH] Ridables
|
||||
|
||||
---
|
||||
.../paper/entity/ai/VanillaGoal.java | 4 ++
|
||||
.../event/entity/RidableSpacebarEvent.java | 37 ++++++++++++++++++
|
||||
src/main/java/org/bukkit/entity/Entity.java | 38 +++++++++++++++++++
|
||||
2 files changed, 75 insertions(+)
|
||||
3 files changed, 79 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
index dc60d945..751b9a5e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
@@ -138,6 +138,10 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
GoalKey<Mob> FOLLOW_ENTITY = GoalKey.of(Mob.class, NamespacedKey.minecraft("follow_entity"));
|
||||
GoalKey<Tameable> FOLLOW_OWNER = GoalKey.of(Tameable.class, NamespacedKey.minecraft("follow_owner"));
|
||||
GoalKey<Animals> FOLLOW_PARENT = GoalKey.of(Animals.class, NamespacedKey.minecraft("follow_parent"));
|
||||
+ // Purpur start
|
||||
+ GoalKey<Phantom> FIND_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("find_crystal_goal"));
|
||||
+ GoalKey<Phantom> ORBIT_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal_goal"));
|
||||
+ // Purpur end
|
||||
GoalKey<SkeletonHorse> HORSE_TRAP = GoalKey.of(SkeletonHorse.class, NamespacedKey.minecraft("horse_trap"));
|
||||
GoalKey<Creature> HURT_BY_TARGET = GoalKey.of(Creature.class, NamespacedKey.minecraft("hurt_by_target"));
|
||||
GoalKey<Mob> INTERACT = GoalKey.of(Mob.class, NamespacedKey.minecraft("interact"));
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..c0ec5a130
|
||||
index 00000000..c0ec5a13
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java
|
||||
@@ -0,0 +1,37 @@
|
||||
@@ -53,7 +69,7 @@ index 000000000..c0ec5a130
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 5518ecd21..809021b20 100644
|
||||
index 5518ecd2..809021b2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -656,4 +656,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -100,5 +116,5 @@ index 5518ecd21..809021b20 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
2.26.0.windows.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user