diff --git a/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java b/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java index 6af3b00..b2ebadc 100644 --- a/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java +++ b/BauSystem_12/src/de/steamwar/bausystem/commands/TPSLimit_12.java @@ -42,8 +42,10 @@ class TPSLimit_12 { packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), 0, 0, 0)); packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle())); - net.minecraft.server.v1_12_R1.Entity serverEntity = ((CraftEntity) entity).getHandle(); - packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true)); + if (entity instanceof TNTPrimed) { + net.minecraft.server.v1_12_R1.Entity serverEntity = ((CraftEntity) entity).getHandle(); + packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true)); + } }); } diff --git a/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java b/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java index e0a39f6..a1621dc 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/commands/TPSLimit_15.java @@ -42,8 +42,10 @@ class TPSLimit_15 { packets.add(new PacketPlayOutEntityVelocity(entity.getEntityId(), noMotion)); packets.add(new PacketPlayOutEntityTeleport(((CraftEntity) entity).getHandle())); - net.minecraft.server.v1_15_R1.Entity serverEntity = ((CraftEntity) entity).getHandle(); - packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true)); + if (entity instanceof TNTPrimed) { + net.minecraft.server.v1_15_R1.Entity serverEntity = ((CraftEntity) entity).getHandle(); + packets.add(new PacketPlayOutEntityMetadata(serverEntity.getId(), serverEntity.getDataWatcher(), true)); + } }); }