Record Class ProfileEntityFilter
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.entity.filter.ProfileEntityFilter
- All Implemented Interfaces:
EntityFilter, CustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, EntityFilter>, CustomRegistryValue<net.minecraft.network.RegistryFriendlyByteBuf, EntityFilter>, RefOptimizer<EntityFilter>, WithKey, WithRef<EntityFilter>, Predicate<net.minecraft.world.entity.Entity>
public record ProfileEntityFilter(com.mojang.authlib.GameProfile profile)
extends Record
implements EntityFilter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, EntityFilter> Fields inherited from interface EntityFilter
ADVENTURE_MODE, ALIVE, ANY, CODEC, CREATIVE_MODE, DAMAGEABLE, DATA_TYPE, DEAD, DEAD_OR_DYING, ENEMY, GLOWING, IN_LIQUID, IN_WATER, IN_WATER_OR_RAIN, INVISIBLE, ITEM, LIVING, MOB, NONE, ON_FIRE, ON_RAILS, PLAYER, PREFIX_LIST, PROJECTILE, REGISTRY, SPECTATOR_MODE, SPECTATOR_OR_CREATIVE_MODE, STREAM_CODEC, SURVIVAL_LIKE_MODE, SURVIVAL_MODE, UNDERWATER, VISIBLEFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionProfileEntityFilter(com.mojang.authlib.GameProfile profile) Creates an instance of aProfileEntityFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.world.entity.EntitygetFirst(net.minecraft.world.level.Level level) final inthashCode()Returns a hash code value for this object.com.mojang.authlib.GameProfileprofile()Returns the value of theprofilerecord component.booleantest(net.minecraft.world.entity.Entity entity) final StringtoString()Returns a string representation of this record class.DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, EntityFilter> type()Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface EntityFilter
and, and, getRegistry, isStringLiteral, not, or, orMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
ProfileEntityFilter
public ProfileEntityFilter(com.mojang.authlib.GameProfile profile) Creates an instance of aProfileEntityFilterrecord class.- Parameters:
profile- the value for theprofilerecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, EntityFilter>
-
test
-
getFirst
@Nullable public @Nullable net.minecraft.world.entity.Entity getFirst(net.minecraft.world.level.Level level) - Specified by:
getFirstin interfaceEntityFilter
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
profile
public com.mojang.authlib.GameProfile profile()Returns the value of theprofilerecord component.- Returns:
- the value of the
profilerecord component
-