mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix some pathfinders firing even when mounted
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 855ab1241e8756277c826720d9d4ecb282bb0c7d Mon Sep 17 00:00:00 2001
|
||||
From f76fd5d572d79451fb1c06d8ab241e52054a8505 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 30 Apr 2019 19:17:21 -0500
|
||||
Subject: [PATCH] Integrate ridables
|
||||
@@ -80,10 +80,10 @@ Subject: [PATCH] Integrate ridables
|
||||
.../controller/ControllerMoveWASDFlying.java | 62 +++++++++
|
||||
.../ControllerMoveWASDFlyingWithSpacebar.java | 65 ++++++++++
|
||||
.../controller/ControllerMoveWASDWater.java | 42 ++++++
|
||||
.../pathfinder/PathfinderGoalHasRider.java | 17 +++
|
||||
.../pathfinder/PathfinderGoalHasRider.java | 20 +++
|
||||
.../craftbukkit/entity/CraftLivingEntity.java | 10 ++
|
||||
.../bukkit/craftbukkit/entity/CraftMob.java | 12 ++
|
||||
79 files changed, 1253 insertions(+), 114 deletions(-)
|
||||
79 files changed, 1256 insertions(+), 114 deletions(-)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java
|
||||
@@ -3149,20 +3149,23 @@ index 000000000..74ff48259
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java
|
||||
new file mode 100644
|
||||
index 000000000..93d27ecc5
|
||||
index 000000000..e3a9fd9d2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java
|
||||
@@ -0,0 +1,17 @@
|
||||
@@ -0,0 +1,20 @@
|
||||
+package net.pl3x.purpur.pathfinder;
|
||||
+
|
||||
+import net.minecraft.server.Entity;
|
||||
+import net.minecraft.server.PathfinderGoal;
|
||||
+
|
||||
+import java.util.EnumSet;
|
||||
+
|
||||
+public class PathfinderGoalHasRider extends PathfinderGoal {
|
||||
+ public final Entity entity;
|
||||
+
|
||||
+ public PathfinderGoalHasRider(Entity entity) {
|
||||
+ this.entity = entity;
|
||||
+ this.a(EnumSet.of(Type.JUMP, Type.MOVE, Type.LOOK, Type.TARGET));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
||||
Reference in New Issue
Block a user