Interface MobVisibility
@NonExtendable
public interface MobVisibility
Represents the visibility provided by an item with the appropriate
DataComponentTypes.EQUIPPABLE component,
modifying the range at which mobs are able to detect an entity.- Since:
- 26.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic MobVisibilitymobVisibility(RegistryKeySet<EntityType> targetingEntityTypes, @Range(from=0L,to=10L) float visibility) Gets the set of entity types that this item modifies the visibility for.@Range(from=0L,to=10L) floatGets the visibility provided by this item, modifying the range at which mobs are able to detect an entity.
-
Method Details
-
mobVisibility
@Contract(value="_, _ -> new", pure=true) static MobVisibility mobVisibility(RegistryKeySet<EntityType> targetingEntityTypes, @Range(from=0L,to=10L) float visibility) - Since:
- 26.3
-
targetingEntityTypes
Gets the set of entity types that this item modifies the visibility for.- Returns:
- the set of entity types
- Since:
- 26.3
-
visibility
@Contract(pure=true) @Range(from=0L,to=10L) float visibility()Gets the visibility provided by this item, modifying the range at which mobs are able to detect an entity.- Returns:
- the visibility
- Since:
- 26.3
-