CaveType class

Пакет: com.hypixel.hytale.server.worldgen.cave

Файл: com/hypixel/hytale/server/worldgen/cave/CaveType.java

Поля (19)

МодификаторыТипИмя
public static final CaveType.FluidLevel EMPTY
final ListPool<CaveType> ENTRY_POOL
private final BlockFluidEntry blockEntry
private final int height
int var1
var1
var1
var1
var1
var1
var1
var1
var1
var1
var1
var1
double var6
var6
var6

Методы (24)

МодификаторыВозвратСигнатура
public FluidLevelpublic FluidLevel(BlockFluidEntry var1, int var2)
private int _hashCodeint _hashCode()
public Int2FlagsCondition getBiomeMaskInt2FlagsCondition getBiomeMask()
public BlockFluidEntry getBlockEntrypublic BlockFluidEntry getBlockEntry()
public BlockMaskCondition getBlockMaskBlockMaskCondition getBlockMask()
public CaveNodeType getEntryNodeCaveNodeType getEntryNode()
public IPointGenerator getEntryPointGeneratorIPointGenerator getEntryPointGenerator()
public int getEnvironmentint getEnvironment()
public CaveType.FluidLevel getFluidLevelCaveType.FluidLevel getFluidLevel()
public int getHeightpublic int getHeight()
public ICoordinateCondition getHeightConditionICoordinateCondition getHeightCondition()
public float getHeightRadiusFactorfloat getHeightRadiusFactor(int var1, double var2, double var4, int var6)
public double getMaximumSizedouble getMaximumSize()
public int getModifiedStartHeightint getModifiedStartHeight(int var1, int var2, int var3, int var4, Random var5)
public String getNameString getName()
public int getStartDepthint getStartDepth(Random var1)
public float getStartPitchfloat getStartPitch(Random var1)
public float getStartYawfloat getStartYaw(Random var1)
if if(this.fixedEntryHeight == null)
if if(this.fixedEntryHeightNoise != null)
public boolean isEntryThresholdboolean isEntryThreshold(int var1, int var2, int var3)
public boolean isHeightThresholdboolean isHeightThreshold(int var1, int var2, int var3, int var4)
public boolean isSubmergeboolean isSubmerge()
public boolean isSurfaceLimitedboolean isSurfaceLimited()

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.worldgen.cave;

class="kw">import com.hypixel.hytale.math.util.MathUtil;
class="kw">import com.hypixel.hytale.procedurallib.condition.ICoordinateCondition;
class="kw">import com.hypixel.hytale.procedurallib.condition.IHeightThresholdInterpreter;
class="kw">import com.hypixel.hytale.procedurallib.logic.point.IPointGenerator;
class="kw">import com.hypixel.hytale.procedurallib.property.NoiseProperty;
class="kw">import com.hypixel.hytale.procedurallib.supplier.IDoubleRange;
class="kw">import com.hypixel.hytale.procedurallib.supplier.IFloatRange;
class="kw">import com.hypixel.hytale.server.worldgen.util.BlockFluidEntry;
class="kw">import com.hypixel.hytale.server.worldgen.util.ListPool;
class="kw">import com.hypixel.hytale.server.worldgen.util.condition.BlockMaskCondition;
class="kw">import com.hypixel.hytale.server.worldgen.util.condition.flag.Int2FlagsCondition;
class="kw">import java.util.Random;
class="kw">import javax.annotation.Nonnull;

