mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Make bees honor the generic.flyingSpeed attribute when being ridden
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 21521a8e2d5fd4f0762f423b3feb8daf89fee712 Mon Sep 17 00:00:00 2001
|
||||
From 668c44f337c6b7f620fab17ba88b2b3cb809ad1b 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
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Ridables
|
||||
.../java/net/minecraft/server/Entity.java | 63 +-
|
||||
.../net/minecraft/server/EntityAgeable.java | 2 +-
|
||||
.../java/net/minecraft/server/EntityBat.java | 40 ++
|
||||
.../java/net/minecraft/server/EntityBee.java | 106 +++-
|
||||
.../java/net/minecraft/server/EntityBee.java | 117 +++-
|
||||
.../net/minecraft/server/EntityBlaze.java | 33 +
|
||||
.../java/net/minecraft/server/EntityCat.java | 34 +-
|
||||
.../minecraft/server/EntityCaveSpider.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, 3104 insertions(+), 200 deletions(-)
|
||||
92 files changed, 3115 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
|
||||
@@ -350,7 +350,7 @@ index 34239160be..a6218158e1 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java
|
||||
index c7d79efdf6..0918beac90 100644
|
||||
index c7d79efdf6..fd0fd43070 100644
|
||||
--- a/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 {
|
||||
@@ -364,7 +364,7 @@ index c7d79efdf6..0918beac90 100644
|
||||
public void tick() {
|
||||
if (getEntity().locY() <= 0) {
|
||||
getEntity().setNoGravity(false);
|
||||
@@ -46,13 +44,43 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
@@ -46,13 +44,54 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
super.tick();
|
||||
}
|
||||
};
|
||||
@@ -405,12 +405,23 @@ index c7d79efdf6..0918beac90 100644
|
||||
+ public double getMaxY() {
|
||||
+ return world.purpurConfig.beeMaxY;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ 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);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected void initDatawatcher() {
|
||||
super.initDatawatcher();
|
||||
@@ -67,6 +95,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
@@ -67,6 +106,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
@@ -418,7 +429,7 @@ index c7d79efdf6..0918beac90 100644
|
||||
this.goalSelector.a(0, new EntityBee.b(this, 1.399999976158142D, true));
|
||||
this.goalSelector.a(1, new EntityBee.d());
|
||||
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
|
||||
@@ -82,6 +111,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
@@ -82,6 +122,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
this.goalSelector.a(7, new EntityBee.g());
|
||||
this.goalSelector.a(8, new EntityBee.l());
|
||||
this.goalSelector.a(9, new PathfinderGoalFloat(this));
|
||||
@@ -426,7 +437,7 @@ index c7d79efdf6..0918beac90 100644
|
||||
this.targetSelector.a(1, (new EntityBee.h(this)).a(new Class[0]));
|
||||
this.targetSelector.a(2, new EntityBee.c(this));
|
||||
}
|
||||
@@ -588,6 +618,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
@@ -588,6 +629,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
|
||||
private d() {
|
||||
super(); // CraftBukkit - decompile error
|
||||
@@ -434,7 +445,7 @@ index c7d79efdf6..0918beac90 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -648,6 +679,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
@@ -648,6 +690,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
|
||||
private g() {
|
||||
super(); // CraftBukkit - decompile error
|
||||
@@ -442,7 +453,7 @@ index c7d79efdf6..0918beac90 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -712,6 +744,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
@@ -712,6 +755,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
|
||||
private i() {
|
||||
super(); // CraftBukkit - decompile error
|
||||
@@ -450,7 +461,7 @@ index c7d79efdf6..0918beac90 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1230,4 +1263,67 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
@@ -1230,4 +1274,67 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user