diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 4a2760484..02ecaa676 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -26,6 +26,7 @@ import org.bukkit.block.BlockFace; import org.bukkit.command.CommandSender; import org.bukkit.entity.Hanging; import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; import org.bukkit.entity.Vehicle; import co.aikar.timings.MinecraftTimings; // Paper import co.aikar.timings.Timing; // Paper @@ -1270,13 +1271,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke for (i = 0; (float) i < 1.0F + this.width * 20.0F; ++i) { f3 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width; f4 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width; - this.world.addParticle(Particles.e, this.locX + (double) f3, (double) (f2 + 1.0F), this.locZ + (double) f4, this.motX, this.motY - (double) (this.random.nextFloat() * 0.2F), this.motZ); + //this.world.addParticle(Particles.e, this.locX + (double) f3, (double) (f2 + 1.0F), this.locZ + (double) f4, this.motX, this.motY - (double) (this.random.nextFloat() * 0.2F), this.motZ); } for (i = 0; (float) i < 1.0F + this.width * 20.0F; ++i) { f3 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width; f4 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width; - this.world.addParticle(Particles.R, this.locX + (double) f3, (double) (f2 + 1.0F), this.locZ + (double) f4, this.motX, this.motY, this.motZ); + //this.world.addParticle(Particles.R, this.locX + (double) f3, (double) (f2 + 1.0F), this.locZ + (double) f4, this.motX, this.motY, this.motZ); } } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index de9d006fe..d14f8b4b6 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -178,7 +178,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { // Akarin start public final void sendPackets(Packet packet0, Packet packet1) { - if (this.isConnected()) { // why send packet to whom not connected? + if (this.isConnected() && this.channel.isRegistered()) { // why send packet to whom not connected? //this.j.readLock().lock(); //try { // Queue new packets @@ -191,7 +191,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } public final void sendPackets(Packet packet0, Packet packet1, Packet packet2) { - if (this.isConnected()) { // why send packet to whom not connected? + if (this.isConnected() && this.channel.isRegistered()) { // why send packet to whom not connected? //this.j.readLock().lock(); //try { // Queue new packets @@ -205,7 +205,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } public final void sendPackets(Packet packet0, Packet packet1, Packet packet2, Packet packet3, Packet packet4, Packet packet5, Packet packet6) { - if (this.isConnected()) { // why send packet to whom not connected? + if (this.isConnected() && this.channel.isRegistered()) { // why send packet to whom not connected? //this.j.readLock().lock(); //try { // Queue new packets @@ -223,7 +223,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { } // Akarin end public void sendPacket(Packet packet, @Nullable GenericFutureListener> genericfuturelistener) { - if (this.isConnected() /*&& this.sendPacketQueue() && !(packet instanceof PacketPlayOutMapChunk && !((PacketPlayOutMapChunk) packet).isReady())*/) { // Paper - Async-Anti-Xray - Add chunk packets which are not ready or all packets if the packet queue contains chunk packets which are not ready to the packet queue and send the packets later in the right order // Akarin + if (this.isConnected() && this.channel.isRegistered() /*&& this.sendPacketQueue() && !(packet instanceof PacketPlayOutMapChunk && !((PacketPlayOutMapChunk) packet).isReady())*/) { // Paper - Async-Anti-Xray - Add chunk packets which are not ready or all packets if the packet queue contains chunk packets which are not ready to the packet queue and send the packets later in the right order // Akarin //this.o(); // Paper - Async-Anti-Xray - Move to if statement (this.sendPacketQueue()) // Akarin start //this.j.readLock().lock(); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 0650b27bb..aa6df11a2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -98,9 +98,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { private double s; private double t; private double u; - private double v; - private double w; - private double x; + // Akarin start - package + double v; + double w; + double x; + // Akarin end private Vec3D teleportPos; private int teleportAwait; private int A; diff --git a/work/Paper b/work/Paper index e50b4f608..b587621ad 160000 --- a/work/Paper +++ b/work/Paper @@ -1 +1 @@ -Subproject commit e50b4f608d040306479064294c11d1759fea4769 +Subproject commit b587621ad9c0723e57d18d7245fb3ff5d59b08c8