Skip to content

Commit

Permalink
Add Keys.TELEPORT_DURATION for DisplayEntity
Browse files Browse the repository at this point in the history
Closes #2508
  • Loading branch information
DrZoddiak authored and Faithcaio committed Jun 28, 2024
1 parent eea04ca commit fcfb921
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/spongepowered/api/data/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -3113,6 +3113,11 @@ public final class Keys {
*/
public static final Key<Value<Vector3i>> TARGET_POSITION = Keys.key(ResourceKey.sponge("target_position"), Vector3i.class);

/**
* The teleport duration of a {@link DisplayEntity}
*/
public static final Key<Value<Ticks>> TELEPORT_DURATION = Keys.key(ResourceKey.sponge("teleport_duration"), Ticks.class);

/**
* The {@link TemperatureModifier} of a {@link Biome}.
* Readonly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ default Ticks interpolationDelay() {
return this.require(Keys.INTERPOLATION_DELAY);
}

/**
* Returns the duration of the teleportation
*
* @return the duration of the teleportation
*/
default Ticks teleportDuration() {
return this.require(Keys.TELEPORT_DURATION);
}

default BillboardType billboardType() {
return this.require(Keys.BILLBOARD_TYPE);
}
Expand Down

0 comments on commit fcfb921

Please sign in to comment.