AugmentBlockUpgradeLevel class

Пакет: com.hypixel.hytale.builtin.augmentblocks.config

Файл: com/hypixel/hytale/builtin/augmentblocks/config/AugmentBlockUpgradeLevel.java

Поля (1)

МодификаторыТипИмя
final AugmentBlockUpgradeLevel[] EMPTY_ARRAY

Методы (3)

МодификаторыВозвратСигнатура
public MaterialQuantity[] getCostMaterialQuantity[] getCost()
public String[] getGrantsAugmentTagsString[] getGrantsAugmentTags()
public String[] getRequiredAugmentTagsString[] getRequiredAugmentTags()

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.augmentblocks.config;

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.codecs.array.ArrayCodec;
class="kw">import com.hypixel.hytale.server.core.inventory.MaterialQuantity;
class="kw">import javax.annotation.Nullable;

class="kw">public class AugmentBlockUpgradeLevel {
   class="kw">public class="kw">static class="kw">final AugmentBlockUpgradeLevel[] EMPTY_ARRAY = new AugmentBlockUpgradeLevel[0];
   class="kw">private class="kw">static class="kw">final String[] EMPTY_STRING_ARRAY = new String[0];
   class="kw">public class="kw">static class="kw">final BuilderCodec<AugmentBlockUpgradeLevel> CODEC = BuilderCodec.builder(AugmentBlockUpgradeLevel.class, AugmentBlockUpgradeLevel::new)
      .append(new KeyedCodec<>("State", Codec.STRING), (var0, var1) -> var0.state = var1, var0 -> var0.state)
      .add()
      .append(new KeyedCodec<>("Cost", new ArrayCodec<>(MaterialQuantity.CODEC, MaterialQuantity[]::new)), (var0, var1) -> var0.cost = var1, var0 -> var0.cost)
      .add()
      .append(new KeyedCodec<>("RequiredAugmentTags", Codec.STRING_ARRAY), (var0, var1) -> var0.requiredAugmentTags = var1, var0 -> var0.requiredAugmentTags)
      .add()
      .append(new KeyedCodec<>("GrantsAugmentTags", Codec.STRING_ARRAY), (var0, var1) -> var0.grantsAugmentTags = var1, var0 -> var0.grantsAugmentTags)
      .add()
      .append(new KeyedCodec<>("ReplaceBlock", Codec.STRING), (var0, var1) -> var0.replaceBlock = var1, var0 -> var0.replaceBlock)
      .add()
      .build();
   @Nullable
   class="kw">private String state;
   class="kw">private MaterialQuantity[] cost = MaterialQuantity.EMPTY_ARRAY;
   class="kw">private String[] requiredAugmentTags = EMPTY_STRING_ARRAY;
   class="kw">private String[] grantsAugmentTags = EMPTY_STRING_ARRAY;
   @Nullable
   class="kw">private String replaceBlock;

   class="kw">protected AugmentBlockUpgradeLevel() {
   }

   @Nullable
   class="kw">public String getState() {
      class="kw">return this.state;
   }

   @Nullable
   class="kw">public String getReplaceBlock() {
      class="kw">return this.replaceBlock;
   }

   class="kw">public MaterialQuantity[] getCost() {
      class="kw">return this.cost;
   }

   class="kw">public String[] getRequiredAugmentTags() {
      class="kw">return this.requiredAugmentTags;
   }

   class="kw">public String[] getGrantsAugmentTags() {
      class="kw">return this.grantsAugmentTags;
   }
}