Update upstream BD/CB/S

--- work/BuildData
Submodule work/BuildData 633897ca..f0032df4:
  > Mappings Update

--- work/CraftBukkit
Submodule work/CraftBukkit b7fea427..043d31de:
  > SPIGOT-5015: Players in spectator mode prevent block placement and block projectiles
  > Make bukkitEntity private to prevent incorrect usage

--- work/Spigot
Submodule work/Spigot 01d0f046..baafee91:
  > Rebuild patches
This commit is contained in:
Zach Brown 2019-06-02 22:26:25 -05:00
parent 69c044e1b7
commit 692aedda04
12 changed files with 33 additions and 33 deletions

View File

@ -6,12 +6,12 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6b33c1c418..c97421721e 100644
index ddfa88bac..291a8029e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
protected CraftEntity bukkitEntity;
private CraftEntity bukkitEntity;
+ PlayerChunkMap.EntityTracker tracker; // Paper
+ Throwable addedToWorldStack; // Paper - entity debug
@ -19,7 +19,7 @@ index 6b33c1c418..c97421721e 100644
if (bukkitEntity == null) {
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 81b82aeeef..446bdb0216 100644
index c1d9f31b4..485fb95e1 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -40,7 +40,7 @@ index 81b82aeeef..446bdb0216 100644
protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d7229f100b..5cf3aea4fc 100644
index d7229f100..5cf3aea4f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -52,7 +52,7 @@ index d7229f100b..5cf3aea4fc 100644
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8cffbabfb6..f6ba51d14a 100644
index 8cffbabfb..f6ba51d14 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World {

View File

@ -46,7 +46,7 @@ index 4f60b931a..c950139c0 100644
double[] adouble = new double[]{1.0D};
double d0 = vec3d1.x - vec3d.x;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ea4442d76..6dae950c2 100644
index 73bd0c278..6bd88e1d3 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -66,7 +66,7 @@ index ea4442d76..6dae950c2 100644
return 0.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index ae1cda49a..17ee1c3eb 100644
index 280680832..09a58fb2a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
@ -108,16 +108,16 @@ index ae1cda49a..17ee1c3eb 100644
public int getShieldBlockingDelay() {
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index 035d70419..2ebcbe17c 100644
index 9bf191945..56488b78d 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -0,0 +0,0 @@ public final class IEntitySelector {
public static final Predicate<Entity> e = (entity) -> {
return !(entity instanceof EntityHuman) || !entity.t() && !((EntityHuman) entity).isCreative();
return !(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative();
};
+ public static Predicate<Entity> notSpectator() { return f; } // Paper - OBFHELPER
public static final Predicate<Entity> f = (entity) -> {
return !entity.t();
return !entity.isSpectator();
};
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d5c4115a8..c4aa1945f 100644

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add ProjectileCollideEvent
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 531bb7f663..bb3ee4320d 100644
index 28fc512ba..5ee0802e0 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -0,0 +0,0 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@ -26,7 +26,7 @@ index 531bb7f663..bb3ee4320d 100644
this.a((MovingObjectPosition) object);
this.impulse = true;
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index 739e48ec7c..192ee928fa 100644
index faf064757..fe4e993d5 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -0,0 +0,0 @@ public abstract class EntityFireball extends Entity {
@ -48,11 +48,11 @@ index 739e48ec7c..192ee928fa 100644
// CraftBukkit start - Fire ProjectileHitEvent
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 3b10043ba1..bdd2a39f89 100644
index 390f1a24d..758559d35 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
return !entity.t() && (entity.isInteractable() || entity instanceof EntityItem) && (entity != this.owner || this.g >= 5);
return !entity.isSpectator() && (entity.isInteractable() || entity instanceof EntityItem) && (entity != this.owner || this.g >= 5);
}, RayTrace.BlockCollisionOption.COLLIDER, true);
- if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
@ -70,7 +70,7 @@ index 3b10043ba1..bdd2a39f89 100644
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
this.hooked = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index ac62f836d1..bb4679cf76 100644
index d1710259c..5f0cb4c33 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -0,0 +0,0 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
@ -92,7 +92,7 @@ index ac62f836d1..bb4679cf76 100644
this.c(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition());
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e597f37903..224d1dbffc 100644
index e597f3790..224d1dbff 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ public class CraftEventFactory {

View File

@ -39,7 +39,7 @@ index f769df41a..087535caf 100644
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 013fa3524..7e534417b 100644
index 013fa3524..f717ac87c 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -0,0 +0,0 @@
@ -80,7 +80,7 @@ index 013fa3524..7e534417b 100644
if (!world.isClientSide) {
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);;
+ org.bukkit.entity.Entity source = explosion.source != null ? explosion.source.bukkitEntity : null;
+ org.bukkit.entity.Entity source = explosion.source != null ? explosion.source.getBukkitEntity() : null;
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.EXPLOSION, source).callEvent())
+ return;
+ // Paper end
@ -93,7 +93,7 @@ index 013fa3524..7e534417b 100644
} else {
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.ITEM, entityhuman.bukkitEntity).callEvent())
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.ITEM, entityhuman.getBukkitEntity()).callEvent())
+ return true;
+ // Paper end
a(world, blockposition, (EntityLiving) entityhuman);
@ -105,7 +105,7 @@ index 013fa3524..7e534417b 100644
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = MCUtil.toBukkitBlock(world, blockposition);
+ if (!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.PROJECTILE, entityarrow.bukkitEntity).callEvent()) {
+ if (!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.PROJECTILE, entityarrow.getBukkitEntity()).callEvent()) {
+ return;
+ }
+ // Paper end
@ -114,7 +114,7 @@ index 013fa3524..7e534417b 100644
world.a(blockposition, false);
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 0baec5e11..2b39115c9 100644
index 0baec5e11..9b2ac3c63 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.block.CraftBlock;
@ -131,7 +131,7 @@ index 0baec5e11..2b39115c9 100644
}
+ // Paper start - TNTPrimeEvent
+ org.bukkit.block.Block tntBlock = world.getWorld().getBlockAt(blockposition.x, blockposition.y, blockposition.z);
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.EXPLOSION, explosionSource.getSource().bukkitEntity).callEvent())
+ if(!new TNTPrimeEvent(tntBlock, TNTPrimeEvent.PrimeReason.EXPLOSION, explosionSource.getSource().getBukkitEntity()).callEvent())
+ continue;
+ // Paper end
nmsBlock.wasExploded(world, blockposition, explosionSource);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index a00b9b209..7d8885ce8 100644
index e316e2af7..87c4902f8 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -25,7 +25,7 @@ index 462f8f33a..e1c628f17 100644
for (int l1 = 0; l1 < list.size(); ++l1) {
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index ac44db254..035d70419 100644
index e2744dc40..9bf191945 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -0,0 +0,0 @@ public final class IEntitySelector {
@ -34,6 +34,6 @@ index ac44db254..035d70419 100644
};
+ public static Predicate<Entity> canAITarget() { return e; } // Paper - OBFHELPER
public static final Predicate<Entity> e = (entity) -> {
return !(entity instanceof EntityHuman) || !entity.t() && !((EntityHuman) entity).isCreative();
return !(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative();
};
--

View File

@ -520,7 +520,7 @@ index 000000000..d50410532
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e6e47bc57..202ad9489 100644
index ec57b0ad8..1cc7b9f60 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -528,7 +528,7 @@ index e6e47bc57..202ad9489 100644
}
+ public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
protected CraftEntity bukkitEntity;
private CraftEntity bukkitEntity;
public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java

View File

@ -7,7 +7,7 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 58d2a28a4..f5dac5082 100644
index 9abdf8b24..fc25b3c74 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 3cb04543d..05942fb7e 100644
index cfcbd1a2e..b8fe15f1a 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
@ -56,8 +56,8 @@ index 3cb04543d..05942fb7e 100644
}
+ // Paper end
@Override
public abstract boolean isSpectator();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 772f919b6..bb4dde0de 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java

@ -1 +1 @@
Subproject commit 633897ca59f5feb54c9f7f1a953f1989d9cb1b64
Subproject commit f0032df4970a118cf9a33620733c5e06934aaf0f

@ -1 +1 @@
Subproject commit b7fea42777bc65e64b5c22ffcb9018dcd707e928
Subproject commit 043d31deb089054e8a59477c2aa496e322f66156

@ -1 +1 @@
Subproject commit 01d0f0464a469946c49219f99ab9e617c77f72c4
Subproject commit baafee9142356786ffc5b81507e9e758d7fa241c