Constants interface
Пакет: com.hypixel.hytale.server.worldgen.loader.cave.shape
Файл: com/hypixel/hytale/server/worldgen/loader/cave/shape/CylinderCaveNodeShapeGeneratorJsonLoader.java
Поля (4)
| Модификаторы | Тип | Имя |
|---|---|---|
|
String |
KEY_INHERIT_PARENT_RADIUS |
|
String |
KEY_LENGTH |
|
String |
KEY_MIDDLE_RADIUS |
|
String |
KEY_RADIUS |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.worldgen.loader.cave.shape;
class="kw">import com.google.gson.JsonElement;
class="kw">import com.hypixel.hytale.procedurallib.json.DoubleRangeJsonLoader;
class="kw">import com.hypixel.hytale.procedurallib.json.SeedString;
class="kw">import com.hypixel.hytale.procedurallib.supplier.IDoubleRange;
class="kw">import com.hypixel.hytale.server.worldgen.SeedStringResource;
class="kw">import com.hypixel.hytale.server.worldgen.cave.shape.CylinderCaveNodeShape;
class="kw">import java.nio.file.Path;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;
class="kw">public class CylinderCaveNodeShapeGeneratorJsonLoader class="kw">extends CaveNodeShapeGeneratorJsonLoader {
class="kw">public CylinderCaveNodeShapeGeneratorJsonLoader(@Nonnull SeedString<SeedStringResource> var1, Path var2, JsonElement var3) {
super(var1.append(".CylinderCaveNodeShapeGenerator"), var2, var3);
}
@Nonnull
class="kw">public CylinderCaveNodeShape.CylinderCaveNodeShapeGenerator load() {
class="kw">return new CylinderCaveNodeShape.CylinderCaveNodeShapeGenerator(
this.loadRadius(), this.loadMiddleRadius(), this.loadLength(), this.loadInheritParentRadius()
);
}
@Nullable
class="kw">protected IDoubleRange loadRadius() {
class="kw">return new DoubleRangeJsonLoader<>(this.seed, this.dataFolder, this.get("Radius"), 3.0).load();
}
@Nullable
class="kw">protected IDoubleRange loadMiddleRadius() {
IDoubleRange var1 = null;
if (this.has("MiddleRadius")) {
var1 = new DoubleRangeJsonLoader<>(this.seed, this.dataFolder, this.get("MiddleRadius"), 0.0).load();
}
class="kw">return var1;
}
@Nullable
class="kw">protected IDoubleRange loadLength() {
class="kw">return new DoubleRangeJsonLoader<>(this.seed, this.dataFolder, this.get("Length"), 5.0, 15.0).load();
}
class="kw">protected boolean loadInheritParentRadius() {
boolean var1 = true;
if (this.has("InheritParentRadius")) {
var1 = this.get("InheritParentRadius").getAsBoolean();
}
class="kw">return var1;
}
class="kw">public class="kw">interface Constants {
String KEY_RADIUS = "Radius";
String KEY_MIDDLE_RADIUS = "MiddleRadius";
String KEY_LENGTH = "Length";
String KEY_INHERIT_PARENT_RADIUS = "InheritParentRadius";
}
}