class="kw">public class CaveType {
   class="kw">public class="kw">static class="kw">final ListPool<CaveType> ENTRY_POOL = new ListPool<>(10, new CaveType[0]);
   class="kw">protected class="kw">final String name;
   class="kw">protected class="kw">final CaveNodeType entryNodeType;
   class="kw">protected class="kw">final IFloatRange yaw;
   class="kw">protected class="kw">final IFloatRange pitch;
   class="kw">protected class="kw">final IFloatRange depth;
   class="kw">protected class="kw">final IHeightThresholdInterpreter heightFactors;
   class="kw">protected class="kw">final IPointGenerator pointGenerator;
   class="kw">protected class="kw">final Int2FlagsCondition biomeMask;
   class="kw">protected class="kw">final BlockMaskCondition blockMask;
   class="kw">protected class="kw">final ICoordinateCondition mapCondition;
   class="kw">protected class="kw">final ICoordinateCondition heightCondition;
   class="kw">protected class="kw">final IDoubleRange fixedEntryHeight;
   class="kw">protected class="kw">final NoiseProperty fixedEntryHeightNoise;
   class="kw">protected class="kw">final CaveType.FluidLevel fluidLevel;
   class="kw">protected class="kw">final int environment;
   class="kw">protected class="kw">final boolean surfaceLimited;
   class="kw">protected class="kw">final boolean submerge;
   class="kw">protected class="kw">final double maximumSize;
   class="kw">protected class="kw">final int hashCode;

   class="kw">public CaveType(
      String var1,
      CaveNodeType var2,
      IFloatRange var3,
      IFloatRange var4,
      IFloatRange var5,
      IHeightThresholdInterpreter var6,
      IPointGenerator var7,
      Int2FlagsCondition var8,
      BlockMaskCondition var9,
      ICoordinateCondition var10,
      ICoordinateCondition var11,
      IDoubleRange var12,
      NoiseProperty var13,
      CaveType.FluidLevel var14,
      int var15,
      boolean var16,
      boolean var17,
      double var18
   ) {
      this.name = var1;
      this.entryNodeType = var2;
      this.yaw = var3;
      this.pitch = var4;
      this.depth = var5;
      this.heightFactors = var6;
      this.pointGenerator = var7;
      this.biomeMask = var8;
      this.blockMask = var9;
      this.mapCondition = var10;
      this.heightCondition = var11;
      this.fixedEntryHeight = var12;
      this.fixedEntryHeightNoise = var13;
      this.fluidLevel = var14;
      this.environment = var15;
      this.surfaceLimited = var16;
      this.submerge = var17;
      this.maximumSize = var18;
      this.hashCode = this._hashCode();
   }

   class="kw">public String getName() {
      class="kw">return this.name;
   }

   class="kw">public CaveNodeType getEntryNode() {
      class="kw">return this.entryNodeType;
   }

   class="kw">public int getModifiedStartHeight(int var1, int var2, int var3, int var4, Random var5) {
      if (this.fixedEntryHeight == null) {
         class="kw">return var3;
      }

      double var6;
      if (this.fixedEntryHeightNoise != null) {
         var6 = this.fixedEntryHeight.getValue(this.fixedEntryHeightNoise.get(var1, var2, var4));
      } else {
         var6 = this.fixedEntryHeight.getValue(var5);
      }

      class="kw">return MathUtil.floor(var6);
   }

   class="kw">public float getStartPitch(Random var1) {
      class="kw">return this.pitch.getValue(var1);
   }

   class="kw">public float getStartYaw(Random var1) {
      class="kw">return this.yaw.getValue(var1);
   }

   class="kw">public int getStartDepth(Random var1) {
      class="kw">return MathUtil.floor(this.depth.getValue(var1));
   }

   class="kw">public float getHeightRadiusFactor(int var1, double var2, double var4, int var6) {
      class="kw">return this.heightFactors.getThreshold(var1, var2, var4, var6);
   }

   class="kw">public ICoordinateCondition getHeightCondition() {
      class="kw">return this.heightCondition;
   }

   class="kw">public IPointGenerator getEntryPointGenerator() {
      class="kw">return this.pointGenerator;
   }

   class="kw">public Int2FlagsCondition getBiomeMask() {
      class="kw">return this.biomeMask;
   }

   class="kw">public BlockMaskCondition getBlockMask() {
      class="kw">return this.blockMask;
   }

