PersistentGameModeType class

Пакет: com.hypixel.hytale.server.core.modules.entity.component

Файл: com/hypixel/hytale/server/core/modules/entity/component/PersistentGameModeType.java

implements: Component<EntityStore>

Поля (1)

МодификаторыТипИмя
final BuilderCodec<PersistentGameModeType> CODEC

Методы (1)

МодификаторыВозвратСигнатура
static ComponentType<EntityStore, PersistentGameModeType> getComponentTypeComponentType<EntityStore, PersistentGameModeType> getComponentType()

Исходный код

Показать/скрыть
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.codec.validation.Validators;
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 PersistentGameModeType class="kw">implements Component<EntityStore> {
   class="kw">public class="kw">static class="kw">final BuilderCodec<PersistentGameModeType> CODEC = BuilderCodec.builder(PersistentGameModeType.class, PersistentGameModeType::new)
      .append(new KeyedCodec<>("GameModeTypeId", Codec.STRING), (var0, var1) -> var0.gameModeTypeId = var1, var0 -> var0.gameModeTypeId)
      .addValidator(Validators.nonNull())
      .add()
      .build();
   @Nonnull
   class="kw">private String gameModeTypeId = "";

   class="kw">public class="kw">static ComponentType<EntityStore, PersistentGameModeType> getComponentType() {
      class="kw">return EntityModule.get().getPersistentGameModeTypeComponentType();
   }

   class="kw">private PersistentGameModeType() {
   }

   class="kw">public PersistentGameModeType(@Nonnull String var1) {
      this.gameModeTypeId = var1;
   }

   @Nonnull
   class="kw">public String getGameModeTypeId() {
      class="kw">return this.gameModeTypeId;
   }

   @Nonnull
   @Override
   class="kw">public Component<EntityStore> clone() {
      class="kw">return new PersistentGameModeType(this.gameModeTypeId);
   }
}