@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
@@ -49,6 +49,15 @@
|
||||
@@ -48,6 +48,15 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
public abstract class EntityMinecartAbstract extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_ID_HURT = DataWatcher.defineId(EntityMinecartAbstract.class, DataWatcherRegistry.INT);
|
||||
@@ -91,6 +100,17 @@
|
||||
@@ -90,6 +99,17 @@
|
||||
private double lyd;
|
||||
private double lzd;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.blocksBuilding = true;
|
||||
@@ -217,6 +237,19 @@
|
||||
@@ -216,6 +236,19 @@
|
||||
if (this.isInvulnerableTo(damagesource)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -54,7 +54,7 @@
|
||||
this.setHurtDir(-this.getHurtDir());
|
||||
this.setHurtTime(10);
|
||||
this.markHurt();
|
||||
@@ -225,6 +258,15 @@
|
||||
@@ -224,6 +257,15 @@
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).getAbilities().instabuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
@@ -70,7 +70,7 @@
|
||||
this.ejectPassengers();
|
||||
if (flag && !this.hasCustomName()) {
|
||||
this.discard();
|
||||
@@ -284,6 +326,14 @@
|
||||
@@ -283,6 +325,14 @@
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -85,7 +85,7 @@
|
||||
if (this.getHurtTime() > 0) {
|
||||
this.setHurtTime(this.getHurtTime() - 1);
|
||||
}
|
||||
@@ -293,7 +343,7 @@
|
||||
@@ -292,7 +342,7 @@
|
||||
}
|
||||
|
||||
this.checkOutOfWorld();
|
||||
@@ -94,7 +94,7 @@
|
||||
double d0;
|
||||
|
||||
if (this.level.isClientSide) {
|
||||
@@ -359,6 +409,18 @@
|
||||
@@ -358,6 +408,18 @@
|
||||
}
|
||||
|
||||
this.setRot(this.getYRot(), this.getXRot());
|
||||
@@ -113,7 +113,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));
|
||||
|
||||
@@ -367,8 +429,26 @@
|
||||
@@ -366,8 +428,26 @@
|
||||
Entity entity = (Entity) list.get(l);
|
||||
|
||||
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
|
||||
@@ -140,7 +140,7 @@
|
||||
entity.push(this);
|
||||
}
|
||||
}
|
||||
@@ -380,6 +460,14 @@
|
||||
@@ -379,6 +459,14 @@
|
||||
Entity entity1 = (Entity) iterator.next();
|
||||
|
||||
if (!this.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof EntityMinecartAbstract) {
|
||||
@@ -155,7 +155,7 @@
|
||||
entity1.push(this);
|
||||
}
|
||||
}
|
||||
@@ -396,7 +484,7 @@
|
||||
@@ -395,7 +483,7 @@
|
||||
}
|
||||
|
||||
protected double getMaxSpeed() {
|
||||
@@ -164,7 +164,7 @@
|
||||
}
|
||||
|
||||
public void activateMinecart(int i, int j, int k, boolean flag) {}
|
||||
@@ -407,12 +495,16 @@
|
||||
@@ -406,12 +494,16 @@
|
||||
|
||||
this.setDeltaMovement(MathHelper.clamp(vec3d.x, -d0, d0), vec3d.y, MathHelper.clamp(vec3d.z, -d0, d0));
|
||||
if (this.onGround) {
|
||||
@@ -183,7 +183,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -603,7 +695,7 @@
|
||||
@@ -602,7 +694,7 @@
|
||||
}
|
||||
|
||||
protected void applyNaturalSlowdown() {
|
||||
@@ -192,7 +192,7 @@
|
||||
Vec3D vec3d = this.getDeltaMovement();
|
||||
|
||||
vec3d = vec3d.multiply(d0, 0.0D, d0);
|
||||
@@ -742,6 +834,14 @@
|
||||
@@ -741,6 +833,14 @@
|
||||
if (!this.level.isClientSide) {
|
||||
if (!entity.noPhysics && !this.noPhysics) {
|
||||
if (!this.hasPassenger(entity)) {
|
||||
@@ -207,7 +207,7 @@
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
double d2 = d0 * d0 + d1 * d1;
|
||||
@@ -921,4 +1021,26 @@
|
||||
@@ -920,4 +1020,26 @@
|
||||
|
||||
private EnumMinecartType() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user