geforkt von Mirrors/Paper
Improve minecart movement
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
7eb7761ca0
Commit
0b4a111361
@ -136,7 +136,7 @@
|
||||
}
|
||||
|
||||
public void activateMinecart(int i, int j, int k, boolean flag) {}
|
||||
@@ -382,12 +447,16 @@
|
||||
@@ -382,16 +447,30 @@
|
||||
|
||||
this.setDeltaMovement(MathHelper.clamp(vec3d.x, -d0, d0), vec3d.y, MathHelper.clamp(vec3d.z, -d0, d0));
|
||||
if (this.onGround()) {
|
||||
@ -155,7 +155,21 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -583,7 +652,7 @@
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ @Override
|
||||
+ public Vec3D getKnownMovement() {
|
||||
+ double d0 = this.getMaxSpeed();
|
||||
+ Vec3D vec3d = super.getKnownMovement();
|
||||
+
|
||||
+ return new Vec3D(MathHelper.clamp(vec3d.x, -d0, d0), vec3d.y, MathHelper.clamp(vec3d.z, -d0, d0));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
protected void moveAlongTrack(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
this.resetFallDistance();
|
||||
double d0 = this.getX();
|
||||
@@ -583,7 +662,7 @@
|
||||
}
|
||||
|
||||
protected void applyNaturalSlowdown() {
|
||||
@ -164,7 +178,7 @@
|
||||
Vec3D vec3d = this.getDeltaMovement();
|
||||
|
||||
vec3d = vec3d.multiply(d0, 0.0D, d0);
|
||||
@@ -722,6 +791,14 @@
|
||||
@@ -722,6 +801,14 @@
|
||||
if (!this.level().isClientSide) {
|
||||
if (!entity.noPhysics && !this.noPhysics) {
|
||||
if (!this.hasPassenger(entity)) {
|
||||
@ -179,7 +193,7 @@
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
double d2 = d0 * d0 + d1 * d1;
|
||||
@@ -896,4 +973,26 @@
|
||||
@@ -896,4 +983,26 @@
|
||||
|
||||
private EnumMinecartType() {}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren