Record Class EntityMetadataTranslator<E extends Entity,T,EM extends com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<T,? extends com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType<T>>>
java.lang.Object
java.lang.Record
org.geysermc.geyser.translator.entity.EntityMetadataTranslator<E,T,EM>
public record EntityMetadataTranslator<E extends Entity,T,EM extends com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<T,? extends com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType<T>>>(com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType<T> acceptedType, BiConsumer<E extends Entity,EM extends com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<T,? extends com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType<T>>> translateFunction)
extends Record
Translates a given Java 
EntityMetadata into a similar/same construct for Bedrock- 
Constructor SummaryConstructorsConstructorDescriptionEntityMetadataTranslator(com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType<T> acceptedType, BiConsumer<E,EM> translateFunction)Creates an instance of aEntityMetadataTranslatorrecord class.
- 
Method SummaryModifier and TypeMethodDescriptioncom.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType<T>Returns the value of theacceptedTyperecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.voidBiConsumer<E,EM>Returns the value of thetranslateFunctionrecord component.
- 
Constructor Details- 
EntityMetadataTranslatorpublic EntityMetadataTranslator(com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType<T> acceptedType, BiConsumer<E,EM> translateFunction)Creates an instance of aEntityMetadataTranslatorrecord class.- Parameters:
- acceptedType- the value for the- acceptedTyperecord component
- translateFunction- the value for the- translateFunctionrecord component
 
 
- 
- 
Method Details- 
translate
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
acceptedTypeReturns the value of theacceptedTyperecord component.- Returns:
- the value of the acceptedTyperecord component
 
- 
translateFunctionReturns the value of thetranslateFunctionrecord component.- Returns:
- the value of the translateFunctionrecord component
 
 
-