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 interface
ConversionParams.AfterConversion<T extends Mob>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
The field for thekeepEquipment
record component.private final boolean
The field for thepreserveCanPickUpLoot
record component.private final PlayerTeam
The field for theteam
record component.private final ConversionType
The field for thetype
record component. -
Constructor Summary
ConstructorsConstructorDescriptionConversionParams
(ConversionType type, boolean keepEquipment, boolean preserveCanPickUpLoot, PlayerTeam team) Creates an instance of aConversionParams
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of thekeepEquipment
record component.boolean
Returns the value of thepreserveCanPickUpLoot
record component.static ConversionParams
team()
Returns the value of theteam
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Field Details
-
type
The field for thetype
record component. -
keepEquipment
private final boolean keepEquipmentThe field for thekeepEquipment
record component. -
preserveCanPickUpLoot
private final boolean preserveCanPickUpLootThe field for thepreserveCanPickUpLoot
record component. -
team
The field for theteam
record component.
-
-
Constructor Details
-
ConversionParams
public ConversionParams(ConversionType type, boolean keepEquipment, boolean preserveCanPickUpLoot, @Nullable PlayerTeam team) Creates an instance of aConversionParams
record class.- Parameters:
type
- the value for thetype
record componentkeepEquipment
- the value for thekeepEquipment
record componentpreserveCanPickUpLoot
- the value for thepreserveCanPickUpLoot
record componentteam
- the value for theteam
record component
-
-
Method Details
-
single
-
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 thetype
record component.- Returns:
- the value of the
type
record component
-
keepEquipment
public boolean keepEquipment()Returns the value of thekeepEquipment
record component.- Returns:
- the value of the
keepEquipment
record component
-
preserveCanPickUpLoot
public boolean preserveCanPickUpLoot()Returns the value of thepreserveCanPickUpLoot
record component.- Returns:
- the value of the
preserveCanPickUpLoot
record component
-
team
Returns the value of theteam
record component.- Returns:
- the value of the
team
record component
-