From 0971c7d58deebc06a2dde9dedcf8fa4e002e5bce Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 10 Feb 2020 13:41:42 +0100 Subject: [PATCH] Reworking mysterious error message Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/utils/TechHider_14.java | 3 +-- .../src/de/steamwar/fightsystem/utils/TechHider_15.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/FightSystem_14/src/de/steamwar/fightsystem/utils/TechHider_14.java b/FightSystem_14/src/de/steamwar/fightsystem/utils/TechHider_14.java index 46263f9..81c931a 100644 --- a/FightSystem_14/src/de/steamwar/fightsystem/utils/TechHider_14.java +++ b/FightSystem_14/src/de/steamwar/fightsystem/utils/TechHider_14.java @@ -59,8 +59,7 @@ public class TechHider_14 { boolean changed = false; for(int i = nmsTags.size() - 1; i >= 0; i--){ NbtBase nbtBase = nmsTags.get(i); - if(!(nbtBase instanceof NbtCompound)) - throw new SecurityException("Hä?" + nbtBase.getClass().getName()); + assert nbtBase instanceof NbtCompound; NbtCompound nbt = (NbtCompound) nbtBase; if(Config.HiddenBlockEntities.contains(nbt.getString("id"))){ nmsTags.remove(i); diff --git a/FightSystem_15/src/de/steamwar/fightsystem/utils/TechHider_15.java b/FightSystem_15/src/de/steamwar/fightsystem/utils/TechHider_15.java index e249666..3c39021 100644 --- a/FightSystem_15/src/de/steamwar/fightsystem/utils/TechHider_15.java +++ b/FightSystem_15/src/de/steamwar/fightsystem/utils/TechHider_15.java @@ -59,8 +59,7 @@ public class TechHider_15 { boolean changed = false; for(int i = nmsTags.size() - 1; i >= 0; i--){ NbtBase nbtBase = nmsTags.get(i); - if(!(nbtBase instanceof NbtCompound)) - throw new SecurityException("Hä?" + nbtBase.getClass().getName()); + assert nbtBase instanceof NbtCompound; NbtCompound nbt = (NbtCompound) nbtBase; if(Config.HiddenBlockEntities.contains(nbt.getString("id"))){ nmsTags.remove(i);