1.16.2 Release (#4123)
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues. Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong. This is now resolved. Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me. Please as always, backup your worlds and test before updating to 1.16.2! If you update to 1.16.2, there is no going back to an older build than this. --------------------------------- Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com> Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com> Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com> Co-authored-by: stonar96 <minecraft.stonar96@gmail.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Riley Park <rileysebastianpark@gmail.com> Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: commandblockguy <commandblockguy1@gmail.com> Co-authored-by: DigitalRegent <misterwener@gmail.com> Co-authored-by: ishland <ishlandmc@yeah.net>
This commit is contained in:
@@ -12,15 +12,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
private int jumpTicks;
|
||||
private float bD;
|
||||
private float bw;
|
||||
public ItemStack activeItem; // Paper - public
|
||||
- protected int bk;
|
||||
+ protected int bk; protected final int getEatTimeTicks() { return this.bk; } protected final void setEatTimeTicks(int value) { this.bk = value; } // Paper - OBFHELPER
|
||||
protected int bl;
|
||||
private BlockPosition bE;
|
||||
private Optional<BlockPosition> bF;
|
||||
- protected int bd;
|
||||
+ protected int bd; protected final int getEatTimeTicks() { return this.bd; } protected final void setEatTimeTicks(int value) { this.bd = value; } // Paper - OBFHELPER
|
||||
protected int be;
|
||||
private BlockPosition bx;
|
||||
private Optional<BlockPosition> by;
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
return ((Byte) this.datawatcher.get(EntityLiving.an) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND;
|
||||
return ((Byte) this.datawatcher.get(EntityLiving.ag) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND;
|
||||
}
|
||||
|
||||
+ // Paper start - lag compensate eating
|
||||
@@ -28,19 +28,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ protected int totalEatTimeTicks;
|
||||
+ // Paper end
|
||||
+
|
||||
private void u() {
|
||||
private void t() {
|
||||
if (this.isHandRaised()) {
|
||||
if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) {
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
this.b(this.activeItem, 5);
|
||||
}
|
||||
|
||||
- if (--this.bk == 0 && !this.world.isClientSide && !this.activeItem.m()) {
|
||||
- if (--this.bd == 0 && !this.world.isClientSide && !this.activeItem.m()) {
|
||||
+ // Paper start - lag compensate eating
|
||||
+ // we add 1 to the expected time to avoid lag compensating when we should not
|
||||
+ boolean shouldLagCompensate
|
||||
+ = this.activeItem.getItem().isFood() && this.eatStartTime != -1 && (System.nanoTime() - this.eatStartTime) > ((1 + this.totalEatTimeTicks) * 50 * (1000 * 1000));
|
||||
+ if ((--this.bk == 0 || shouldLagCompensate) && !this.world.isClientSide && !this.activeItem.m()) {
|
||||
+ boolean shouldLagCompensate = this.activeItem.getItem().isFood() && this.eatStartTime != -1 && (System.nanoTime() - this.eatStartTime) > ((1 + this.totalEatTimeTicks) * 50 * (1000 * 1000));
|
||||
+ if ((--this.bd == 0 || shouldLagCompensate) && !this.world.isClientSide && !this.activeItem.m()) {
|
||||
+ this.setEatTimeTicks(0);
|
||||
+ // Paper end
|
||||
this.s();
|
||||
@@ -50,9 +49,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag
|
||||
this.activeItem = itemstack;
|
||||
- this.bk = itemstack.k();
|
||||
- this.bd = itemstack.k();
|
||||
+ // Paper start - lag compensate eating
|
||||
+ this.bk = this.totalEatTimeTicks = itemstack.k();
|
||||
+ this.bd = this.totalEatTimeTicks = itemstack.k();
|
||||
+ this.eatStartTime = System.nanoTime();
|
||||
+ // Paper end
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -62,9 +61,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
} else if (!this.isHandRaised() && !this.activeItem.isEmpty()) {
|
||||
this.activeItem = ItemStack.b;
|
||||
- this.bk = 0;
|
||||
- this.bd = 0;
|
||||
+ // Paper start - lag compensate eating
|
||||
+ this.bk = this.totalEatTimeTicks = 0;
|
||||
+ this.bd = this.totalEatTimeTicks = 0;
|
||||
+ this.eatStartTime = -1L;
|
||||
+ // Paper end
|
||||
}
|
||||
@@ -74,9 +73,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
this.activeItem = ItemStack.b;
|
||||
- this.bk = 0;
|
||||
- this.bd = 0;
|
||||
+ // Paper start - lag compensate eating
|
||||
+ this.bk = this.totalEatTimeTicks = 0;
|
||||
+ this.bd = this.totalEatTimeTicks = 0;
|
||||
+ this.eatStartTime = -1L;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user