Updated Upstream (Paper & Tuinity)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
8fa15382b [Auto] Updated Upstream (CraftBukkit)
732b2f6b5 [CI-SKIP] [Auto] Rebuild Patches
c5a39ffa2 Add BlockPreDispenseEvent (#5075)
8aeb4c9c3 Correctly skip pathfinder ticks for inactive entities (#5085)
0e420049c Fix console spam when removing chests in water
56b7935bb Add PlayerChangeBeaconEffectEvent
2eda45c34 added Wither API
97d0c571b Added Vanilla Entity Tags
fccac282a fix NPE in getDisplayNameComponent
24e140372 Configurable max leash distance

Tuinity Changes:
d3ee22224 Merge dev/lighting
This commit is contained in:
BillyGalbreath
2021-01-20 23:52:09 -06:00
parent cd18335858
commit 643d9681ff
39 changed files with 614 additions and 372 deletions

View File

@@ -161,7 +161,7 @@ index bd0267ee4b3782f6d1ec39cba7966ba4f62f1adf..8b36ac2b0950a827763aa2357700f37e
this.B = true;
return this;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cbb1f8a0b4 100644
index e59826b3e822a49378ae0d7b7cbca8c5d5ff476d..0115e2c73eff9d5e4c6778e32fc54b9c116b6b22 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -80,7 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -200,7 +200,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
private float headHeight;
// CraftBukkit start
public boolean persist = true;
@@ -1491,6 +1491,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1482,6 +1482,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return !this.justCreated && this.M.getDouble(TagsFluid.LAVA) > 0.0D;
}
@@ -208,7 +208,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
public void a(float f, Vec3D vec3d) {
Vec3D vec3d1 = a(vec3d, f, this.yaw);
@@ -2247,6 +2248,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2238,6 +2239,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.a(entity, false);
}
@@ -216,7 +216,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
public boolean a(Entity entity, boolean flag) {
for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
if (entity1.vehicle == this) {
@@ -2342,6 +2344,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2333,6 +2335,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.passengers.add(entity);
}
@@ -230,7 +230,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
}
return true; // CraftBukkit
}
@@ -2382,6 +2391,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2373,6 +2382,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return false;
}
// Spigot end
@@ -243,7 +243,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
this.passengers.remove(entity);
entity.j = 60;
}
@@ -2547,6 +2562,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2538,6 +2553,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.setFlag(4, flag);
}
@@ -251,7 +251,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
public boolean bE() {
return this.glowing || this.world.isClientSide && this.getFlag(6);
}
@@ -2769,6 +2785,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2760,6 +2776,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public void setHeadRotation(float f) {}
@@ -259,7 +259,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
public void n(float f) {}
public boolean bL() {
@@ -3210,6 +3227,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -3201,6 +3218,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return false;
}
@@ -278,7 +278,7 @@ index 3002dbaba08a5567e7e173f47f5973a8d6b4075a..2bd65dd4c4c4824a7969392f8ded35cb
@Override
public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {}
@@ -3662,4 +3691,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -3653,4 +3682,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return ((ChunkProviderServer) world.getChunkProvider()).isInEntityTickingChunk(this);
}
// Paper end
@@ -614,7 +614,7 @@ index 74082136b38491a0a50d152c455edfa61a6afb9f..dcfad16e06450068d5801fc002c96501
if (this.c <= 0) {
this.c = 100;
diff --git a/src/main/java/net/minecraft/server/EntityCat.java b/src/main/java/net/minecraft/server/EntityCat.java
index 57166a543a9af9e10e38c983487fac7ea9d42d52..05929d5c539a738e6b6e8d32d9b0f843a665f4f6 100644
index 35f511c398795a0edeb5fe6d802f2a2bf754bf3a..700314b02abb355e6a600d744887a705cbcfb4e4 100644
--- a/src/main/java/net/minecraft/server/EntityCat.java
+++ b/src/main/java/net/minecraft/server/EntityCat.java
@@ -41,6 +41,25 @@ public class EntityCat extends EntityTameableAnimal {
@@ -4486,7 +4486,7 @@ index ca3c5150bcfe2a92b49ad5a27c23dd37a7054fbb..323d79a99402b0f6952b4fb873170069
this.targetSelector.a(2, this.br);
this.targetSelector.a(3, this.bs);
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d41770955 100644
index 2e623ef9be036ea467e9e41817c2eced018f8f93..0442b722e5dc7ccc6e607fb3fa7766496b3398d5 100644
--- a/src/main/java/net/minecraft/server/EntityWither.java
+++ b/src/main/java/net/minecraft/server/EntityWither.java
@@ -32,6 +32,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -4494,10 +4494,10 @@ index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d
};
private static final PathfinderTargetCondition bz = (new PathfinderTargetCondition()).a(20.0D).a(EntityWither.by);
+ private int shootCooldown = 0; // Purpur
// Paper start
private boolean canPortal = false;
public EntityWither(EntityTypes<? extends EntityWither> entitytypes, World world) {
super(entitytypes, world);
@@ -39,15 +40,122 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -44,15 +45,122 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
this.setHealth(this.getMaxHealth());
this.getNavigation().d(true);
this.f = 50;
@@ -4621,7 +4621,7 @@ index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0]));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 0, false, false, EntityWither.by));
}
@@ -189,6 +297,16 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -194,6 +302,16 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@Override
protected void mobTick() {
@@ -4638,7 +4638,7 @@ index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d
int i;
if (this.getInvul() > 0) {
@@ -372,7 +490,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -377,7 +495,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
this.bossBattle.removePlayer(entityplayer);
}
@@ -4647,7 +4647,7 @@ index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d
if (i <= 0) {
return this.locX();
} else {
@@ -383,11 +501,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -388,11 +506,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
}
}
@@ -4661,7 +4661,7 @@ index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d
if (i <= 0) {
return this.locZ();
} else {
@@ -511,7 +629,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -516,7 +634,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
}
public static AttributeProvider.Builder eK() {
@@ -4670,7 +4670,7 @@ index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d
}
public int getInvul() {
@@ -523,11 +641,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -528,11 +646,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
}
public int getHeadTarget(int i) {
@@ -4683,8 +4683,8 @@ index 53482a420c356fd50e5ab6dd729a271d6594dac7..f68cf834aa65cc4bbb1eb9901586395d
+ if (!hasRider()) this.datawatcher.set(EntityWither.bo.get(i), j); // Purpur
}
public boolean S_() {
@@ -541,7 +659,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
public final boolean isPowered() { return this.S_(); } // Paper - OBFHELPER
@@ -547,7 +665,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@Override
protected boolean n(Entity entity) {
@@ -4885,7 +4885,7 @@ index cbc0b8bc854ab1b0ba95fa0a2041385f440718d9..89d64ea0d1e61dfce622df026209af12
default int getHeight() {
diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java
index bbc089b41fcbe0141f13591db2cb44b9e688cac4..63040363fa5ae79ab0f2c31a1257cac2a610bc6a 100644
index dc9f2a1a132b3a7925bd62aa1da0512afd90b8b1..b7e540dfeeabb13227596ecfc6eddabf3cfde537 100644
--- a/src/main/java/net/minecraft/server/IProjectile.java
+++ b/src/main/java/net/minecraft/server/IProjectile.java
@@ -12,7 +12,7 @@ public abstract class IProjectile extends Entity {
@@ -4973,10 +4973,10 @@ index 0000000000000000000000000000000000000000..44929182dfd7ad847d9657c324f440cb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e2f97fa2b350c56c7086d89b4f66d07f3668e479..398f883b2e646dc8e90753270d1dece833a80739 100644
index eff58bba46e5cb4bd412fcb65e293d5b9eb58aba..e9485684b7d5ddde72fc388d51cfef679178bad3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2246,6 +2246,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2288,6 +2288,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
this.server.getPluginManager().callEvent(event);
@@ -6383,10 +6383,10 @@ index a6d849facba1526ae2a2b7f3fb9a140d0b50289c..b56ca054b37f5887e13b481baad8132f
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 63d329dca12f902e2fb2a62ee4c86aea6453f1a3..a6963544fe460798ee870d7080939c8ec838398e 100644
index 696ded96e6018bc5289cc20f72d6dc9395d3b6a6..55ab5e078d28de962ec450c575c7f5bb4fa7ce6f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -509,6 +509,18 @@ public class CraftEventFactory {
@@ -510,6 +510,18 @@ public class CraftEventFactory {
}
craftServer.getPluginManager().callEvent(event);
@@ -6405,7 +6405,7 @@ index 63d329dca12f902e2fb2a62ee4c86aea6453f1a3..a6963544fe460798ee870d7080939c8e
return event;
}
@@ -909,6 +921,7 @@ public class CraftEventFactory {
@@ -910,6 +922,7 @@ public class CraftEventFactory {
damageCause = DamageCause.ENTITY_EXPLOSION;
}
event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions);
@@ -6413,7 +6413,7 @@ index 63d329dca12f902e2fb2a62ee4c86aea6453f1a3..a6963544fe460798ee870d7080939c8e
}
event.setCancelled(cancelled);
@@ -993,6 +1006,7 @@ public class CraftEventFactory {
@@ -994,6 +1007,7 @@ public class CraftEventFactory {
if (!event.isCancelled()) {
event.getEntity().setLastDamageCause(event);
}
@@ -6421,7 +6421,7 @@ index 63d329dca12f902e2fb2a62ee4c86aea6453f1a3..a6963544fe460798ee870d7080939c8e
return event;
}
@@ -1042,6 +1056,7 @@ public class CraftEventFactory {
@@ -1043,6 +1057,7 @@ public class CraftEventFactory {
EntityDamageEvent event;
if (damager != null) {
event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, modifiers, modifierFunctions);