Package net.minecraft.world.entity
Record Class ConversionParams
java.lang.Object
java.lang.Record
net.minecraft.world.entity.ConversionParams
public record ConversionParams(ConversionType type, boolean keepEquipment, boolean preserveCanPickUpLoot, @Nullable PlayerTeam team)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConversionParams.AfterConversion<T extends Mob> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thekeepEquipmentrecord component.private final booleanThe field for thepreserveCanPickUpLootrecord component.private final PlayerTeamThe field for theteamrecord component.private final ConversionTypeThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionConversionParams(ConversionType type, boolean keepEquipment, boolean preserveCanPickUpLoot, PlayerTeam team) Creates an instance of aConversionParamsrecord 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.booleanReturns the value of thekeepEquipmentrecord component.booleanReturns the value of thepreserveCanPickUpLootrecord component.static ConversionParamsteam()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
-
ConversionParams
public ConversionParams(ConversionType type, boolean keepEquipment, boolean preserveCanPickUpLoot, @Nullable PlayerTeam team) Creates an instance of aConversionParamsrecord class.- Parameters:
type- the value for thetyperecord componentkeepEquipment- the value for thekeepEquipmentrecord componentpreserveCanPickUpLoot- the value for thepreserveCanPickUpLootrecord componentteam- the value for theteamrecord component
-
-
Method Details
-
single
public static ConversionParams single(Mob pMob, boolean pKeepEquipment, boolean pPreserveCanPickUpLoot) -
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
-