Update to Minecraft 1.16.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-08-12 07:00:00 +10:00
parent 5e5f7f19dc
commit 6a9e00d4b6
208 changed files with 2144 additions and 2455 deletions

View File

@@ -18,16 +18,16 @@
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityMinecartAbstract.class, DataWatcherRegistry.b);
@@ -20,7 +29,7 @@
private static final DataWatcherObject<Boolean> g = DataWatcher.a(EntityMinecartAbstract.class, DataWatcherRegistry.i);
private static final ImmutableMap<EntityPose, ImmutableList<Integer>> an = ImmutableMap.of(EntityPose.STANDING, ImmutableList.of(0, 1, -1), EntityPose.CROUCHING, ImmutableList.of(0, 1, -1), EntityPose.SWIMMING, ImmutableList.of(0, 1));
private boolean ao;
- private static final Map<BlockPropertyTrackPosition, Pair<BaseBlockPosition, BaseBlockPosition>> ap = (Map) SystemUtils.a((Object) Maps.newEnumMap(BlockPropertyTrackPosition.class), (enummap) -> {
+ private static final Map<BlockPropertyTrackPosition, Pair<BaseBlockPosition, BaseBlockPosition>> ap = (Map) SystemUtils.a(Maps.newEnumMap(BlockPropertyTrackPosition.class), (enummap) -> { // CraftBukkit - decompile error
private static final ImmutableMap<EntityPose, ImmutableList<Integer>> ag = ImmutableMap.of(EntityPose.STANDING, ImmutableList.of(0, 1, -1), EntityPose.CROUCHING, ImmutableList.of(0, 1, -1), EntityPose.SWIMMING, ImmutableList.of(0, 1));
private boolean ah;
- private static final Map<BlockPropertyTrackPosition, Pair<BaseBlockPosition, BaseBlockPosition>> ai = (Map) SystemUtils.a((Object) Maps.newEnumMap(BlockPropertyTrackPosition.class), (enummap) -> {
+ private static final Map<BlockPropertyTrackPosition, Pair<BaseBlockPosition, BaseBlockPosition>> ai = (Map) SystemUtils.a(Maps.newEnumMap(BlockPropertyTrackPosition.class), (enummap) -> { // CraftBukkit - decompile error
BaseBlockPosition baseblockposition = EnumDirection.WEST.p();
BaseBlockPosition baseblockposition1 = EnumDirection.EAST.p();
BaseBlockPosition baseblockposition2 = EnumDirection.NORTH.p();
@@ -48,6 +57,17 @@
private double au;
private double av;
private double an;
private double ao;
+ // CraftBukkit start
+ public boolean slowWhenEmpty = true;
@@ -43,7 +43,7 @@
protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
super(entitytypes, world);
this.i = true;
@@ -168,6 +188,19 @@
@@ -175,6 +195,19 @@
if (this.isInvulnerable(damagesource)) {
return false;
} else {
@@ -63,7 +63,7 @@
this.d(-this.n());
this.c(10);
this.velocityChanged();
@@ -175,6 +208,15 @@
@@ -182,6 +215,15 @@
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
if (flag || this.getDamage() > 40.0F) {
@@ -79,7 +79,7 @@
this.ejectPassengers();
if (flag && !this.hasCustomName()) {
this.die();
@@ -227,6 +269,14 @@
@@ -234,6 +276,14 @@
@Override
public void tick() {
@@ -94,16 +94,16 @@
if (this.getType() > 0) {
this.c(this.getType() - 1);
}
@@ -239,7 +289,7 @@
this.ai();
@@ -246,7 +296,7 @@
this.am();
}
- this.doPortalTick();
+ // this.doPortalTick(); // CraftBukkit - handled in postTick
if (this.world.isClientSide) {
if (this.aq > 0) {
double d0 = this.locX() + (this.ar - this.locX()) / (double) this.aq;
@@ -302,6 +352,18 @@
if (this.aj > 0) {
double d0 = this.locX() + (this.ak - this.locX()) / (double) this.aj;
@@ -309,6 +359,18 @@
}
this.setYawPitch(this.yaw, this.pitch);
@@ -119,10 +119,10 @@
+ this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleMoveEvent(vehicle, from, to));
+ }
+ // CraftBukkit end
if (this.getMinecartType() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && b(this.getMot()) > 0.01D) {
if (this.getMinecartType() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && c(this.getMot()) > 0.01D) {
List<Entity> list = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D), IEntitySelector.a(this));
@@ -310,8 +372,26 @@
@@ -317,8 +379,26 @@
Entity entity = (Entity) list.get(l);
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
@@ -149,7 +149,7 @@
entity.collide(this);
}
}
@@ -323,6 +403,14 @@
@@ -330,6 +410,14 @@
Entity entity1 = (Entity) iterator.next();
if (!this.w(entity1) && entity1.isCollidable() && entity1 instanceof EntityMinecartAbstract) {
@@ -164,7 +164,7 @@
entity1.collide(this);
}
}
@@ -333,7 +421,7 @@
@@ -346,7 +434,7 @@
}
protected double getMaxSpeed() {
@@ -173,7 +173,7 @@
}
public void a(int i, int j, int k, boolean flag) {}
@@ -344,12 +432,16 @@
@@ -357,12 +445,16 @@
this.setMot(MathHelper.a(vec3d.x, -d0, d0), vec3d.y, MathHelper.a(vec3d.z, -d0, d0));
if (this.onGround) {
@@ -192,7 +192,7 @@
}
}
@@ -536,7 +628,7 @@
@@ -549,7 +641,7 @@
}
protected void decelerate() {
@@ -201,7 +201,7 @@
this.setMot(this.getMot().d(d0, 0.0D, d0));
}
@@ -619,6 +711,14 @@
@@ -632,6 +724,14 @@
if (!this.world.isClientSide) {
if (!entity.noclip && !this.noclip) {
if (!this.w(entity)) {
@@ -216,7 +216,7 @@
double d0 = entity.locX() - this.locX();
double d1 = entity.locZ() - this.locZ();
double d2 = d0 * d0 + d1 * d1;
@@ -754,4 +854,26 @@
@@ -767,4 +867,26 @@
private EnumMinecartType() {}
}