Package net.minecraft.predicate.entity
Record Class SlimePredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.SlimePredicate
- Record Components:
size-
- All Implemented Interfaces:
TypeSpecificPredicate
public record SlimePredicate(NumberRange.IntRange size)
extends Record
implements TypeSpecificPredicate
- Mappings:
Namespace Name official cxintermediary net/minecraft/class_7383named net/minecraft/predicate/entity/SlimePredicateofficial cintermediary comp_1829named size
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.predicate.entity.TypeSpecificPredicate
TypeSpecificPredicate.Deserializers, TypeSpecificPredicate.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SlimePredicate>private final NumberRange.IntRangeThe field for thesizerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aSlimePredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SlimePredicateof(NumberRange.IntRange size) size()Returns the value of thesizerecord component.booleantest(Entity entity, ServerWorld world, @Nullable Vec3d pos) final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
size
The field for thesizerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official bLcx;b:Lcom/mojang/serialization/MapCodec;intermediary field_45776Lnet/minecraft/class_7383;field_45776:Lcom/mojang/serialization/MapCodec;named CODECLnet/minecraft/predicate/entity/SlimePredicate;CODEC:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
SlimePredicate
Creates an instance of aSlimePredicaterecord class.- Parameters:
size- the value for thesizerecord component
-
-
Method Details
-
of
- Mappings:
Namespace Name Mixin selector official aLcx;a(Lck$d;)Lcx;intermediary method_43157Lnet/minecraft/class_7383;method_43157(Lnet/minecraft/class_2096$class_2100;)Lnet/minecraft/class_7383;named ofLnet/minecraft/predicate/entity/SlimePredicate;of(Lnet/minecraft/predicate/NumberRange$IntRange;)Lnet/minecraft/predicate/entity/SlimePredicate;
-
test
- Specified by:
testin interfaceTypeSpecificPredicate- Mappings:
Namespace Name Mixin selector official aLbq;a(Lblv;Land;Lelt;)Zintermediary method_22497Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Znamed testLnet/minecraft/predicate/entity/TypeSpecificPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Z
-
type
- Specified by:
typein interfaceTypeSpecificPredicate- Mappings:
Namespace Name Mixin selector official aLbq;a()Lbq$a;intermediary comp_1776Lnet/minecraft/class_7376;comp_1776()Lnet/minecraft/class_7376$class_8745;named typeLnet/minecraft/predicate/entity/TypeSpecificPredicate;type()Lnet/minecraft/predicate/entity/TypeSpecificPredicate$Type;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-