-
-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bff41b4
commit dd847ee
Showing
11 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/net/wurstclient/settings/filters/FilterSlimesSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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.filters; | ||
|
||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.mob.MagmaCubeEntity; | ||
import net.minecraft.entity.mob.SlimeEntity; | ||
|
||
public final class FilterSlimesSetting extends EntityFilterCheckbox | ||
{ | ||
private static final String EXCEPTIONS_TEXT = | ||
"\n\nThis filter does not affect magma cubes."; | ||
|
||
public FilterSlimesSetting(String description, boolean checked) | ||
{ | ||
super("Filter slimes", description + EXCEPTIONS_TEXT, checked); | ||
} | ||
|
||
@Override | ||
public boolean test(Entity e) | ||
{ | ||
return !(e instanceof SlimeEntity) || e instanceof MagmaCubeEntity; | ||
} | ||
|
||
public static FilterSlimesSetting genericCombat(boolean checked) | ||
{ | ||
return new FilterSlimesSetting("Won't attack slimes.", checked); | ||
} | ||
|
||
public static FilterSlimesSetting genericVision(boolean checked) | ||
{ | ||
return new FilterSlimesSetting("Won't show slimes.", checked); | ||
} | ||
} |