--- a/net/minecraft/world/entity/ai/goal/Goal.java
+++ b/net/minecraft/world/entity/ai/goal/Goal.java
@@ -46,6 +_,17 @@
         return this.flags;
     }
 
+
+    // Paper start - Mob Goal API
+    public boolean hasFlag(final Goal.Flag flag) {
+        return this.flags.contains(flag);
+    }
+
+    public void addFlag(final Goal.Flag flag) {
+        this.flags.add(flag);
+    }
+    // Paper end - Mob Goal API
+
     protected int adjustedTickDelay(int adjustment) {
         return this.requiresUpdateEveryTick() ? adjustment : reducedTickDelay(adjustment);
     }
@@ -62,7 +_,19 @@
         return (ServerLevel)level;
     }
 
+    // Paper start - Mob goal api
+    private com.destroystokyo.paper.entity.ai.PaperVanillaGoal<?> vanillaGoal;
+    public <T extends org.bukkit.entity.Mob> com.destroystokyo.paper.entity.ai.Goal<T> asPaperVanillaGoal() {
+        if (this.vanillaGoal == null) {
+            this.vanillaGoal = new com.destroystokyo.paper.entity.ai.PaperVanillaGoal<>(this);
+        }
+        //noinspection unchecked
+        return (com.destroystokyo.paper.entity.ai.Goal<T>) this.vanillaGoal;
+    }
+    // Paper end - Mob goal api
+
     public static enum Flag {
+        UNKNOWN_BEHAVIOR, // Paper - add UNKNOWN_BEHAVIOR
         MOVE,
         LOOK,
         JUMP,
