FromPrefabInstance class
Пакет: com.hypixel.hytale.server.core.modules.entity.component
Файл: com/hypixel/hytale/server/core/modules/entity/component/FromPrefabInstance.java
implements: Component<EntityStore>
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
final |
BuilderCodec<FromPrefabInstance> |
CODEC |
Методы (2)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
static |
ComponentType<EntityStore, FromPrefabInstance> |
getComponentTypeComponentType<EntityStore, FromPrefabInstance> getComponentType() |
public |
int |
getPrefabInstanceIdint getPrefabInstanceId() |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules.entity.component;
class="kw">import com.hypixel.hytale.codec.Codec;
class="kw">import com.hypixel.hytale.codec.KeyedCodec;
class="kw">import com.hypixel.hytale.codec.builder.BuilderCodec;
class="kw">import com.hypixel.hytale.component.Component;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.server.core.modules.entity.EntityModule;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;
class="kw">public class FromPrefabInstance class="kw">implements Component<EntityStore> {
class="kw">public class="kw">static class="kw">final BuilderCodec<FromPrefabInstance> CODEC = BuilderCodec.builder(FromPrefabInstance.class, FromPrefabInstance::new)
.append(new KeyedCodec<>("PrefabInstanceId", Codec.INTEGER), (var0, var1) -> var0.prefabInstanceId = var1, var0 -> var0.prefabInstanceId)
.add()
.build();
class="kw">private int prefabInstanceId;
class="kw">public class="kw">static ComponentType<EntityStore, FromPrefabInstance> getComponentType() {
class="kw">return EntityModule.get().getFromPrefabInstanceComponentType();
}
class="kw">private FromPrefabInstance() {
}
class="kw">public FromPrefabInstance(int var1) {
this.prefabInstanceId = var1;
}
class="kw">public int getPrefabInstanceId() {
class="kw">return this.prefabInstanceId;
}
@Nonnull
@Override
class="kw">public Component<EntityStore> clone() {
class="kw">return new FromPrefabInstance(this.prefabInstanceId);
}
}