diff --git a/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java index b37ef49117..98d2bfe192 100644 --- a/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java +++ b/src/main/java/net/wurstclient/settings/filters/FilterBabiesSetting.java @@ -9,18 +9,30 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.passive.PassiveEntity; +import net.minecraft.entity.passive.TadpoleEntity; public final class FilterBabiesSetting extends EntityFilterCheckbox { + private static final String EXCEPTIONS_TEXT = "\n\nThis filter does not" + + " affect baby zombies and other hostile baby mobs."; + public FilterBabiesSetting(String description, boolean checked) { - super("Filter babies", description, checked); + super("Filter babies", description + EXCEPTIONS_TEXT, checked); } @Override public boolean test(Entity e) { - return !(e instanceof PassiveEntity && ((PassiveEntity)e).isBaby()); + // filter out passive entity babies + if(e instanceof PassiveEntity pe && pe.isBaby()) + return false; + + // filter out tadpoles + if(e instanceof TadpoleEntity) + return false; + + return true; } public static FilterBabiesSetting genericCombat(boolean checked)