From cc8b7bd96eb6652d02207ada0bae77c465e75013 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 15 Oct 2020 18:42:31 +0200 Subject: [PATCH] Reduce block change packets Signed-off-by: Lixfel --- .../de/steamwar/fightsystem/listener/EventRecordListener.java | 2 ++ .../src/de/steamwar/fightsystem/record/SpectateConnection.java | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/EventRecordListener.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/EventRecordListener.java index 9e25bce..c50a3be 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/EventRecordListener.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/EventRecordListener.java @@ -117,6 +117,8 @@ public class EventRecordListener extends BasicListener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockPhysics(BlockPhysicsEvent e){ + if(e.getBlock() != e.getSourceBlock()) + return; RecordSystem.blockChange(e.getBlock()); } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java b/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java index 2ccf537..8db7f20 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/record/SpectateConnection.java @@ -30,7 +30,6 @@ public class SpectateConnection extends Recorder{ private Socket socket; private DataOutputStream outputStream; - private PipedInputStream inputStream; SpectateConnection(){ super();