@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
@@ -48,6 +48,14 @@
|
||||
@@ -47,6 +47,14 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -14,8 +14,8 @@
|
||||
+
|
||||
public abstract class EntityMinecartAbstract extends VehicleEntity {
|
||||
|
||||
private static final float LOWERED_PASSENGER_ATTACHMENT_Y = 0.0F;
|
||||
@@ -88,6 +96,17 @@
|
||||
private static final Vec3D LOWERED_PASSENGER_ATTACHMENT = new Vec3D(0.0D, 0.0D, 0.0D);
|
||||
@@ -86,6 +94,17 @@
|
||||
enummap.put(BlockPropertyTrackPosition.NORTH_EAST, Pair.of(baseblockposition2, baseblockposition1));
|
||||
});
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.targetDeltaMovement = Vec3D.ZERO;
|
||||
@@ -128,7 +147,7 @@
|
||||
@@ -126,7 +145,7 @@
|
||||
object = new EntityMinecartRideable(worldserver, d0, d1, d2);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
EntityTypes.createDefaultStackConfig(worldserver, itemstack, entityhuman).accept(object1);
|
||||
return (EntityMinecartAbstract) object1;
|
||||
@@ -267,6 +286,14 @@
|
||||
@@ -270,6 +289,14 @@
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -57,7 +57,7 @@
|
||||
if (this.getHurtTime() > 0) {
|
||||
this.setHurtTime(this.getHurtTime() - 1);
|
||||
}
|
||||
@@ -276,7 +303,7 @@
|
||||
@@ -279,7 +306,7 @@
|
||||
}
|
||||
|
||||
this.checkBelowWorld();
|
||||
@@ -66,7 +66,7 @@
|
||||
if (this.level().isClientSide) {
|
||||
if (this.lerpSteps > 0) {
|
||||
this.lerpPositionAndRotationStep(this.lerpSteps, this.lerpX, this.lerpY, this.lerpZ, this.lerpYRot, this.lerpXRot);
|
||||
@@ -334,6 +361,18 @@
|
||||
@@ -332,6 +359,18 @@
|
||||
}
|
||||
|
||||
this.setRot(this.getYRot(), this.getXRot());
|
||||
@@ -85,7 +85,7 @@
|
||||
if (this.getMinecartType() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && this.getDeltaMovement().horizontalDistanceSqr() > 0.01D) {
|
||||
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D), IEntitySelector.pushableBy(this));
|
||||
|
||||
@@ -344,8 +383,26 @@
|
||||
@@ -342,8 +381,26 @@
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
|
||||
@@ -112,7 +112,7 @@
|
||||
entity.push(this);
|
||||
}
|
||||
}
|
||||
@@ -357,6 +414,14 @@
|
||||
@@ -355,6 +412,14 @@
|
||||
Entity entity1 = (Entity) iterator1.next();
|
||||
|
||||
if (!this.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof EntityMinecartAbstract) {
|
||||
@@ -127,7 +127,7 @@
|
||||
entity1.push(this);
|
||||
}
|
||||
}
|
||||
@@ -373,7 +438,7 @@
|
||||
@@ -371,7 +436,7 @@
|
||||
}
|
||||
|
||||
protected double getMaxSpeed() {
|
||||
@@ -136,7 +136,7 @@
|
||||
}
|
||||
|
||||
public void activateMinecart(int i, int j, int k, boolean flag) {}
|
||||
@@ -384,12 +449,16 @@
|
||||
@@ -382,12 +447,16 @@
|
||||
|
||||
this.setDeltaMovement(MathHelper.clamp(vec3d.x, -d0, d0), vec3d.y, MathHelper.clamp(vec3d.z, -d0, d0));
|
||||
if (this.onGround()) {
|
||||
@@ -155,7 +155,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -585,7 +654,7 @@
|
||||
@@ -583,7 +652,7 @@
|
||||
}
|
||||
|
||||
protected void applyNaturalSlowdown() {
|
||||
@@ -164,7 +164,7 @@
|
||||
Vec3D vec3d = this.getDeltaMovement();
|
||||
|
||||
vec3d = vec3d.multiply(d0, 0.0D, d0);
|
||||
@@ -724,6 +793,14 @@
|
||||
@@ -722,6 +791,14 @@
|
||||
if (!this.level().isClientSide) {
|
||||
if (!entity.noPhysics && !this.noPhysics) {
|
||||
if (!this.hasPassenger(entity)) {
|
||||
@@ -179,7 +179,7 @@
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
double d2 = d0 * d0 + d1 * d1;
|
||||
@@ -898,4 +975,26 @@
|
||||
@@ -896,4 +973,26 @@
|
||||
|
||||
private EnumMinecartType() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user