Package org.geysermc.geyser.entity
Class EntityTypeBase.Builder<T extends Entity>
java.lang.Object
org.geysermc.geyser.entity.EntityTypeBase.Builder<T>
- Direct Known Subclasses:
EntityTypeDefinition.Builder
- Enclosing class:
EntityTypeBase<T extends Entity>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected floatprotected final List<EntityMetadataTranslator<? super T, ?, ?>> protected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTranslator(EntityMetadataTranslator<T, ?, ?> translator) <U,EM extends org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<U, ? extends org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType<U>>>
EntityTypeBase.Builder<T> addTranslator(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType<U> type, BiConsumer<T, EM> translateFunction) build()height(float height) heightAndWidth(float value) Sets the height and width as one valueoffset(float offset) width(float width)
-
Field Details
-
width
protected float width -
height
protected float height -
offset
protected float offset -
translators
-
-
Constructor Details
-
Builder
protected Builder() -
Builder
-
Builder
protected Builder(float width, float height, float offset, List<EntityMetadataTranslator<? super T, ?, ?>> translators)
-
-
Method Details
-
heightAndWidth
Sets the height and width as one value -
offset
-
addTranslator
public <U,EM extends org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<U, EntityTypeBase.Builder<T> addTranslator? extends org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType<U>>> (org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType<U> type, BiConsumer<T, EM> translateFunction) -
addTranslator
-
build
-
width
- Returns:
this.
-
height
- Returns:
this.
-