Interface AttachmentSyncPredicate
- All Superinterfaces:
BiPredicate<AttachmentTarget,
ServerPlayerEntity>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@NonExtendable
@FunctionalInterface
public interface AttachmentSyncPredicate
extends BiPredicate<AttachmentTarget,ServerPlayerEntity>
A predicate that determines, for a specific attachment type, whether the data should be synchronized with a
player's client, given the player's
ServerPlayerEntity
and the AttachmentTarget the data is linked to.
The class extends BiPredicate
to allow for custom predicates, outside the ones provided by methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttachmentSyncPredicate
all()
static AttachmentSyncPredicate
static AttachmentSyncPredicate
Methods inherited from interface java.util.function.BiPredicate
and, negate, or, test
-
Method Details
-
all
- Returns:
- a predicate that syncs an attachment with all clients
-
targetOnly
- Returns:
- a predicate that syncs an attachment only with the target it is attached to, when that is a player. If the target isn't a player, the attachment will be synced with no clients.
-
allButTarget
- Returns:
- a predicate that syncs an attachment with every client except the target it is attached to, when that is a player. When the target isn't a player, the attachment will be synced with all clients.
-