Package net.minecraft.entity.conversion
Record Class EntityConversionContext
java.lang.Object
java.lang.Record
net.minecraft.entity.conversion.EntityConversionContext
- Record Components:
type-keepEquipment-preserveCanPickUpLoot-team-
public record EntityConversionContext(EntityConversionType type, boolean keepEquipment, boolean preserveCanPickUpLoot, @Nullable Team team)
extends Record
- Mappings:
Namespace Name named net/minecraft/entity/conversion/EntityConversionContextintermediary net/minecraft/class_10179official bwynamed typeintermediary comp_3144official anamed keepEquipmentintermediary comp_3145official bnamed preserveCanPickUpLootintermediary comp_3146official cnamed teamintermediary comp_3147official d
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceEntityConversionContext.Finalizer<T extends MobEntity> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thekeepEquipmentrecord component.private final booleanThe field for thepreserveCanPickUpLootrecord component.The field for theteamrecord component.private final EntityConversionTypeThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntityConversionContext(EntityConversionType entityConversionType, boolean bool, boolean bool2, @Nullable Team team) -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityConversionContextfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thekeepEquipmentrecord component.booleanReturns the value of thepreserveCanPickUpLootrecord component.team()Returns the value of theteamrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
keepEquipment
private final boolean keepEquipmentThe field for thekeepEquipmentrecord component. -
preserveCanPickUpLoot
private final boolean preserveCanPickUpLootThe field for thepreserveCanPickUpLootrecord component. -
team
The field for theteamrecord component.
-
-
Constructor Details
-
EntityConversionContext
public EntityConversionContext(EntityConversionType entityConversionType, boolean bool, boolean bool2, @Nullable @Nullable Team team)
-
-
Method Details
-
create
public static EntityConversionContext create(MobEntity entity, boolean keepEquipment, boolean preserveCanPickUpLoot) - Mappings:
Namespace Name Mixin selector named createLnet/minecraft/entity/conversion/EntityConversionContext;create(Lnet/minecraft/entity/mob/MobEntity;ZZ)Lnet/minecraft/entity/conversion/EntityConversionContext;intermediary method_63607Lnet/minecraft/class_10179;method_63607(Lnet/minecraft/class_1308;ZZ)Lnet/minecraft/class_10179;official aLbwy;a(Lbyh;ZZ)Lbwy;
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
keepEquipment
public boolean keepEquipment()Returns the value of thekeepEquipmentrecord component.- Returns:
- the value of the
keepEquipmentrecord component
-
preserveCanPickUpLoot
public boolean preserveCanPickUpLoot()Returns the value of thepreserveCanPickUpLootrecord component.- Returns:
- the value of the
preserveCanPickUpLootrecord component
-
team
Returns the value of theteamrecord component.- Returns:
- the value of the
teamrecord component
-