ProjectileSource enum
Пакет: com.hypixel.hytale.builtin.triggervolumes.manager
Файл: com/hypixel/hytale/builtin/triggervolumes/manager/ProjectileSource.java
Поля (3)
| Модификаторы | Тип | Имя |
|---|---|---|
|
SHOOTER, |
PROJECTILE |
|
ProjectileComponent |
var3 |
|
Ref |
var4 |
Методы (1)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
|
|
if if(var1 != null && this != PROJECTILE) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.triggervolumes.manager;
class="kw">import com.hypixel.hytale.component.Ref;
class="kw">import com.hypixel.hytale.component.Store;
class="kw">import com.hypixel.hytale.server.core.entity.entities.ProjectileComponent;
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">public enum ProjectileSource {
SHOOTER,
PROJECTILE;
ProjectileSource() {
}
@Nullable
class="kw">public Ref<EntityStore> resolveActorRef(@Nullable Ref<EntityStore> var1, @Nonnull Store<EntityStore> var2) {
if (var1 != null && this != PROJECTILE) {
ProjectileComponent var3 = var2.getComponent(var1, ProjectileComponent.getComponentType());
if (var3 != null && var3.getCreatorUuid() != null) {
Ref var4 = var2.getExternalData().getRefFromUUID(var3.getCreatorUuid());
class="kw">return var4 != null && var4.isValid() ? var4 : var1;
} else {
class="kw">return var1;
}
} else {
class="kw">return var1;
}
}
}