Update to Minecraft 1.16.1

This commit is contained in:
md_5
2020-06-25 10:00:00 +10:00
parent be6aaf046e
commit 7ea3c040bc
424 changed files with 5960 additions and 5636 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityTrackerEntry.java
+++ b/net/minecraft/server/EntityTrackerEntry.java
@@ -9,6 +9,11 @@
@@ -11,6 +11,11 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -12,7 +12,7 @@
public class EntityTrackerEntry {
private static final Logger LOGGER = LogManager.getLogger();
@@ -29,8 +34,12 @@
@@ -31,8 +36,12 @@
private List<Entity> p;
private boolean q;
private boolean r;
@@ -26,7 +26,7 @@
this.m = Vec3D.a;
this.p = Collections.emptyList();
this.b = worldserver;
@@ -50,16 +59,17 @@
@@ -52,16 +61,17 @@
if (!list.equals(this.p)) {
this.p = list;
@@ -48,7 +48,7 @@
while (iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
@@ -104,6 +114,17 @@
@@ -106,6 +116,17 @@
boolean flag2 = flag1 || this.tickCounter % 60 == 0;
boolean flag3 = Math.abs(i - this.yRot) >= 1 || Math.abs(j - this.xRot) >= 1;
@@ -66,7 +66,7 @@
if (this.tickCounter > 0 || this.tracker instanceof EntityArrow) {
long k = PacketPlayOutEntity.a(vec3d.x);
long l = PacketPlayOutEntity.a(vec3d.y);
@@ -142,6 +163,7 @@
@@ -144,6 +165,7 @@
}
this.c();
@@ -74,7 +74,7 @@
if (flag2) {
this.d();
}
@@ -150,6 +172,7 @@
@@ -152,6 +174,7 @@
this.yRot = i;
this.xRot = j;
}
@@ -82,7 +82,7 @@
this.q = false;
}
@@ -165,7 +188,27 @@
@@ -167,7 +190,27 @@
++this.tickCounter;
if (this.tracker.velocityChanged) {
@@ -111,7 +111,7 @@
this.tracker.velocityChanged = false;
}
@@ -180,14 +223,17 @@
@@ -182,14 +225,17 @@
PlayerConnection playerconnection = entityplayer.playerConnection;
entityplayer.playerConnection.getClass();
@@ -131,10 +131,10 @@
+ // CraftBukkit end
}
Packet<?> packet = this.tracker.L();
@@ -204,6 +250,12 @@
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).getAttributeMap();
Collection<AttributeInstance> collection = attributemapserver.c();
Packet<?> packet = this.tracker.O();
@@ -205,6 +251,12 @@
if (this.tracker instanceof EntityLiving) {
Collection<AttributeModifiable> collection = ((EntityLiving) this.tracker).getAttributeMap().b();
+ // CraftBukkit start - If sending own attributes send scaled health instead of current maximum health
+ if (this.tracker.getId() == entityplayer.getId()) {
@@ -145,7 +145,7 @@
if (!collection.isEmpty()) {
consumer.accept(new PacketPlayOutUpdateAttributes(this.tracker.getId(), collection));
}
@@ -232,6 +284,11 @@
@@ -238,6 +290,11 @@
}
}
@@ -157,8 +157,8 @@
if (this.tracker instanceof EntityLiving) {
EntityLiving entityliving = (EntityLiving) this.tracker;
Iterator iterator = entityliving.getEffects().iterator();
@@ -273,6 +330,11 @@
Set<AttributeInstance> set = attributemapserver.getAttributes();
@@ -278,6 +335,11 @@
Set<AttributeModifiable> set = ((EntityLiving) this.tracker).getAttributeMap().getAttributes();
if (!set.isEmpty()) {
+ // CraftBukkit start - Send scaled max health