From a17ac45c07c01191be499c1e0774dbec51ab33c9 Mon Sep 17 00:00:00 2001 From: Alexander01998 Date: Wed, 18 Oct 2023 23:18:08 +0200 Subject: [PATCH] Merge MobEspFilterList back into MobEspHack --- .../net/wurstclient/hacks/MobEspHack.java | 25 +++++++++- .../filterlists/MobEspFilterList.java | 48 ------------------- 2 files changed, 23 insertions(+), 50 deletions(-) delete mode 100644 src/main/java/net/wurstclient/settings/filterlists/MobEspFilterList.java diff --git a/src/main/java/net/wurstclient/hacks/MobEspHack.java b/src/main/java/net/wurstclient/hacks/MobEspHack.java index f4fce2472a..d18f657a47 100644 --- a/src/main/java/net/wurstclient/hacks/MobEspHack.java +++ b/src/main/java/net/wurstclient/hacks/MobEspHack.java @@ -39,7 +39,7 @@ import net.wurstclient.settings.EspBoxSizeSetting; import net.wurstclient.settings.EspStyleSetting; import net.wurstclient.settings.filterlists.EntityFilterList; -import net.wurstclient.settings.filterlists.MobEspFilterList; +import net.wurstclient.settings.filters.*; import net.wurstclient.util.EntityUtils; import net.wurstclient.util.RegionPos; import net.wurstclient.util.RenderUtils; @@ -55,7 +55,28 @@ public final class MobEspHack extends Hack implements UpdateListener, "\u00a7lAccurate\u00a7r mode shows the exact hitbox of each mob.\n" + "\u00a7lFancy\u00a7r mode shows slightly larger boxes that look better."); - private final EntityFilterList entityFilters = MobEspFilterList.create(); + private final EntityFilterList entityFilters = + new EntityFilterList(FilterHostileSetting.genericVision(false), + FilterNeutralSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterPassiveSetting.genericVision(false), + FilterPassiveWaterSetting.genericVision(false), + FilterBatsSetting.genericVision(false), + FilterSlimesSetting.genericVision(false), + FilterPetsSetting.genericVision(false), + FilterVillagersSetting.genericVision(false), + FilterZombieVillagersSetting.genericVision(false), + FilterGolemsSetting.genericVision(false), + FilterPiglinsSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterZombiePiglinsSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterEndermenSetting + .genericVision(AttackDetectingEntityFilter.Mode.OFF), + FilterShulkersSetting.genericVision(false), + FilterAllaysSetting.genericVision(false), + FilterInvisibleSetting.genericVision(false), + FilterArmorStandsSetting.genericVision(true)); private final ArrayList mobs = new ArrayList<>(); private VertexBuffer mobBox; diff --git a/src/main/java/net/wurstclient/settings/filterlists/MobEspFilterList.java b/src/main/java/net/wurstclient/settings/filterlists/MobEspFilterList.java deleted file mode 100644 index d04864da96..0000000000 --- a/src/main/java/net/wurstclient/settings/filterlists/MobEspFilterList.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2014-2023 Wurst-Imperium and contributors. - * - * This source code is subject to the terms of the GNU General Public - * License, version 3. If a copy of the GPL was not distributed with this - * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt - */ -package net.wurstclient.settings.filterlists; - -import java.util.ArrayList; -import java.util.List; - -import net.wurstclient.settings.filters.*; - -public final class MobEspFilterList extends EntityFilterList -{ - private MobEspFilterList(List filters) - { - super(filters); - } - - public static MobEspFilterList create() - { - ArrayList builder = new ArrayList<>(); - builder.add(FilterHostileSetting.genericVision(false)); - builder.add(FilterNeutralSetting - .genericVision(AttackDetectingEntityFilter.Mode.OFF)); - builder.add(FilterPassiveSetting.genericVision(false)); - builder.add(FilterPassiveWaterSetting.genericVision(false)); - builder.add(FilterBatsSetting.genericVision(false)); - builder.add(FilterSlimesSetting.genericVision(false)); - builder.add(FilterPetsSetting.genericVision(false)); - builder.add(FilterVillagersSetting.genericVision(false)); - builder.add(FilterZombieVillagersSetting.genericVision(false)); - builder.add(FilterGolemsSetting.genericVision(false)); - builder.add(FilterPiglinsSetting - .genericVision(AttackDetectingEntityFilter.Mode.OFF)); - builder.add(FilterZombiePiglinsSetting - .genericVision(AttackDetectingEntityFilter.Mode.OFF)); - builder.add(FilterEndermenSetting - .genericVision(AttackDetectingEntityFilter.Mode.OFF)); - builder.add(FilterShulkersSetting.genericVision(false)); - builder.add(FilterAllaysSetting.genericVision(false)); - builder.add(FilterInvisibleSetting.genericVision(false)); - builder.add(FilterArmorStandsSetting.genericVision(true)); - return new MobEspFilterList(builder); - } -}