mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Fix riding speed of all flying mobs to honor generic.flyingSpeed attribute
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
From 668c44f337c6b7f620fab17ba88b2b3cb809ad1b Mon Sep 17 00:00:00 2001
|
From 0b558dadf8a216b1eea6c4835b85634df09d6c63 Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Thu, 6 Feb 2020 19:53:59 -0600
|
Date: Thu, 6 Feb 2020 19:53:59 -0600
|
||||||
Subject: [PATCH] Ridables
|
Subject: [PATCH] Ridables
|
||||||
@@ -8,9 +8,9 @@ Subject: [PATCH] Ridables
|
|||||||
.../net/minecraft/server/ControllerMove.java | 6 +-
|
.../net/minecraft/server/ControllerMove.java | 6 +-
|
||||||
.../java/net/minecraft/server/Entity.java | 63 +-
|
.../java/net/minecraft/server/Entity.java | 63 +-
|
||||||
.../net/minecraft/server/EntityAgeable.java | 2 +-
|
.../net/minecraft/server/EntityAgeable.java | 2 +-
|
||||||
.../java/net/minecraft/server/EntityBat.java | 40 ++
|
.../java/net/minecraft/server/EntityBat.java | 54 ++
|
||||||
.../java/net/minecraft/server/EntityBee.java | 117 +++-
|
.../java/net/minecraft/server/EntityBee.java | 118 +++-
|
||||||
.../net/minecraft/server/EntityBlaze.java | 33 +
|
.../net/minecraft/server/EntityBlaze.java | 47 ++
|
||||||
.../java/net/minecraft/server/EntityCat.java | 34 +-
|
.../java/net/minecraft/server/EntityCat.java | 34 +-
|
||||||
.../minecraft/server/EntityCaveSpider.java | 17 +
|
.../minecraft/server/EntityCaveSpider.java | 17 +
|
||||||
.../net/minecraft/server/EntityChicken.java | 19 +
|
.../net/minecraft/server/EntityChicken.java | 19 +
|
||||||
@@ -26,7 +26,7 @@ Subject: [PATCH] Ridables
|
|||||||
.../net/minecraft/server/EntityEvoker.java | 22 +
|
.../net/minecraft/server/EntityEvoker.java | 22 +
|
||||||
.../java/net/minecraft/server/EntityFish.java | 21 +-
|
.../java/net/minecraft/server/EntityFish.java | 21 +-
|
||||||
.../java/net/minecraft/server/EntityFox.java | 57 +-
|
.../java/net/minecraft/server/EntityFox.java | 57 +-
|
||||||
.../net/minecraft/server/EntityGhast.java | 28 +-
|
.../net/minecraft/server/EntityGhast.java | 42 +-
|
||||||
.../minecraft/server/EntityGiantZombie.java | 25 +
|
.../minecraft/server/EntityGiantZombie.java | 25 +
|
||||||
.../net/minecraft/server/EntityGuardian.java | 47 +-
|
.../net/minecraft/server/EntityGuardian.java | 47 +-
|
||||||
.../minecraft/server/EntityGuardianElder.java | 17 +
|
.../minecraft/server/EntityGuardianElder.java | 17 +
|
||||||
@@ -47,8 +47,8 @@ Subject: [PATCH] Ridables
|
|||||||
.../minecraft/server/EntityMushroomCow.java | 17 +
|
.../minecraft/server/EntityMushroomCow.java | 17 +
|
||||||
.../net/minecraft/server/EntityOcelot.java | 19 +
|
.../net/minecraft/server/EntityOcelot.java | 19 +
|
||||||
.../net/minecraft/server/EntityPanda.java | 47 +-
|
.../net/minecraft/server/EntityPanda.java | 47 +-
|
||||||
.../net/minecraft/server/EntityParrot.java | 65 +-
|
.../net/minecraft/server/EntityParrot.java | 77 ++-
|
||||||
.../net/minecraft/server/EntityPhantom.java | 59 +-
|
.../net/minecraft/server/EntityPhantom.java | 73 ++-
|
||||||
.../java/net/minecraft/server/EntityPig.java | 48 +-
|
.../java/net/minecraft/server/EntityPig.java | 48 +-
|
||||||
.../net/minecraft/server/EntityPigZombie.java | 17 +
|
.../net/minecraft/server/EntityPigZombie.java | 17 +
|
||||||
.../net/minecraft/server/EntityPillager.java | 19 +
|
.../net/minecraft/server/EntityPillager.java | 19 +
|
||||||
@@ -72,12 +72,12 @@ Subject: [PATCH] Ridables
|
|||||||
.../minecraft/server/EntityTropicalFish.java | 17 +
|
.../minecraft/server/EntityTropicalFish.java | 17 +
|
||||||
.../net/minecraft/server/EntityTurtle.java | 115 +++-
|
.../net/minecraft/server/EntityTurtle.java | 115 +++-
|
||||||
.../net/minecraft/server/EntityTypes.java | 6 +
|
.../net/minecraft/server/EntityTypes.java | 6 +
|
||||||
.../java/net/minecraft/server/EntityVex.java | 36 +-
|
.../java/net/minecraft/server/EntityVex.java | 61 +-
|
||||||
.../net/minecraft/server/EntityVillager.java | 22 +
|
.../net/minecraft/server/EntityVillager.java | 22 +
|
||||||
.../server/EntityVillagerTrader.java | 18 +
|
.../server/EntityVillagerTrader.java | 18 +
|
||||||
.../minecraft/server/EntityVindicator.java | 19 +
|
.../minecraft/server/EntityVindicator.java | 19 +
|
||||||
.../net/minecraft/server/EntityWitch.java | 21 +-
|
.../net/minecraft/server/EntityWitch.java | 21 +-
|
||||||
.../net/minecraft/server/EntityWither.java | 51 +-
|
.../net/minecraft/server/EntityWither.java | 65 +-
|
||||||
.../java/net/minecraft/server/EntityWolf.java | 121 ++--
|
.../java/net/minecraft/server/EntityWolf.java | 121 ++--
|
||||||
.../net/minecraft/server/EntityZombie.java | 19 +
|
.../net/minecraft/server/EntityZombie.java | 19 +
|
||||||
.../minecraft/server/EntityZombieHusk.java | 17 +
|
.../minecraft/server/EntityZombieHusk.java | 17 +
|
||||||
@@ -96,7 +96,7 @@ Subject: [PATCH] Ridables
|
|||||||
.../controller/ControllerMoveWASDWater.java | 43 ++
|
.../controller/ControllerMoveWASDWater.java | 43 ++
|
||||||
.../pathfinder/PathfinderGoalHasRider.java | 21 +
|
.../pathfinder/PathfinderGoalHasRider.java | 21 +
|
||||||
.../craftbukkit/entity/CraftEntity.java | 27 +
|
.../craftbukkit/entity/CraftEntity.java | 27 +
|
||||||
92 files changed, 3115 insertions(+), 200 deletions(-)
|
92 files changed, 3222 insertions(+), 201 deletions(-)
|
||||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java
|
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/ControllerMoveWASD.java
|
||||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java
|
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java
|
||||||
@@ -284,10 +284,10 @@ index 3d27f0964a..822316a65f 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityBat.java b/src/main/java/net/minecraft/server/EntityBat.java
|
diff --git a/src/main/java/net/minecraft/server/EntityBat.java b/src/main/java/net/minecraft/server/EntityBat.java
|
||||||
index 34239160be..a6218158e1 100644
|
index 34239160be..dfc2ce9729 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityBat.java
|
--- a/src/main/java/net/minecraft/server/EntityBat.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityBat.java
|
+++ b/src/main/java/net/minecraft/server/EntityBat.java
|
||||||
@@ -14,9 +14,32 @@ public class EntityBat extends EntityAmbient {
|
@@ -14,9 +14,44 @@ public class EntityBat extends EntityAmbient {
|
||||||
|
|
||||||
public EntityBat(EntityTypes<? extends EntityBat> entitytypes, World world) {
|
public EntityBat(EntityTypes<? extends EntityBat> entitytypes, World world) {
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
@@ -315,12 +315,33 @@ index 34239160be..a6218158e1 100644
|
|||||||
+ public double getMaxY() {
|
+ public double getMaxY() {
|
||||||
+ return world.purpurConfig.batMaxY;
|
+ return world.purpurConfig.batMaxY;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void e(Vec3D vec3d) {
|
||||||
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider() && !onGround) {
|
||||||
|
+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
protected void initDatawatcher() {
|
protected void initDatawatcher() {
|
||||||
super.initDatawatcher();
|
super.initDatawatcher();
|
||||||
@@ -95,6 +118,13 @@ public class EntityBat extends EntityAmbient {
|
@@ -64,6 +99,8 @@ public class EntityBat extends EntityAmbient {
|
||||||
|
protected void initAttributes() {
|
||||||
|
super.initAttributes();
|
||||||
|
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(6.0D);
|
||||||
|
+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); // Purpur
|
||||||
|
+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAsleep() {
|
||||||
|
@@ -95,6 +132,13 @@ public class EntityBat extends EntityAmbient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mobTick() {
|
protected void mobTick() {
|
||||||
@@ -334,7 +355,7 @@ index 34239160be..a6218158e1 100644
|
|||||||
super.mobTick();
|
super.mobTick();
|
||||||
BlockPosition blockposition = new BlockPosition(this);
|
BlockPosition blockposition = new BlockPosition(this);
|
||||||
BlockPosition blockposition1 = blockposition.up();
|
BlockPosition blockposition1 = blockposition.up();
|
||||||
@@ -229,4 +259,14 @@ public class EntityBat extends EntityAmbient {
|
@@ -229,4 +273,14 @@ public class EntityBat extends EntityAmbient {
|
||||||
protected float b(EntityPose entitypose, EntitySize entitysize) {
|
protected float b(EntityPose entitypose, EntitySize entitysize) {
|
||||||
return entitysize.height / 2.0F;
|
return entitysize.height / 2.0F;
|
||||||
}
|
}
|
||||||
@@ -350,7 +371,7 @@ index 34239160be..a6218158e1 100644
|
|||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java
|
diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java
|
||||||
index c7d79efdf6..fd0fd43070 100644
|
index c7d79efdf6..7e4aad7716 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityBee.java
|
--- a/src/main/java/net/minecraft/server/EntityBee.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityBee.java
|
+++ b/src/main/java/net/minecraft/server/EntityBee.java
|
||||||
@@ -36,9 +36,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -36,9 +36,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
@@ -364,7 +385,7 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
public void tick() {
|
public void tick() {
|
||||||
if (getEntity().locY() <= 0) {
|
if (getEntity().locY() <= 0) {
|
||||||
getEntity().setNoGravity(false);
|
getEntity().setNoGravity(false);
|
||||||
@@ -46,13 +44,54 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -46,13 +44,55 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
super.tick();
|
super.tick();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -408,20 +429,21 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void e(Vec3D vec3d) {
|
+ public void e(Vec3D vec3d) {
|
||||||
+ if (hasRider() && !onGround) {
|
|
||||||
+ float speed = (float) this.getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
|
||||||
+ setSpeed(speed);
|
|
||||||
+ move(EnumMoveType.SELF, getMot().multiply(speed, speed, speed));
|
|
||||||
+ setMot(getMot().a(0.9D));
|
|
||||||
+ }
|
|
||||||
+ super.e(vec3d);
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider() && !onGround) {
|
||||||
|
+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, speed, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
protected void initDatawatcher() {
|
protected void initDatawatcher() {
|
||||||
super.initDatawatcher();
|
super.initDatawatcher();
|
||||||
@@ -67,6 +106,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -67,6 +107,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initPathfinder() {
|
protected void initPathfinder() {
|
||||||
@@ -429,7 +451,7 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
this.goalSelector.a(0, new EntityBee.b(this, 1.399999976158142D, true));
|
this.goalSelector.a(0, new EntityBee.b(this, 1.399999976158142D, true));
|
||||||
this.goalSelector.a(1, new EntityBee.d());
|
this.goalSelector.a(1, new EntityBee.d());
|
||||||
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
|
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
|
||||||
@@ -82,6 +122,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -82,6 +123,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
this.goalSelector.a(7, new EntityBee.g());
|
this.goalSelector.a(7, new EntityBee.g());
|
||||||
this.goalSelector.a(8, new EntityBee.l());
|
this.goalSelector.a(8, new EntityBee.l());
|
||||||
this.goalSelector.a(9, new PathfinderGoalFloat(this));
|
this.goalSelector.a(9, new PathfinderGoalFloat(this));
|
||||||
@@ -437,7 +459,7 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
this.targetSelector.a(1, (new EntityBee.h(this)).a(new Class[0]));
|
this.targetSelector.a(1, (new EntityBee.h(this)).a(new Class[0]));
|
||||||
this.targetSelector.a(2, new EntityBee.c(this));
|
this.targetSelector.a(2, new EntityBee.c(this));
|
||||||
}
|
}
|
||||||
@@ -588,6 +629,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -588,6 +630,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
|
|
||||||
private d() {
|
private d() {
|
||||||
super(); // CraftBukkit - decompile error
|
super(); // CraftBukkit - decompile error
|
||||||
@@ -445,7 +467,7 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -648,6 +690,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -648,6 +691,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
|
|
||||||
private g() {
|
private g() {
|
||||||
super(); // CraftBukkit - decompile error
|
super(); // CraftBukkit - decompile error
|
||||||
@@ -453,7 +475,7 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -712,6 +755,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -712,6 +756,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
|
|
||||||
private i() {
|
private i() {
|
||||||
super(); // CraftBukkit - decompile error
|
super(); // CraftBukkit - decompile error
|
||||||
@@ -461,7 +483,7 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1230,4 +1274,67 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
@@ -1230,4 +1275,67 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -530,7 +552,7 @@ index c7d79efdf6..fd0fd43070 100644
|
|||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java
|
diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java
|
||||||
index da6a3fa2c8..5d2d69cbf4 100644
|
index da6a3fa2c8..1e220131ca 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityBlaze.java
|
--- a/src/main/java/net/minecraft/server/EntityBlaze.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityBlaze.java
|
+++ b/src/main/java/net/minecraft/server/EntityBlaze.java
|
||||||
@@ -10,6 +10,7 @@ public class EntityBlaze extends EntityMonster {
|
@@ -10,6 +10,7 @@ public class EntityBlaze extends EntityMonster {
|
||||||
@@ -541,7 +563,7 @@ index da6a3fa2c8..5d2d69cbf4 100644
|
|||||||
this.a(PathType.WATER, -1.0F);
|
this.a(PathType.WATER, -1.0F);
|
||||||
this.a(PathType.LAVA, 8.0F);
|
this.a(PathType.LAVA, 8.0F);
|
||||||
this.a(PathType.DANGER_FIRE, 0.0F);
|
this.a(PathType.DANGER_FIRE, 0.0F);
|
||||||
@@ -17,13 +18,37 @@ public class EntityBlaze extends EntityMonster {
|
@@ -17,13 +18,49 @@ public class EntityBlaze extends EntityMonster {
|
||||||
this.f = 10;
|
this.f = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,6 +587,18 @@ index da6a3fa2c8..5d2d69cbf4 100644
|
|||||||
+ public double getMaxY() {
|
+ public double getMaxY() {
|
||||||
+ return world.purpurConfig.blazeMaxY;
|
+ return world.purpurConfig.blazeMaxY;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void e(Vec3D vec3d) {
|
||||||
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider() && !onGround) {
|
||||||
|
+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
@@ -579,7 +613,16 @@ index da6a3fa2c8..5d2d69cbf4 100644
|
|||||||
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this).a(new Class[0])); // Purpur - decompile error
|
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this).a(new Class[0])); // Purpur - decompile error
|
||||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||||
}
|
}
|
||||||
@@ -87,6 +112,14 @@ public class EntityBlaze extends EntityMonster {
|
@@ -34,6 +71,8 @@ public class EntityBlaze extends EntityMonster {
|
||||||
|
this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(6.0D);
|
||||||
|
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.23000000417232513D);
|
||||||
|
this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(48.0D);
|
||||||
|
+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); // Purpur
|
||||||
|
+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -87,6 +126,14 @@ public class EntityBlaze extends EntityMonster {
|
||||||
this.damageEntity(DamageSource.DROWN, 1.0F);
|
this.damageEntity(DamageSource.DROWN, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1655,10 +1698,10 @@ index 82a32d5dbf..4f53090d3d 100644
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java
|
diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java
|
||||||
index e1c2540d14..6044625b12 100644
|
index e1c2540d14..85e6c195f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityGhast.java
|
--- a/src/main/java/net/minecraft/server/EntityGhast.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityGhast.java
|
+++ b/src/main/java/net/minecraft/server/EntityGhast.java
|
||||||
@@ -14,11 +14,35 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
@@ -14,11 +14,47 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||||
this.moveController = new EntityGhast.ControllerGhast(this);
|
this.moveController = new EntityGhast.ControllerGhast(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1682,6 +1725,18 @@ index e1c2540d14..6044625b12 100644
|
|||||||
+ public double getMaxY() {
|
+ public double getMaxY() {
|
||||||
+ return world.purpurConfig.ghastMaxY;
|
+ return world.purpurConfig.ghastMaxY;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void e(Vec3D vec3d) {
|
||||||
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider() && !onGround) {
|
||||||
|
+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
@@ -1694,7 +1749,16 @@ index e1c2540d14..6044625b12 100644
|
|||||||
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, (entityliving) -> {
|
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, (entityliving) -> {
|
||||||
return Math.abs(entityliving.locY() - this.locY()) <= 4.0D;
|
return Math.abs(entityliving.locY() - this.locY()) <= 4.0D;
|
||||||
}));
|
}));
|
||||||
@@ -255,7 +279,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
@@ -60,6 +96,8 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||||
|
super.initAttributes();
|
||||||
|
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(10.0D);
|
||||||
|
this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(100.0D);
|
||||||
|
+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); // Purpur
|
||||||
|
+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -255,7 +293,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1703,7 +1767,7 @@ index e1c2540d14..6044625b12 100644
|
|||||||
|
|
||||||
private final EntityGhast i;
|
private final EntityGhast i;
|
||||||
private int j;
|
private int j;
|
||||||
@@ -266,7 +290,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
@@ -266,7 +304,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -2707,10 +2771,10 @@ index f50ed19080..87ed9a8ca0 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityParrot.java b/src/main/java/net/minecraft/server/EntityParrot.java
|
diff --git a/src/main/java/net/minecraft/server/EntityParrot.java b/src/main/java/net/minecraft/server/EntityParrot.java
|
||||||
index 94e57a2d85..95b786a5a6 100644
|
index 94e57a2d85..7ba2f3a351 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityParrot.java
|
--- a/src/main/java/net/minecraft/server/EntityParrot.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityParrot.java
|
+++ b/src/main/java/net/minecraft/server/EntityParrot.java
|
||||||
@@ -62,12 +62,71 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
@@ -62,12 +62,83 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
||||||
|
|
||||||
public EntityParrot(EntityTypes<? extends EntityParrot> entitytypes, World world) {
|
public EntityParrot(EntityTypes<? extends EntityParrot> entitytypes, World world) {
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
@@ -2778,12 +2842,24 @@ index 94e57a2d85..95b786a5a6 100644
|
|||||||
+ public double getMaxY() {
|
+ public double getMaxY() {
|
||||||
+ return world.purpurConfig.parrotMaxY;
|
+ return world.purpurConfig.parrotMaxY;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void e(Vec3D vec3d) {
|
||||||
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider() && !onGround) {
|
||||||
|
+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
+
|
+
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) {
|
public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) {
|
||||||
@@ -83,8 +142,10 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
@@ -83,8 +154,10 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
||||||
@Override
|
@Override
|
||||||
protected void initPathfinder() {
|
protected void initPathfinder() {
|
||||||
this.goalSit = new PathfinderGoalSit(this);
|
this.goalSit = new PathfinderGoalSit(this);
|
||||||
@@ -2796,10 +2872,10 @@ index 94e57a2d85..95b786a5a6 100644
|
|||||||
this.goalSelector.a(2, this.goalSit);
|
this.goalSelector.a(2, this.goalSit);
|
||||||
this.goalSelector.a(2, new PathfinderGoalFollowOwner(this, 1.0D, 5.0F, 1.0F, true));
|
this.goalSelector.a(2, new PathfinderGoalFollowOwner(this, 1.0D, 5.0F, 1.0F, true));
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
index 90eeddb1af..850d5efff1 100644
|
index 90eeddb1af..c3a5e24617 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
@@ -22,6 +22,28 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -22,6 +22,40 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
this.lookController = new EntityPhantom.f(this);
|
this.lookController = new EntityPhantom.f(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2823,12 +2899,24 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
+ public double getMaxY() {
|
+ public double getMaxY() {
|
||||||
+ return world.purpurConfig.phantomMaxY;
|
+ return world.purpurConfig.phantomMaxY;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void e(Vec3D vec3d) {
|
||||||
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider() && !onGround) {
|
||||||
|
+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, speed, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
protected EntityAIBodyControl o() {
|
protected EntityAIBodyControl o() {
|
||||||
return new EntityPhantom.d(this);
|
return new EntityPhantom.d(this);
|
||||||
@@ -29,9 +51,11 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -29,9 +63,11 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initPathfinder() {
|
protected void initPathfinder() {
|
||||||
@@ -2840,15 +2928,17 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
this.targetSelector.a(1, new EntityPhantom.b());
|
this.targetSelector.a(1, new EntityPhantom.b());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,6 +63,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -39,6 +75,9 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
protected void initAttributes() {
|
protected void initAttributes() {
|
||||||
super.initAttributes();
|
super.initAttributes();
|
||||||
this.getAttributeMap().b(GenericAttributes.ATTACK_DAMAGE);
|
this.getAttributeMap().b(GenericAttributes.ATTACK_DAMAGE);
|
||||||
+ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.01D); // Purpur
|
+ this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.01D); // Purpur
|
||||||
|
+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); // Purpur
|
||||||
|
+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); // Purpur
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -103,7 +128,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -103,7 +142,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void movementTick() {
|
public void movementTick() {
|
||||||
@@ -2857,7 +2947,7 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
this.setOnFire(8);
|
this.setOnFire(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,6 +240,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -215,6 +254,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean a() {
|
public boolean a() {
|
||||||
@@ -2865,7 +2955,7 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
if (this.c > 0) {
|
if (this.c > 0) {
|
||||||
--this.c;
|
--this.c;
|
||||||
return false;
|
return false;
|
||||||
@@ -244,6 +270,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -244,6 +284,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean b() {
|
public boolean b() {
|
||||||
@@ -2873,7 +2963,7 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
||||||
|
|
||||||
return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false;
|
return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false;
|
||||||
@@ -258,6 +285,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -258,6 +299,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean a() {
|
public boolean a() {
|
||||||
@@ -2881,7 +2971,7 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
||||||
|
|
||||||
return entityliving != null ? EntityPhantom.this.a(EntityPhantom.this.getGoalTarget(), PathfinderTargetCondition.a) : false;
|
return entityliving != null ? EntityPhantom.this.a(EntityPhantom.this.getGoalTarget(), PathfinderTargetCondition.a) : false;
|
||||||
@@ -447,14 +475,23 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -447,14 +489,23 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2907,7 +2997,7 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
class d extends EntityAIBodyControl {
|
class d extends EntityAIBodyControl {
|
||||||
@@ -470,7 +507,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -470,7 +521,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2916,7 +3006,7 @@ index 90eeddb1af..850d5efff1 100644
|
|||||||
|
|
||||||
private float j = 0.1F;
|
private float j = 0.1F;
|
||||||
|
|
||||||
@@ -479,7 +516,19 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -479,7 +530,19 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -4107,10 +4197,10 @@ index 4100e367a4..a0d932c403 100644
|
|||||||
if (this.bg == null) {
|
if (this.bg == null) {
|
||||||
this.bg = SystemUtils.a("entity", IRegistry.ENTITY_TYPE.getKey(this));
|
this.bg = SystemUtils.a("entity", IRegistry.ENTITY_TYPE.getKey(this));
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java
|
diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java
|
||||||
index cf274666c7..d5605d412b 100644
|
index cf274666c7..d890f7bdfa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityVex.java
|
--- a/src/main/java/net/minecraft/server/EntityVex.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityVex.java
|
+++ b/src/main/java/net/minecraft/server/EntityVex.java
|
||||||
@@ -19,6 +19,28 @@ public class EntityVex extends EntityMonster {
|
@@ -19,6 +19,50 @@ public class EntityVex extends EntityMonster {
|
||||||
this.f = 3;
|
this.f = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4134,12 +4224,43 @@ index cf274666c7..d5605d412b 100644
|
|||||||
+ public double getMaxY() {
|
+ public double getMaxY() {
|
||||||
+ return world.purpurConfig.vexMaxY;
|
+ return world.purpurConfig.vexMaxY;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void e(Vec3D vec3d) {
|
||||||
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider()) {
|
||||||
|
+ float speed;
|
||||||
|
+ if (onGround) {
|
||||||
|
+ speed = (float) getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue() * 0.1F;
|
||||||
|
+ } else {
|
||||||
|
+ speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ }
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, 1.0, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean b(float f, float f1) {
|
||||||
|
+ return false; // no fall damage please
|
||||||
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
public void move(EnumMoveType enummovetype, Vec3D vec3d) {
|
public void move(EnumMoveType enummovetype, Vec3D vec3d) {
|
||||||
super.move(enummovetype, vec3d);
|
super.move(enummovetype, vec3d);
|
||||||
@@ -42,10 +64,12 @@ public class EntityVex extends EntityMonster {
|
@@ -27,7 +71,7 @@ public class EntityVex extends EntityMonster {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
- this.noclip = true;
|
||||||
|
+ this.noclip = !hasRider(); // Purpur
|
||||||
|
super.tick();
|
||||||
|
this.noclip = false;
|
||||||
|
this.setNoGravity(true);
|
||||||
|
@@ -42,10 +86,12 @@ public class EntityVex extends EntityMonster {
|
||||||
protected void initPathfinder() {
|
protected void initPathfinder() {
|
||||||
super.initPathfinder();
|
super.initPathfinder();
|
||||||
this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
||||||
@@ -4152,7 +4273,16 @@ index cf274666c7..d5605d412b 100644
|
|||||||
this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // CraftBukkit - decompile error
|
this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // CraftBukkit - decompile error
|
||||||
this.targetSelector.a(2, new EntityVex.b(this));
|
this.targetSelector.a(2, new EntityVex.b(this));
|
||||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||||
@@ -287,14 +311,22 @@ public class EntityVex extends EntityMonster {
|
@@ -56,6 +102,8 @@ public class EntityVex extends EntityMonster {
|
||||||
|
super.initAttributes();
|
||||||
|
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(14.0D);
|
||||||
|
this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(4.0D);
|
||||||
|
+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); // Purpur
|
||||||
|
+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -287,14 +335,21 @@ public class EntityVex extends EntityMonster {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4168,7 +4298,6 @@ index cf274666c7..d5605d412b 100644
|
|||||||
+ // Purpur start
|
+ // Purpur start
|
||||||
+ public void tick(EntityHuman rider) {
|
+ public void tick(EntityHuman rider) {
|
||||||
+ super.tick(rider);
|
+ super.tick(rider);
|
||||||
+ getEntity().noclip = false;
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
@@ -4328,7 +4457,7 @@ index 1432d3f6bf..447387bd78 100644
|
|||||||
this.targetSelector.a(2, this.bz);
|
this.targetSelector.a(2, this.bz);
|
||||||
this.targetSelector.a(3, this.bA);
|
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
|
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
index 8977c3516b..459d85baa0 100644
|
index 8977c3516b..293afeb23b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
@@ -18,7 +18,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -18,7 +18,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
@@ -4340,7 +4469,7 @@ index 8977c3516b..459d85baa0 100644
|
|||||||
private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b);
|
private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b);
|
||||||
private final float[] by = new float[2];
|
private final float[] by = new float[2];
|
||||||
private final float[] bz = new float[2];
|
private final float[] bz = new float[2];
|
||||||
@@ -39,15 +39,47 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -39,15 +39,59 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
this.setHealth(this.getMaxHealth());
|
this.setHealth(this.getMaxHealth());
|
||||||
this.getNavigation().d(true);
|
this.getNavigation().d(true);
|
||||||
this.f = 50;
|
this.f = 50;
|
||||||
@@ -4369,6 +4498,18 @@ index 8977c3516b..459d85baa0 100644
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
+ public void e(Vec3D vec3d) {
|
||||||
|
+ super.e(vec3d);
|
||||||
|
+ if (hasRider() && !onGround) {
|
||||||
|
+ float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue();
|
||||||
|
+ setSpeed(speed);
|
||||||
|
+ Vec3D mot = getMot();
|
||||||
|
+ move(EnumMoveType.SELF, mot.multiply(speed, 0.5, speed));
|
||||||
|
+ setMot(mot.a(0.9D));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
+ public void onMount(EntityHuman entityhuman) {
|
+ public void onMount(EntityHuman entityhuman) {
|
||||||
+ this.datawatcher.set(targetList().get(0), 0);
|
+ this.datawatcher.set(targetList().get(0), 0);
|
||||||
+ this.datawatcher.set(targetList().get(1), 0);
|
+ this.datawatcher.set(targetList().get(1), 0);
|
||||||
@@ -4389,7 +4530,7 @@ index 8977c3516b..459d85baa0 100644
|
|||||||
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0]));
|
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0]));
|
||||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 0, false, false, EntityWither.bG));
|
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 0, false, false, EntityWither.bG));
|
||||||
}
|
}
|
||||||
@@ -125,7 +157,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -125,7 +169,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMot(vec3d);
|
this.setMot(vec3d);
|
||||||
@@ -4398,7 +4539,7 @@ index 8977c3516b..459d85baa0 100644
|
|||||||
this.yaw = (float) MathHelper.d(vec3d.z, vec3d.x) * 57.295776F - 90.0F;
|
this.yaw = (float) MathHelper.d(vec3d.z, vec3d.x) * 57.295776F - 90.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +221,13 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -189,6 +233,13 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mobTick() {
|
protected void mobTick() {
|
||||||
@@ -4412,7 +4553,16 @@ index 8977c3516b..459d85baa0 100644
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (this.eq() > 0) {
|
if (this.eq() > 0) {
|
||||||
@@ -523,11 +562,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -512,6 +563,8 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
|
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.6000000238418579D);
|
||||||
|
this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(40.0D);
|
||||||
|
this.getAttributeInstance(GenericAttributes.ARMOR).setValue(4.0D);
|
||||||
|
+ this.getAttributeMap().b(GenericAttributes.FLYING_SPEED); // Purpur
|
||||||
|
+ this.getAttributeInstance(GenericAttributes.FLYING_SPEED).setValue(0.6000000238418579D); // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
public int eq() {
|
||||||
|
@@ -523,11 +576,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeadTarget(int i) {
|
public int getHeadTarget(int i) {
|
||||||
@@ -4426,7 +4576,7 @@ index 8977c3516b..459d85baa0 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean J_() {
|
public boolean J_() {
|
||||||
@@ -541,7 +580,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -541,7 +594,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean n(Entity entity) {
|
protected boolean n(Entity entity) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 8c96e773812bf06f5ad194f1360c7f9b22baf1b2 Mon Sep 17 00:00:00 2001
|
From 87ed6c2409996ba8b536d52939672bcfb819c025 Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Fri, 29 Nov 2019 20:33:41 -0600
|
Date: Fri, 29 Nov 2019 20:33:41 -0600
|
||||||
Subject: [PATCH] Phantoms only attack insomniacs
|
Subject: [PATCH] Phantoms only attack insomniacs
|
||||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Phantoms only attack insomniacs
|
|||||||
3 files changed, 4 insertions(+)
|
3 files changed, 4 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
index 850d5efff1..bbbb6e601b 100644
|
index c3a5e24617..6d2984c8d5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
@@ -258,6 +258,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -272,6 +272,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||||
|
|
||||||
if (EntityPhantom.this.a((EntityLiving) entityhuman, PathfinderTargetCondition.a)) {
|
if (EntityPhantom.this.a((EntityLiving) entityhuman, PathfinderTargetCondition.a)) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 364a040bfacb575c41cc1479436618390094af09 Mon Sep 17 00:00:00 2001
|
From 7783da8e5a5043d63dcee189634cf6c6d7b67ad2 Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Date: Thu, 9 May 2019 18:26:06 -0500
|
Date: Thu, 9 May 2019 18:26:06 -0500
|
||||||
Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms
|
Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms
|
||||||
@@ -123,7 +123,7 @@ index a57d0089d8..02952c3af8 100644
|
|||||||
@Override
|
@Override
|
||||||
protected void b(NBTTagCompound nbttagcompound) {
|
protected void b(NBTTagCompound nbttagcompound) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
index bbbb6e601b..964c043eb1 100644
|
index 6d2984c8d5..3b9cd169bd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||||
@@ -8,9 +8,10 @@ import javax.annotation.Nullable;
|
@@ -8,9 +8,10 @@ import javax.annotation.Nullable;
|
||||||
@@ -140,7 +140,7 @@ index bbbb6e601b..964c043eb1 100644
|
|||||||
|
|
||||||
public EntityPhantom(EntityTypes<? extends EntityPhantom> entitytypes, World world) {
|
public EntityPhantom(EntityTypes<? extends EntityPhantom> entitytypes, World world) {
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
@@ -51,12 +52,18 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -63,12 +64,18 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initPathfinder() {
|
protected void initPathfinder() {
|
||||||
@@ -163,7 +163,7 @@ index bbbb6e601b..964c043eb1 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -140,6 +147,26 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -154,6 +161,26 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
super.mobTick();
|
super.mobTick();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ index bbbb6e601b..964c043eb1 100644
|
|||||||
@Override
|
@Override
|
||||||
public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) {
|
public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) {
|
||||||
this.d = (new BlockPosition(this)).up(5);
|
this.d = (new BlockPosition(this)).up(5);
|
||||||
@@ -228,6 +255,136 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -242,6 +269,136 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -327,7 +327,7 @@ index bbbb6e601b..964c043eb1 100644
|
|||||||
class b extends PathfinderGoal {
|
class b extends PathfinderGoal {
|
||||||
|
|
||||||
private final PathfinderTargetCondition b;
|
private final PathfinderTargetCondition b;
|
||||||
@@ -241,6 +398,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -255,6 +412,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
@Override
|
@Override
|
||||||
public boolean a() {
|
public boolean a() {
|
||||||
if (getRider() != null) return false; // Purpur - pathfinder does not have a flag
|
if (getRider() != null) return false; // Purpur - pathfinder does not have a flag
|
||||||
@@ -335,7 +335,7 @@ index bbbb6e601b..964c043eb1 100644
|
|||||||
if (this.c > 0) {
|
if (this.c > 0) {
|
||||||
--this.c;
|
--this.c;
|
||||||
return false;
|
return false;
|
||||||
@@ -272,6 +430,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -286,6 +444,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
@Override
|
@Override
|
||||||
public boolean b() {
|
public boolean b() {
|
||||||
if (getRider() != null) return false; // Purpur - pathfinder does not have a flag
|
if (getRider() != null) return false; // Purpur - pathfinder does not have a flag
|
||||||
@@ -343,7 +343,7 @@ index bbbb6e601b..964c043eb1 100644
|
|||||||
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
||||||
|
|
||||||
return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false;
|
return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false;
|
||||||
@@ -287,6 +446,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
@@ -301,6 +460,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||||
@Override
|
@Override
|
||||||
public boolean a() {
|
public boolean a() {
|
||||||
if (getRider() != null) return false; // Purpur - pathfinder does not have a flag
|
if (getRider() != null) return false; // Purpur - pathfinder does not have a flag
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 2a2790a02166f3d335a7577dcce637927244a33a Mon Sep 17 00:00:00 2001
|
From b5d7052ab123bc6abae003ba91ccced2db9cdf8d Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Date: Sun, 21 Jul 2019 18:06:20 -0500
|
Date: Sun, 21 Jul 2019 18:06:20 -0500
|
||||||
Subject: [PATCH] Ladders should not bypass cramming gamerule
|
Subject: [PATCH] Ladders should not bypass cramming gamerule
|
||||||
@@ -47,10 +47,10 @@ index 8ad131e4fc..dfe8c57cef 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityBat.java b/src/main/java/net/minecraft/server/EntityBat.java
|
diff --git a/src/main/java/net/minecraft/server/EntityBat.java b/src/main/java/net/minecraft/server/EntityBat.java
|
||||||
index a6218158e1..79f4b2aa05 100644
|
index dfc2ce9729..440c21355c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityBat.java
|
--- a/src/main/java/net/minecraft/server/EntityBat.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityBat.java
|
+++ b/src/main/java/net/minecraft/server/EntityBat.java
|
||||||
@@ -73,7 +73,7 @@ public class EntityBat extends EntityAmbient {
|
@@ -85,7 +85,7 @@ public class EntityBat extends EntityAmbient {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -125,10 +125,10 @@ index 1f3e5bd288..ae4758f251 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityParrot.java b/src/main/java/net/minecraft/server/EntityParrot.java
|
diff --git a/src/main/java/net/minecraft/server/EntityParrot.java b/src/main/java/net/minecraft/server/EntityParrot.java
|
||||||
index 95b786a5a6..ee9282e947 100644
|
index 7ba2f3a351..dd2cd7b219 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityParrot.java
|
--- a/src/main/java/net/minecraft/server/EntityParrot.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityParrot.java
|
+++ b/src/main/java/net/minecraft/server/EntityParrot.java
|
||||||
@@ -380,7 +380,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
@@ -392,7 +392,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user