MotionContextSupport class
Пакет: com.hypixel.hytale.server.npc.role.support
Файл: com/hypixel/hytale/server/npc/role/support/MotionContextSupport.java
implements: Component<EntityStore>
Методы (7)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
public |
void |
clearNextBodyMotionStepvoid clearNextBodyMotionStep() |
public |
void |
clearNextHeadMotionStepvoid clearNextHeadMotionStep() |
|
|
if if(this.nextBodyMotionStep != null) |
|
|
if if(this.nextHeadMotionStep != null) |
public |
void |
setActiveMotionControllervoid setActiveMotionController(@Nullable MotionController var1) |
public |
boolean |
setNextBodyMotionStepboolean setNextBodyMotionStep(@Nonnull Instruction var1) |
public |
boolean |
setNextHeadMotionStepboolean setNextHeadMotionStep(@Nonnull Instruction var1) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.npc.role.support;
class="kw">import com.hypixel.hytale.component.Component;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import com.hypixel.hytale.server.npc.NPCPlugin;
class="kw">import com.hypixel.hytale.server.npc.instructions.Instruction;
class="kw">import com.hypixel.hytale.server.npc.movement.controllers.MotionController;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;
class="kw">public class MotionContextSupport class="kw">implements Component<EntityStore> {
@Nullable
class="kw">private MotionController activeMotionController;
@Nullable
class="kw">private Instruction nextBodyMotionStep;
@Nullable
class="kw">private Instruction nextHeadMotionStep;
@Nonnull
class="kw">public class="kw">static ComponentType<EntityStore, MotionContextSupport> getComponentType() {
class="kw">return NPCPlugin.get().getMotionContextSupportComponentType();
}
class="kw">public MotionContextSupport() {
}
class="kw">public void setActiveMotionController(@Nullable MotionController var1) {
this.activeMotionController = var1;
}
@Nullable
class="kw">public MotionController getActiveMotionController() {
class="kw">return this.activeMotionController;
}
@Nullable
class="kw">public Instruction getNextBodyMotionStep() {
class="kw">return this.nextBodyMotionStep;
}
class="kw">public boolean setNextBodyMotionStep(@Nonnull Instruction var1) {
if (this.nextBodyMotionStep != null) {
class="kw">return false;
}
this.nextBodyMotionStep = var1;
class="kw">return true;
}
class="kw">public void clearNextBodyMotionStep() {
this.nextBodyMotionStep = null;
}
@Nullable
class="kw">public Instruction getNextHeadMotionStep() {
class="kw">return this.nextHeadMotionStep;
}
class="kw">public boolean setNextHeadMotionStep(@Nonnull Instruction var1) {
if (this.nextHeadMotionStep != null) {
class="kw">return false;
}
this.nextHeadMotionStep = var1;
class="kw">return true;
}
class="kw">public void clearNextHeadMotionStep() {
this.nextHeadMotionStep = null;
}
@Override
class="kw">public Component<EntityStore> clone() {
class="kw">return this;
}
}