diff options
Diffstat (limited to 'nms-patches/Entity.patch')
-rw-r--r-- | nms-patches/Entity.patch | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch index 847f1793..9a9a59a6 100644 --- a/nms-patches/Entity.patch +++ b/nms-patches/Entity.patch @@ -48,17 +48,17 @@ private static final Logger a = LogManager.getLogger(); private static final AxisAlignedBB b = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); private static double c = 1.0D; -@@ -97,6 +136,9 @@ +@@ -98,6 +137,9 @@ public boolean glowing; - private final Set<String> aF; - private boolean aG; + private final Set<String> aG; + private boolean aH; + public boolean valid; // CraftBukkit + public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only + public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 public Entity(World world) { this.id = Entity.entityCount++; -@@ -193,6 +235,33 @@ +@@ -195,6 +237,33 @@ } protected void setYawPitch(float f, float f1) { @@ -92,7 +92,7 @@ this.yaw = f % 360.0F; this.pitch = f1 % 360.0F; } -@@ -236,7 +305,7 @@ +@@ -238,7 +307,7 @@ if (this.ak) { MinecraftServer minecraftserver = this.world.getMinecraftServer(); @@ -101,7 +101,7 @@ if (!this.isPassenger()) { int i = this.V(); -@@ -321,6 +390,27 @@ +@@ -323,6 +392,27 @@ protected void burnFromLava() { if (!this.fireProof) { this.damageEntity(DamageSource.LAVA, 4.0F); @@ -129,7 +129,7 @@ this.setOnFire(15); } } -@@ -361,6 +451,22 @@ +@@ -363,6 +453,22 @@ this.a(this.getBoundingBox().c(d0, d1, d2)); this.recalcPosition(); } else { @@ -152,7 +152,7 @@ this.world.methodProfiler.a("move"); double d3 = this.locX; double d4 = this.locY; -@@ -585,6 +691,26 @@ +@@ -587,6 +693,26 @@ block1.a(this.world, this); } @@ -179,7 +179,7 @@ if (this.playStepSound() && !flag && !this.isPassenger()) { double d21 = this.locX - d3; double d22 = this.locY - d4; -@@ -595,7 +721,7 @@ +@@ -597,7 +723,7 @@ } if (block1 != null && this.onGround) { @@ -188,7 +188,7 @@ } this.J = (float) ((double) this.J + (double) MathHelper.sqrt(d21 * d21 + d10 * d10) * 0.6D); -@@ -613,9 +739,12 @@ +@@ -615,9 +741,12 @@ } this.a(blockposition, block1); @@ -201,7 +201,7 @@ try { this.checkBlockCollisions(); } catch (Throwable throwable) { -@@ -625,6 +754,8 @@ +@@ -627,6 +756,8 @@ this.appendEntityCrashDetails(crashreportsystemdetails); throw new ReportedException(crashreport); } @@ -210,7 +210,7 @@ boolean flag2 = this.ah(); -@@ -632,7 +763,16 @@ +@@ -634,7 +765,16 @@ this.burn(1); if (!flag2) { ++this.fireTicks; @@ -228,7 +228,7 @@ this.setOnFire(8); } } -@@ -745,7 +885,7 @@ +@@ -748,7 +888,7 @@ return null; } @@ -237,7 +237,7 @@ if (!this.fireProof) { this.damageEntity(DamageSource.FIRE, (float) i); } -@@ -911,6 +1051,13 @@ +@@ -914,6 +1054,13 @@ } public void spawnIn(World world) { @@ -251,7 +251,7 @@ this.world = world; } -@@ -1104,6 +1251,18 @@ +@@ -1107,6 +1254,18 @@ try { nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ})); nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ})); @@ -270,7 +270,7 @@ nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch})); nbttagcompound.setFloat("FallDistance", this.fallDistance); nbttagcompound.setShort("Fire", (short) this.fireTicks); -@@ -1113,6 +1272,12 @@ +@@ -1116,6 +1275,12 @@ nbttagcompound.setBoolean("Invulnerable", this.invulnerable); nbttagcompound.setInt("PortalCooldown", this.portalCooldown); nbttagcompound.a("UUID", this.getUniqueID()); @@ -283,7 +283,7 @@ if (this.getCustomName() != null && !this.getCustomName().isEmpty()) { nbttagcompound.setString("CustomName", this.getCustomName()); } -@@ -1183,6 +1348,8 @@ +@@ -1187,6 +1352,8 @@ this.motX = nbttaglist1.e(0); this.motY = nbttaglist1.e(1); this.motZ = nbttaglist1.e(2); @@ -292,7 +292,7 @@ if (Math.abs(this.motX) > 10.0D) { this.motX = 0.0D; } -@@ -1194,6 +1361,7 @@ +@@ -1198,6 +1365,7 @@ if (Math.abs(this.motZ) > 10.0D) { this.motZ = 0.0D; } @@ -300,7 +300,7 @@ this.lastX = this.M = this.locX = nbttaglist.e(0); this.lastY = this.N = this.locY = nbttaglist.e(1); -@@ -1241,6 +1409,58 @@ +@@ -1246,6 +1414,58 @@ this.setPosition(this.locX, this.locY, this.locZ); } @@ -359,7 +359,7 @@ } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1302,6 +1522,12 @@ +@@ -1307,6 +1527,12 @@ public EntityItem a(ItemStack itemstack, float f) { if (itemstack.count != 0 && itemstack.getItem() != null) { @@ -372,8 +372,8 @@ EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack); entityitem.q(); -@@ -1422,6 +1648,24 @@ - if (entity.by() != this) { +@@ -1428,6 +1654,24 @@ + if (entity.bz() != this) { throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { + // CraftBukkit start @@ -394,11 +394,11 @@ + } + } + // CraftBukkit end - if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bt() instanceof EntityHuman)) { + if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bu() instanceof EntityHuman)) { this.passengers.add(0, entity); } else { -@@ -1435,6 +1679,22 @@ - if (entity.by() == this) { +@@ -1441,6 +1685,22 @@ + if (entity.bz() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { + // CraftBukkit start @@ -420,7 +420,7 @@ this.passengers.remove(entity); entity.j = 60; } -@@ -1577,10 +1837,38 @@ +@@ -1584,10 +1844,38 @@ } public void onLightningStrike(EntityLightning entitylightning) { @@ -461,7 +461,7 @@ } } -@@ -1715,19 +2003,67 @@ +@@ -1722,19 +2010,67 @@ if (!this.world.isClientSide && !this.dead) { this.world.methodProfiler.a("changeDimension"); MinecraftServer minecraftserver = this.h(); @@ -532,7 +532,7 @@ BlockPosition blockposition; if (i == 1) { -@@ -1756,12 +2092,18 @@ +@@ -1763,12 +2099,18 @@ blockposition = new BlockPosition(this); } @@ -552,7 +552,7 @@ if (j == 1 && i == 1) { BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn()); -@@ -1769,6 +2111,7 @@ +@@ -1776,6 +2118,7 @@ } else { entity.setPositionRotation(blockposition, entity.yaw, entity.pitch); } @@ -560,7 +560,7 @@ boolean flag = entity.attachedToPlayer; -@@ -1776,6 +2119,14 @@ +@@ -1783,6 +2126,14 @@ worldserver1.addEntity(entity); entity.attachedToPlayer = flag; worldserver1.entityJoinedWorld(entity, false); @@ -575,7 +575,7 @@ } this.dead = true; -@@ -1881,6 +2232,11 @@ +@@ -1893,6 +2244,11 @@ } public void setCustomName(String s) { @@ -584,10 +584,10 @@ + s = s.substring(0, 256); + } + // CraftBukkit end - this.datawatcher.set(Entity.az, s); + this.datawatcher.set(Entity.aA, s); } -@@ -1938,7 +2294,26 @@ +@@ -1950,7 +2306,26 @@ } public void a(AxisAlignedBB axisalignedbb) { @@ -615,8 +615,8 @@ } public float getHeadHeight() { -@@ -2110,7 +2485,7 @@ - for (Iterator iterator = this.bu().iterator(); iterator.hasNext(); entity.a(oclass, set)) { +@@ -2124,7 +2499,7 @@ + for (Iterator iterator = this.bv().iterator(); iterator.hasNext(); entity.a(oclass, set)) { entity = (Entity) iterator.next(); if (oclass.isAssignableFrom(entity.getClass())) { - set.add(entity); |