mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Only jump with head height
distance of above
This commit is contained in:
parent
87cadbfb02
commit
556c58a7f6
@ -92,7 +92,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue()) * 10;
|
||||
this.a.l(movement);
|
||||
this.a.bg = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || ((d2 >= NMS.getStepHeight(a.getBukkitEntity())) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
@ -96,7 +96,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue()) * 10;
|
||||
this.a.l(movement);
|
||||
this.a.bf = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || ((d2 >= NMS.getStepHeight(a.getBukkitEntity())) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
@ -54,7 +54,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue()) * 10;
|
||||
this.a.k(movement);
|
||||
this.a.bg = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || ((d2 >= NMS.getStepHeight(a.getBukkitEntity())) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
@ -56,7 +56,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue()) * 10;
|
||||
this.a.o(movement);
|
||||
this.a.bj = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || ((d2 >= NMS.getStepHeight(a.getBukkitEntity())) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
@ -57,7 +57,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue());
|
||||
this.a.o(movement);
|
||||
this.a.bd = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || ((d2 >= NMS.getStepHeight(a.getBukkitEntity())) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
@ -53,7 +53,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue());
|
||||
this.a.o(movement);
|
||||
this.a.bb = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || ((d2 >= NMS.getStepHeight(a.getBukkitEntity())) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
@ -70,7 +70,6 @@ public abstract class MobEntityController extends AbstractEntityController {
|
||||
}
|
||||
|
||||
private static final Map<Class<?>, Constructor<?>> CONSTRUCTOR_CACHE = Maps.newHashMap();
|
||||
|
||||
private static final MethodHandle UUID_FIELD = NMS.getSetter(net.minecraft.server.v1_16_R3.Entity.class,
|
||||
"uniqueID");
|
||||
}
|
@ -53,7 +53,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue());
|
||||
this.a.q(movement);
|
||||
this.a.aT = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || (d2 >= NMS.getStepHeight(a.getBukkitEntity()) && (d0 * d0 + d1 * d1) < 1.0D)) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
@ -92,7 +92,7 @@ public class PlayerControllerMove extends ControllerMove {
|
||||
float movement = (float) (this.e * speed.getValue()) * 10;
|
||||
this.a.k(movement);
|
||||
this.a.ba = movement;
|
||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
if (shouldSlimeJump() || ((d2 >= NMS.getStepHeight(a.getBukkitEntity())) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||
this.h = cg();
|
||||
this.h /= 3;
|
||||
if (this.a instanceof EntityHumanNPC) {
|
||||
|
Loading…
Reference in New Issue
Block a user