PersistentDynamicLight class
Пакет: com.hypixel.hytale.server.core.modules.entity.component
Файл: com/hypixel/hytale/server/core/modules/entity/component/PersistentDynamicLight.java
implements: Component<EntityStore>
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
final |
BuilderCodec<PersistentDynamicLight> |
CODEC |
Методы (3)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
public |
ColorLight |
getColorLightColorLight getColorLight() |
static |
ComponentType<EntityStore, PersistentDynamicLight> |
getComponentTypeComponentType<EntityStore, PersistentDynamicLight> getComponentType() |
public |
void |
setColorLightvoid setColorLight(ColorLight var1) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules.entity.component;
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.protocol.ColorLight;
class="kw">import com.hypixel.hytale.server.core.codec.ProtocolCodecs;
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 PersistentDynamicLight class="kw">implements Component<EntityStore> {
class="kw">public class="kw">static class="kw">final BuilderCodec<PersistentDynamicLight> CODEC = BuilderCodec.<PersistentDynamicLight>builder(
PersistentDynamicLight.class, PersistentDynamicLight::new
)
.addField(new KeyedCodec<>("Light", ProtocolCodecs.COLOR_LIGHT), (var0, var1) -> var0.colorLight = var1, var0 -> var0.colorLight)
.build();
class="kw">private ColorLight colorLight;
class="kw">public class="kw">static ComponentType<EntityStore, PersistentDynamicLight> getComponentType() {
class="kw">return EntityModule.get().getPersistentDynamicLightComponentType();
}
class="kw">private PersistentDynamicLight() {
}
class="kw">public PersistentDynamicLight(ColorLight var1) {
this.colorLight = var1;
}
class="kw">public ColorLight getColorLight() {
class="kw">return this.colorLight;
}
class="kw">public void setColorLight(ColorLight var1) {
this.colorLight = var1;
}
@Nonnull
@Override
class="kw">public Component<EntityStore> clone() {
class="kw">return new PersistentDynamicLight(new ColorLight(this.colorLight));
}
}