mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
More ridable wither fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From fab88622b6aa59230bfa0157678353f3f3bbf130 Mon Sep 17 00:00:00 2001
|
||||
From 21521a8e2d5fd4f0762f423b3feb8daf89fee712 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 6 Feb 2020 19:53:59 -0600
|
||||
Subject: [PATCH] Ridables
|
||||
@@ -77,7 +77,7 @@ Subject: [PATCH] Ridables
|
||||
.../server/EntityVillagerTrader.java | 18 +
|
||||
.../minecraft/server/EntityVindicator.java | 19 +
|
||||
.../net/minecraft/server/EntityWitch.java | 21 +-
|
||||
.../net/minecraft/server/EntityWither.java | 40 +-
|
||||
.../net/minecraft/server/EntityWither.java | 51 +-
|
||||
.../java/net/minecraft/server/EntityWolf.java | 121 ++--
|
||||
.../net/minecraft/server/EntityZombie.java | 19 +
|
||||
.../minecraft/server/EntityZombieHusk.java | 17 +
|
||||
@@ -96,7 +96,7 @@ Subject: [PATCH] Ridables
|
||||
.../controller/ControllerMoveWASDWater.java | 43 ++
|
||||
.../pathfinder/PathfinderGoalHasRider.java | 21 +
|
||||
.../craftbukkit/entity/CraftEntity.java | 27 +
|
||||
92 files changed, 3095 insertions(+), 198 deletions(-)
|
||||
92 files changed, 3104 insertions(+), 200 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
|
||||
@@ -4317,10 +4317,19 @@ index 1432d3f6bf..447387bd78 100644
|
||||
this.targetSelector.a(2, this.bz);
|
||||
this.targetSelector.a(3, this.bA);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
index 8977c3516b..7b8b033d6a 100644
|
||||
index 8977c3516b..459d85baa0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
@@ -39,15 +39,40 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
@@ -18,7 +18,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b);
|
||||
private static final DataWatcherObject<Integer> c = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b);
|
||||
private static final DataWatcherObject<Integer> d = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b);
|
||||
- private static final List<DataWatcherObject<Integer>> bw = ImmutableList.of(EntityWither.b, EntityWither.c, EntityWither.d);
|
||||
+ private static final List<DataWatcherObject<Integer>> bw = ImmutableList.of(EntityWither.b, EntityWither.c, EntityWither.d); private static List<DataWatcherObject<Integer>> targetList() { return bw; } // Purpur - OBFHELPER
|
||||
private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b);
|
||||
private final float[] by = new float[2];
|
||||
private final float[] bz = new float[2];
|
||||
@@ -39,15 +39,47 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.getNavigation().d(true);
|
||||
this.f = 50;
|
||||
@@ -4347,6 +4356,13 @@ index 8977c3516b..7b8b033d6a 100644
|
||||
+ public double getMaxY() {
|
||||
+ return world.purpurConfig.witherMaxY;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onMount(EntityHuman entityhuman) {
|
||||
+ this.datawatcher.set(targetList().get(0), 0);
|
||||
+ this.datawatcher.set(targetList().get(1), 0);
|
||||
+ this.datawatcher.set(targetList().get(2), 0);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
@@ -4362,7 +4378,16 @@ index 8977c3516b..7b8b033d6a 100644
|
||||
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0]));
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 0, false, false, EntityWither.bG));
|
||||
}
|
||||
@@ -189,6 +214,13 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
@@ -125,7 +157,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
|
||||
this.setMot(vec3d);
|
||||
- if (b(vec3d) > 0.05D) {
|
||||
+ if (!hasRider() && b(vec3d) > 0.05D) { // Purpur
|
||||
this.yaw = (float) MathHelper.d(vec3d.z, vec3d.x) * 57.295776F - 90.0F;
|
||||
}
|
||||
|
||||
@@ -189,6 +221,13 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
|
||||
@Override
|
||||
protected void mobTick() {
|
||||
@@ -4376,7 +4401,7 @@ index 8977c3516b..7b8b033d6a 100644
|
||||
int i;
|
||||
|
||||
if (this.eq() > 0) {
|
||||
@@ -523,11 +555,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
@@ -523,11 +562,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
|
||||
public int getHeadTarget(int i) {
|
||||
@@ -4390,7 +4415,7 @@ index 8977c3516b..7b8b033d6a 100644
|
||||
}
|
||||
|
||||
public boolean J_() {
|
||||
@@ -541,7 +573,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
@@ -541,7 +580,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
|
||||
@Override
|
||||
protected boolean n(Entity entity) {
|
||||
|
||||
Reference in New Issue
Block a user