DeployableProjectileComponent class
Пакет: com.hypixel.hytale.builtin.deployables.component
Файл: com/hypixel/hytale/builtin/deployables/component/DeployableProjectileComponent.java
implements: Component<EntityStore>
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
|
Ref |
var1 |
Методы (4)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
abstract |
return new |
Vector3dreturn new Vector3d(this.previousTickPosition) |
static |
ComponentType<EntityStore, DeployableProjectileComponent> |
getComponentTypeComponentType<EntityStore, DeployableProjectileComponent> getComponentType() |
public |
void |
setHitEntityRefvoid setHitEntityRef(@Nonnull Ref<EntityStore> var1) |
public |
void |
setPreviousTickPositionvoid setPreviousTickPosition(@Nonnull Vector3d var1) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.deployables.component;
class="kw">import com.hypixel.hytale.builtin.deployables.DeployablesPlugin;
class="kw">import com.hypixel.hytale.component.Component;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.component.Ref;
class="kw">import com.hypixel.hytale.math.vector.Vector3dUtil;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;
class="kw">import org.joml.Vector3d;
class="kw">public class DeployableProjectileComponent class="kw">implements Component<EntityStore> {
@Nonnull
class="kw">protected Vector3d previousTickPosition;
@Nullable
class="kw">private Ref<EntityStore> hitEntityRef;
class="kw">public DeployableProjectileComponent() {
this(new Vector3d(Vector3dUtil.ZERO));
}
class="kw">public DeployableProjectileComponent(@Nonnull Vector3d var1) {
this.previousTickPosition = var1;
}
class="kw">public class="kw">static ComponentType<EntityStore, DeployableProjectileComponent> getComponentType() {
class="kw">return DeployablesPlugin.get().getDeployableProjectileComponentType();
}
@Override
class="kw">public Component<EntityStore> clone() {
class="kw">return new DeployableProjectileComponent(new Vector3d(this.previousTickPosition));
}
@Nonnull
class="kw">public Vector3d getPreviousTickPosition() {
class="kw">return new Vector3d(this.previousTickPosition);
}
class="kw">public void setPreviousTickPosition(@Nonnull Vector3d var1) {
this.previousTickPosition = new Vector3d(var1);
}
class="kw">public void setHitEntityRef(@Nonnull Ref<EntityStore> var1) {
this.hitEntityRef = var1;
}
@Nullable
class="kw">public Ref<EntityStore> takeHitEntityRef() {
Ref var1 = this.hitEntityRef;
this.hitEntityRef = null;
class="kw">return var1;
}
}