mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 08:17:44 +01:00
SPIGOT-7489: Add TeleportDuration to Display Entity
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
aa4eedd178
commit
053943414f
@ -53,6 +53,17 @@ public class CraftDisplay extends CraftEntity implements Display {
|
||||
getHandle().setTransformationInterpolationDuration(duration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTeleportDuration() {
|
||||
return this.getHandle().getEntityData().get(net.minecraft.world.entity.Display.DATA_POS_ROT_INTERPOLATION_DURATION_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTeleportDuration(int duration) {
|
||||
Preconditions.checkArgument(duration >= 0 && duration <= 59, "duration (%s) cannot be lower than 0 or higher than 59", duration);
|
||||
this.getHandle().getEntityData().set(net.minecraft.world.entity.Display.DATA_POS_ROT_INTERPOLATION_DURATION_ID, duration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getViewRange() {
|
||||
return getHandle().getViewRange();
|
||||
|
Loading…
Reference in New Issue
Block a user