   class="kw">public CaveType.FluidLevel getFluidLevel() {
      class="kw">return this.fluidLevel;
   }

   class="kw">public int getEnvironment() {
      class="kw">return this.environment;
   }

   class="kw">public boolean isSurfaceLimited() {
      class="kw">return this.surfaceLimited;
   }

   class="kw">public boolean isSubmerge() {
      class="kw">return this.submerge;
   }

   class="kw">public boolean isEntryThreshold(int var1, int var2, int var3) {
      class="kw">return this.mapCondition.eval(var1, var2, var3);
   }

   class="kw">public boolean isHeightThreshold(int var1, int var2, int var3, int var4) {
      class="kw">return this.heightCondition.eval(var1, var2, var3, var4);
   }

   class="kw">public double getMaximumSize() {
      class="kw">return this.maximumSize;
   }

   class="kw">private int _hashCode() {
      int var1 = this.name != null ? this.name.hashCode() : 0;
      var1 = 31 * var1 + (this.entryNodeType != null ? this.entryNodeType.hashCode() : 0);
      var1 = 31 * var1 + (this.yaw != null ? this.yaw.hashCode() : 0);
      var1 = 31 * var1 + (this.pitch != null ? this.pitch.hashCode() : 0);
      var1 = 31 * var1 + (this.depth != null ? this.depth.hashCode() : 0);
      var1 = 31 * var1 + (this.heightFactors != null ? this.heightFactors.hashCode() : 0);
      var1 = 31 * var1 + (this.pointGenerator != null ? this.pointGenerator.hashCode() : 0);
      var1 = 31 * var1 + (this.blockMask != null ? this.blockMask.hashCode() : 0);
      var1 = 31 * var1 + (this.mapCondition != null ? this.mapCondition.hashCode() : 0);
      var1 = 31 * var1 + (this.fixedEntryHeight != null ? this.fixedEntryHeight.hashCode() : 0);
      var1 = 31 * var1 + (this.fluidLevel != null ? this.fluidLevel.hashCode() : 0);
      var1 = 31 * var1 + (this.surfaceLimited ? 1 : 0);
      class="kw">return 31 * var1 + (this.submerge ? 1 : 0);
   }

   @Override
   class="kw">public int hashCode() {
      class="kw">return this.hashCode;
   }

   @Nonnull
   @Override
   class="kw">public String toString() {
      class="kw">return "CaveType{name='"
         + this.name
         + "', entryNodeType="
         + this.entryNodeType
         + ", yaw="
         + this.yaw
         + ", pitch="
         + this.pitch
         + ", depth="
         + this.depth
         + ", heightFactors="
         + this.heightFactors
         + ", pointGenerator="
         + this.pointGenerator
         + ", blockMask="
         + this.blockMask
         + ", mapCondition="
         + this.mapCondition
         + ", heightCondition="
         + this.heightCondition
         + ", fixedEntryHeight="
         + this.fixedEntryHeight
         + ", fluidLevel="
         + this.fluidLevel
         + ", environment="
         + this.environment
         + ", surfaceLimited="
         + this.surfaceLimited
         + ", submerge="
         + this.submerge
         + ", maximumSize="
         + this.maximumSize
         + ", hashCode="
         + this.hashCode
         + "}";
   }

   class="kw">public class="kw">static class FluidLevel {
      class="kw">public class="kw">static class="kw">final CaveType.FluidLevel EMPTY = new CaveType.FluidLevel(new BlockFluidEntry(0, 0, 0), -1);
      class="kw">private class="kw">final BlockFluidEntry blockEntry;
      class="kw">private class="kw">final int height;

      class="kw">public FluidLevel(BlockFluidEntry var1, int var2) {
         this.blockEntry = var1;
         this.height = var2;
      }

      class="kw">public BlockFluidEntry getBlockEntry() {
         class="kw">return this.blockEntry;
      }

      class="kw">public int getHeight() {
         class="kw">return this.height;
      }
   }
}