13
0
geforkt von Mirrors/Paper

SPIGOT-5816: PlayerTeleportEvent not called when using netherportals and allow-nether=false

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2020-06-26 08:30:47 +10:00
Ursprung 292593e180
Commit be27330b16
2 geänderte Dateien mit 69 neuen und 57 gelöschten Zeilen

Datei anzeigen

@ -1,12 +1,11 @@
--- a/net/minecraft/server/Entity.java --- a/net/minecraft/server/Entity.java
+++ b/net/minecraft/server/Entity.java +++ b/net/minecraft/server/Entity.java
@@ -21,8 +21,57 @@ @@ -21,8 +21,56 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
+// CraftBukkit start +// CraftBukkit start
+import org.bukkit.Bukkit; +import org.bukkit.Bukkit;
+import org.bukkit.Location;
+import org.bukkit.Server; +import org.bukkit.Server;
+import org.bukkit.block.BlockFace; +import org.bukkit.block.BlockFace;
+import org.bukkit.command.CommandSender; +import org.bukkit.command.CommandSender;
@ -58,7 +57,7 @@
protected static final Logger LOGGER = LogManager.getLogger(); protected static final Logger LOGGER = LogManager.getLogger();
private static final AtomicInteger entityCount = new AtomicInteger(); private static final AtomicInteger entityCount = new AtomicInteger();
private static final List<ItemStack> c = Collections.emptyList(); private static final List<ItemStack> c = Collections.emptyList();
@@ -111,6 +160,20 @@ @@ -111,6 +159,20 @@
private long aG; private long aG;
private EntitySize size; private EntitySize size;
private float headHeight; private float headHeight;
@ -79,7 +78,7 @@
public Entity(EntityTypes<?> entitytypes, World world) { public Entity(EntityTypes<?> entitytypes, World world) {
this.id = Entity.entityCount.incrementAndGet(); this.id = Entity.entityCount.incrementAndGet();
@@ -214,6 +277,12 @@ @@ -214,6 +276,12 @@
} }
public void setPose(EntityPose entitypose) { public void setPose(EntityPose entitypose) {
@ -92,7 +91,7 @@
this.datawatcher.set(Entity.POSE, entitypose); this.datawatcher.set(Entity.POSE, entitypose);
} }
@@ -230,6 +299,33 @@ @@ -230,6 +298,33 @@
} }
protected void setYawPitch(float f, float f1) { protected void setYawPitch(float f, float f1) {
@ -126,7 +125,7 @@
this.yaw = f % 360.0F; this.yaw = f % 360.0F;
this.pitch = f1 % 360.0F; this.pitch = f1 % 360.0F;
} }
@@ -240,6 +336,7 @@ @@ -240,6 +335,7 @@
float f1 = this.size.height; float f1 = this.size.height;
this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f)); this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f));
@ -134,7 +133,7 @@
} }
protected void ac() { protected void ac() {
@@ -254,6 +351,15 @@ @@ -254,6 +350,15 @@
this.entityBaseTick(); this.entityBaseTick();
} }
@ -150,7 +149,7 @@
public void entityBaseTick() { public void entityBaseTick() {
this.world.getMethodProfiler().enter("entityBaseTick"); this.world.getMethodProfiler().enter("entityBaseTick");
if (this.isPassenger() && this.getVehicle().dead) { if (this.isPassenger() && this.getVehicle().dead) {
@@ -267,7 +373,7 @@ @@ -267,7 +372,7 @@
this.z = this.A; this.z = this.A;
this.lastPitch = this.pitch; this.lastPitch = this.pitch;
this.lastYaw = this.yaw; this.lastYaw = this.yaw;
@ -159,7 +158,7 @@
if (this.aK()) { if (this.aK()) {
this.aL(); this.aL();
} }
@@ -322,12 +428,44 @@ @@ -322,12 +427,44 @@
protected void burnFromLava() { protected void burnFromLava() {
if (!this.isFireProof()) { if (!this.isFireProof()) {
@ -205,7 +204,7 @@
int j = i * 20; int j = i * 20;
if (this instanceof EntityLiving) { if (this instanceof EntityLiving) {
@@ -424,6 +562,28 @@ @@ -424,6 +561,28 @@
block.a((IBlockAccess) this.world, this); block.a((IBlockAccess) this.world, this);
} }
@ -234,7 +233,7 @@
if (this.onGround && !this.br()) { if (this.onGround && !this.br()) {
block.stepOn(this.world, blockposition, this); block.stepOn(this.world, blockposition, this);
} }
@@ -698,6 +858,7 @@ @@ -698,6 +857,7 @@
AxisAlignedBB axisalignedbb = this.getBoundingBox(); AxisAlignedBB axisalignedbb = this.getBoundingBox();
this.setPositionRaw((axisalignedbb.minX + axisalignedbb.maxX) / 2.0D, axisalignedbb.minY, (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D); this.setPositionRaw((axisalignedbb.minX + axisalignedbb.maxX) / 2.0D, axisalignedbb.minY, (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D);
@ -242,7 +241,7 @@
} }
protected SoundEffect getSoundSwim() { protected SoundEffect getSoundSwim() {
@@ -1036,6 +1197,13 @@ @@ -1036,6 +1196,13 @@
} }
public void spawnIn(World world) { public void spawnIn(World world) {
@ -256,7 +255,7 @@
this.world = world; this.world = world;
} }
@@ -1051,6 +1219,7 @@ @@ -1051,6 +1218,7 @@
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F; this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
this.lastYaw = this.yaw; this.lastYaw = this.yaw;
this.lastPitch = this.pitch; this.lastPitch = this.pitch;
@ -264,7 +263,7 @@
} }
public void c(Vec3D vec3d) { public void c(Vec3D vec3d) {
@@ -1225,6 +1394,12 @@ @@ -1225,6 +1393,12 @@
return false; return false;
} }
@ -277,7 +276,7 @@
public void a(Entity entity, int i, DamageSource damagesource) { public void a(Entity entity, int i, DamageSource damagesource) {
if (entity instanceof EntityPlayer) { if (entity instanceof EntityPlayer) {
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
@@ -1235,7 +1410,7 @@ @@ -1235,7 +1409,7 @@
public boolean a_(NBTTagCompound nbttagcompound) { public boolean a_(NBTTagCompound nbttagcompound) {
String s = this.getSaveID(); String s = this.getSaveID();
@ -286,7 +285,7 @@
nbttagcompound.setString("id", s); nbttagcompound.setString("id", s);
this.save(nbttagcompound); this.save(nbttagcompound);
return true; return true;
@@ -1259,6 +1434,18 @@ @@ -1259,6 +1433,18 @@
Vec3D vec3d = this.getMot(); Vec3D vec3d = this.getMot();
nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z)); nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z));
@ -305,7 +304,7 @@
nbttagcompound.set("Rotation", this.a(this.yaw, this.pitch)); nbttagcompound.set("Rotation", this.a(this.yaw, this.pitch));
nbttagcompound.setFloat("FallDistance", this.fallDistance); nbttagcompound.setFloat("FallDistance", this.fallDistance);
nbttagcompound.setShort("Fire", (short) this.fireTicks); nbttagcompound.setShort("Fire", (short) this.fireTicks);
@@ -1267,6 +1454,12 @@ @@ -1267,6 +1453,12 @@
nbttagcompound.setBoolean("Invulnerable", this.invulnerable); nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
nbttagcompound.setInt("PortalCooldown", this.portalCooldown); nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
nbttagcompound.a("UUID", this.getUniqueID()); nbttagcompound.a("UUID", this.getUniqueID());
@ -318,7 +317,7 @@
IChatBaseComponent ichatbasecomponent = this.getCustomName(); IChatBaseComponent ichatbasecomponent = this.getCustomName();
if (ichatbasecomponent != null) { if (ichatbasecomponent != null) {
@@ -1324,6 +1517,11 @@ @@ -1324,6 +1516,11 @@
} }
} }
@ -330,7 +329,7 @@
return nbttagcompound; return nbttagcompound;
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
@@ -1401,6 +1599,43 @@ @@ -1401,6 +1598,43 @@
} else { } else {
throw new IllegalStateException("Entity has invalid position"); throw new IllegalStateException("Entity has invalid position");
} }
@ -374,7 +373,7 @@
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1476,9 +1711,22 @@ @@ -1476,9 +1710,22 @@
} else if (this.world.isClientSide) { } else if (this.world.isClientSide) {
return null; return null;
} else { } else {
@ -397,7 +396,7 @@
this.world.addEntity(entityitem); this.world.addEntity(entityitem);
return entityitem; return entityitem;
} }
@@ -1559,7 +1807,7 @@ @@ -1559,7 +1806,7 @@
this.setPose(EntityPose.STANDING); this.setPose(EntityPose.STANDING);
this.vehicle = entity; this.vehicle = entity;
@ -406,7 +405,7 @@
return true; return true;
} }
} }
@@ -1584,7 +1832,7 @@ @@ -1584,7 +1831,7 @@
Entity entity = this.vehicle; Entity entity = this.vehicle;
this.vehicle = null; this.vehicle = null;
@ -415,7 +414,7 @@
} }
} }
@@ -1593,10 +1841,31 @@ @@ -1593,10 +1840,31 @@
this.bb(); this.bb();
} }
@ -448,7 +447,7 @@
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.getRidingPassenger() instanceof EntityHuman)) { if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.getRidingPassenger() instanceof EntityHuman)) {
this.passengers.add(0, entity); this.passengers.add(0, entity);
} else { } else {
@@ -1604,15 +1873,33 @@ @@ -1604,15 +1872,33 @@
} }
} }
@ -483,7 +482,12 @@
} }
protected boolean q(Entity entity) { protected boolean q(Entity entity) {
@@ -1665,7 +1952,13 @@ @@ -1661,11 +1947,17 @@
ResourceKey<World> resourcekey = this.world.getDimensionKey() == World.THE_NETHER ? World.OVERWORLD : World.THE_NETHER;
WorldServer worldserver1 = minecraftserver.getWorldServer(resourcekey);
- if (worldserver1 != null && minecraftserver.getAllowNether() && !this.isPassenger() && this.portalTicks++ >= i) {
+ if (true && !this.isPassenger() && this.portalTicks++ >= i) { // CraftBukkit
this.world.getMethodProfiler().enter("portal"); this.world.getMethodProfiler().enter("portal");
this.portalTicks = i; this.portalTicks = i;
this.portalCooldown = this.getDefaultPortalCooldown(); this.portalCooldown = this.getDefaultPortalCooldown();
@ -498,7 +502,7 @@
this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().exit();
} }
@@ -1765,6 +2058,13 @@ @@ -1765,6 +2057,13 @@
} }
public void setSwimming(boolean flag) { public void setSwimming(boolean flag) {
@ -512,7 +516,7 @@
this.setFlag(4, flag); this.setFlag(4, flag);
} }
@@ -1825,16 +2125,56 @@ @@ -1825,16 +2124,56 @@
} }
public void setAirTicks(int i) { public void setAirTicks(int i) {
@ -572,7 +576,7 @@
} }
public void k(boolean flag) { public void k(boolean flag) {
@@ -1986,18 +2326,45 @@ @@ -1986,18 +2325,45 @@
@Nullable @Nullable
public Entity a(WorldServer worldserver) { public Entity a(WorldServer worldserver) {
@ -622,7 +626,7 @@
} else { } else {
double d0 = this.locX(); double d0 = this.locX();
double d1 = this.locZ(); double d1 = this.locZ();
@@ -2023,7 +2390,16 @@ @@ -2023,7 +2389,16 @@
Vec3D vec3d1 = this.getPortalOffset(); Vec3D vec3d1 = this.getPortalOffset();
blockposition = new BlockPosition(d0, this.locY(), d1); blockposition = new BlockPosition(d0, this.locY(), d1);
@ -640,7 +644,7 @@
if (shapedetector_shape == null) { if (shapedetector_shape == null) {
return null; return null;
@@ -2033,6 +2409,11 @@ @@ -2033,6 +2408,11 @@
vec3d = shapedetector_shape.velocity; vec3d = shapedetector_shape.velocity;
f = (float) shapedetector_shape.yaw; f = (float) shapedetector_shape.yaw;
} }
@ -652,7 +656,7 @@
this.world.getMethodProfiler().exitEnter("reloading"); this.world.getMethodProfiler().exitEnter("reloading");
Entity entity = this.getEntityType().a((World) worldserver); Entity entity = this.getEntityType().a((World) worldserver);
@@ -2043,8 +2424,16 @@ @@ -2043,8 +2423,16 @@
entity.setMot(vec3d); entity.setMot(vec3d);
worldserver.addEntityTeleport(entity); worldserver.addEntityTeleport(entity);
if (worldserver.getDimensionKey() == World.THE_END) { if (worldserver.getDimensionKey() == World.THE_END) {
@ -670,7 +674,7 @@
} }
this.bJ(); this.bJ();
@@ -2253,7 +2642,26 @@ @@ -2253,7 +2641,26 @@
} }
public void a(AxisAlignedBB axisalignedbb) { public void a(AxisAlignedBB axisalignedbb) {

Datei anzeigen

@ -397,7 +397,15 @@
double d0 = this.locX(); double d0 = this.locX();
double d1 = this.locY(); double d1 = this.locY();
double d2 = this.locZ(); double d2 = this.locZ();
@@ -593,7 +803,26 @@ @@ -567,6 +777,7 @@
worldserver1.getMethodProfiler().enter("moving");
double d3;
+ if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event
if (worldserver.getDimensionKey() == World.THE_END) {
BlockPosition blockposition = WorldServer.a;
@@ -593,7 +804,26 @@
} }
} }
@ -425,7 +433,7 @@
worldserver1.getMethodProfiler().exit(); worldserver1.getMethodProfiler().exit();
worldserver1.getMethodProfiler().enter("placing"); worldserver1.getMethodProfiler().enter("placing");
double d4 = Math.min(-2.9999872E7D, worldserver.getWorldBorder().e() + 16.0D); double d4 = Math.min(-2.9999872E7D, worldserver.getWorldBorder().e() + 16.0D);
@@ -604,25 +833,74 @@ @@ -604,25 +834,74 @@
d0 = MathHelper.a(d0, d4, d5); d0 = MathHelper.a(d0, d4, d5);
d2 = MathHelper.a(d2, d3, d6); d2 = MathHelper.a(d2, d3, d6);
@ -512,7 +520,7 @@
this.playerInteractManager.a(worldserver); this.playerInteractManager.a(worldserver);
this.playerConnection.sendPacket(new PacketPlayOutAbilities(this.abilities)); this.playerConnection.sendPacket(new PacketPlayOutAbilities(this.abilities));
playerlist.a(this, worldserver); playerlist.a(this, worldserver);
@@ -639,6 +917,11 @@ @@ -639,6 +918,11 @@
this.lastSentExp = -1; this.lastSentExp = -1;
this.lastHealthSent = -1.0F; this.lastHealthSent = -1.0F;
this.lastFoodSent = -1; this.lastFoodSent = -1;
@ -524,7 +532,7 @@
return this; return this;
} }
} }
@@ -680,10 +963,8 @@ @@ -680,10 +964,8 @@
this.activeContainer.c(); this.activeContainer.c();
} }
@ -537,7 +545,7 @@
if (!this.isSleeping() && this.isAlive()) { if (!this.isSleeping() && this.isAlive()) {
if (!this.world.getDimensionManager().isNatural()) { if (!this.world.getDimensionManager().isNatural()) {
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE); return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
@@ -709,7 +990,36 @@ @@ -709,7 +991,36 @@
} }
} }
@ -575,7 +583,7 @@
this.a(StatisticList.SLEEP_IN_BED); this.a(StatisticList.SLEEP_IN_BED);
CriterionTriggers.q.a(this); CriterionTriggers.q.a(this);
}); });
@@ -718,9 +1028,8 @@ @@ -718,9 +1029,8 @@
return either; return either;
} }
} }
@ -586,7 +594,7 @@
} }
@Override @Override
@@ -747,6 +1056,7 @@ @@ -747,6 +1057,7 @@
@Override @Override
public void wakeup(boolean flag, boolean flag1) { public void wakeup(boolean flag, boolean flag1) {
@ -594,7 +602,7 @@
if (this.isSleeping()) { if (this.isSleeping()) {
this.getWorldServer().getChunkProvider().broadcastIncludingSelf(this, new PacketPlayOutAnimation(this, 2)); this.getWorldServer().getChunkProvider().broadcastIncludingSelf(this, new PacketPlayOutAnimation(this, 2));
} }
@@ -818,8 +1128,9 @@ @@ -818,8 +1129,9 @@
this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition())); this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition()));
} }
@ -605,7 +613,7 @@
} }
@Override @Override
@@ -834,6 +1145,24 @@ @@ -834,6 +1146,24 @@
this.nextContainerCounter(); this.nextContainerCounter();
Container container = itileinventory.createMenu(this.containerCounter, this.inventory, this); Container container = itileinventory.createMenu(this.containerCounter, this.inventory, this);
@ -630,7 +638,7 @@
if (container == null) { if (container == null) {
if (this.isSpectator()) { if (this.isSpectator()) {
this.a((IChatBaseComponent) (new ChatMessage("container.spectatorCantOpen")).a(EnumChatFormat.RED), true); this.a((IChatBaseComponent) (new ChatMessage("container.spectatorCantOpen")).a(EnumChatFormat.RED), true);
@@ -841,9 +1170,11 @@ @@ -841,9 +1171,11 @@
return OptionalInt.empty(); return OptionalInt.empty();
} else { } else {
@ -644,7 +652,7 @@
return OptionalInt.of(this.containerCounter); return OptionalInt.of(this.containerCounter);
} }
} }
@@ -856,13 +1187,24 @@ @@ -856,13 +1188,24 @@
@Override @Override
public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) { public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) {
@ -671,7 +679,7 @@
this.activeContainer.addSlotListener(this); this.activeContainer.addSlotListener(this);
} }
@@ -907,6 +1249,11 @@ @@ -907,6 +1250,11 @@
public void a(Container container, NonNullList<ItemStack> nonnulllist) { public void a(Container container, NonNullList<ItemStack> nonnulllist) {
this.playerConnection.sendPacket(new PacketPlayOutWindowItems(container.windowId, nonnulllist)); this.playerConnection.sendPacket(new PacketPlayOutWindowItems(container.windowId, nonnulllist));
this.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, this.inventory.getCarried())); this.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, this.inventory.getCarried()));
@ -683,7 +691,7 @@
} }
@Override @Override
@@ -916,6 +1263,7 @@ @@ -916,6 +1264,7 @@
@Override @Override
public void closeInventory() { public void closeInventory() {
@ -691,7 +699,7 @@
this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId)); this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId));
this.o(); this.o();
} }
@@ -950,7 +1298,7 @@ @@ -950,7 +1299,7 @@
@Override @Override
public void a(Statistic<?> statistic, int i) { public void a(Statistic<?> statistic, int i) {
this.serverStatisticManager.b(this, statistic, i); this.serverStatisticManager.b(this, statistic, i);
@ -700,7 +708,7 @@
scoreboardscore.addScore(i); scoreboardscore.addScore(i);
}); });
} }
@@ -958,7 +1306,7 @@ @@ -958,7 +1307,7 @@
@Override @Override
public void a(Statistic<?> statistic) { public void a(Statistic<?> statistic) {
this.serverStatisticManager.setStatistic(this, statistic, 0); this.serverStatisticManager.setStatistic(this, statistic, 0);
@ -709,7 +717,7 @@
} }
@Override @Override
@@ -1007,7 +1355,16 @@ @@ -1007,7 +1356,16 @@
public void triggerHealthUpdate() { public void triggerHealthUpdate() {
this.lastHealthSent = -1.0E8F; this.lastHealthSent = -1.0E8F;
@ -726,7 +734,7 @@
@Override @Override
public void a(IChatBaseComponent ichatbasecomponent, boolean flag) { public void a(IChatBaseComponent ichatbasecomponent, boolean flag) {
@@ -1062,12 +1419,14 @@ @@ -1062,12 +1420,14 @@
this.lastSentExp = -1; this.lastSentExp = -1;
this.lastHealthSent = -1.0F; this.lastHealthSent = -1.0F;
this.lastFoodSent = -1; this.lastFoodSent = -1;
@ -742,7 +750,7 @@
} }
@Override @Override
@@ -1135,6 +1494,18 @@ @@ -1135,6 +1495,18 @@
@Override @Override
public void a(EnumGamemode enumgamemode) { public void a(EnumGamemode enumgamemode) {
@ -761,7 +769,7 @@
this.playerInteractManager.setGameMode(enumgamemode); this.playerInteractManager.setGameMode(enumgamemode);
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.d, (float) enumgamemode.getId())); this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.d, (float) enumgamemode.getId()));
if (enumgamemode == EnumGamemode.SPECTATOR) { if (enumgamemode == EnumGamemode.SPECTATOR) {
@@ -1184,7 +1555,20 @@ @@ -1184,7 +1556,20 @@
return s; return s;
} }
@ -782,7 +790,7 @@
this.cf = packetplayinsettings.d(); this.cf = packetplayinsettings.d();
this.cg = packetplayinsettings.e(); this.cg = packetplayinsettings.e();
this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f()); this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f());
@@ -1220,13 +1604,13 @@ @@ -1220,13 +1605,13 @@
if (entity instanceof EntityHuman) { if (entity instanceof EntityHuman) {
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(new int[]{entity.getId()})); this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(new int[]{entity.getId()}));
} else { } else {
@ -798,7 +806,7 @@
} }
@Override @Override
@@ -1250,7 +1634,7 @@ @@ -1250,7 +1635,7 @@
this.spectatedEntity = (Entity) (entity == null ? this : entity); this.spectatedEntity = (Entity) (entity == null ? this : entity);
if (entity1 != this.spectatedEntity) { if (entity1 != this.spectatedEntity) {
this.playerConnection.sendPacket(new PacketPlayOutCamera(this.spectatedEntity)); this.playerConnection.sendPacket(new PacketPlayOutCamera(this.spectatedEntity));
@ -807,7 +815,7 @@
} }
} }
@@ -1279,7 +1663,7 @@ @@ -1279,7 +1664,7 @@
@Nullable @Nullable
public IChatBaseComponent getPlayerListName() { public IChatBaseComponent getPlayerListName() {
@ -816,7 +824,7 @@
} }
@Override @Override
@@ -1300,9 +1684,16 @@ @@ -1300,9 +1685,16 @@
return this.advancementDataPlayer; return this.advancementDataPlayer;
} }
@ -833,7 +841,7 @@
if (worldserver == this.world) { if (worldserver == this.world) {
this.playerConnection.a(d0, d1, d2, f, f1); this.playerConnection.a(d0, d1, d2, f, f1);
} else { } else {
@@ -1323,6 +1714,9 @@ @@ -1323,6 +1715,9 @@
this.server.getPlayerList().a(this, worldserver); this.server.getPlayerList().a(this, worldserver);
this.server.getPlayerList().updateClient(this); this.server.getPlayerList().updateClient(this);
} }
@ -843,7 +851,7 @@
} }
@@ -1409,4 +1803,144 @@ @@ -1409,4 +1804,144 @@
return entityitem; return entityitem;
} }
} }