DistortedCaveNodeShape

public class DistortedCaveNodeShape implements CaveNodeShape

Class DistortedCaveNodeShape. Provides distortedcavenodeshape functionality for the Hytale server.

java.lang.Object > DistortedCaveNodeShape

Field Summary

t

final double t

Field t.

centerY

final double centerY

Field centerY.

shapeHeight

final double shapeHeight

Field shapeHeight.

minY

final int minY

Field minY.

floor

final int floor

Field floor.

maxY

final int maxY

Field maxY.

ceiling

final int ceiling

Field ceiling.

chunk

final GeneratedBlockChunk chunk

Field chunk.

caveType

final CaveType caveType

Field caveType.

caveNodeType

final CaveNodeType caveNodeType

Field caveNodeType.

shapeBounds

final IWorldBounds shapeBounds

Field shapeBounds.

surfaceLimited

final boolean surfaceLimited

Field surfaceLimited.

environment

final int environment

Field environment.

chunkLowX

final int chunkLowX

Field chunkLowX.

chunkLowZ

final int chunkLowZ

Field chunkLowZ.

chunkHighX

final int chunkHighX

Field chunkHighX.

chunkHighZ

final int chunkHighZ

Field chunkHighZ.

minX

final int minX

Field minX.

minZ

final int minZ

Field minZ.

maxX

final int maxX

Field maxX.

maxZ

final int maxZ

Field maxZ.

cx

final int cx

Field cx.

cz

final int cz

Field cz.

chunkHeight

final int chunkHeight

Field chunkHeight.

floorY

final int floorY

Field floorY.

ceilingY

final int ceilingY

Field ceilingY.

current

final int current

Field current.

currentFluid

final int currentFluid

Field currentFluid.

isCandidateBlock

final boolean isCandidateBlock

Field isCandidateBlock.

blockEntry

final BlockFluidEntry blockEntry

Field blockEntry.

covers2

final CaveNodeType.CaveNodeCoverEntry[] covers2

Field covers2.

covers

final CaveNodeType.CaveNodeCoverEntry[] covers

Field covers.

entry

final CaveNodeType.CaveNodeCoverEntry.Entry entry

Field entry.

y2

final int y2

Field y2.

blockEntry2

final BlockFluidEntry blockEntry2

Field blockEntry2.

length

final double length

Field length.

origin

final Vector3d origin

Field origin.

direction

final Vector3d direction

Field direction.

startWidth

final double startWidth

Field startWidth.

startHeight

final double startHeight

Field startHeight.

endWidth

final double endWidth

Field endWidth.

endHeight

final double endHeight

Field endHeight.

midWidth

final double midWidth

Field midWidth.

midHeight

final double midHeight

Field midHeight.

shape

final DistortedShape shape

Field shape.

offset

final Vector3d offset

Field offset.

Method Detail

DistortedCaveNodeShape

public public DistortedCaveNodeShape (final CaveType caveType, final DistortedShape shape, final ShapeDistortion distortion)

Method DistortedCaveNodeShape.

Parameters:
final CaveType caveType
final DistortedShape shape
final ShapeDistortion distortion

getShape

public DistortedShape getShape ()

Method getShape.

getStart

public Vector3d getStart ()

Method getStart.

getEnd

public Vector3d getEnd ()

Method getEnd.

getAnchor

public Vector3d getAnchor (final Vector3d vector, final double tx, final double ty, final double tz)

Method getAnchor.

Parameters:
final Vector3d vector
final double tx
final double ty
final double tz

getBounds

public IWorldBounds getBounds ()

Method getBounds.

hasGeometry

public boolean hasGeometry ()

Method hasGeometry.

shouldReplace

public boolean shouldReplace (final int seed, final double x, final double z, final int y)

Method shouldReplace.

Parameters:
final int seed
final double x
final double z
final int y

getFloorPosition

public double getFloorPosition (final int seed, final double x, final double z)

Method getFloorPosition.

Parameters:
final int seed
final double x
final double z

getCeilingPosition

public double getCeilingPosition (final int seed, final double x, final double z)

Method getCeilingPosition.

Parameters:
final int seed
final double x
final double z

populateChunk

public void populateChunk (final int seed, @Nonnull final ChunkGeneratorExecution execution, @Nonnull final Cave cave, @Nonnull final CaveNode node, @Nonnull final Random random)

Method populateChunk.

Parameters:
final int seed
@Nonnull final ChunkGeneratorExecution execution
@Nonnull final Cave cave
@Nonnull final CaveNode node
@Nonnull final Random random

getFloor

private int getFloor (final int seed, final double x, final double z, final double centerY, double height, final int minY)

Method getFloor.

Parameters:
final int seed
final double x
final double z
final double centerY
double height
final int minY

getCeiling

private int getCeiling (final int seed, final double x, final double z, final double centerY, double height, final int maxY)

Method getCeiling.

Parameters:
final int seed
final double x
final double z
final double centerY
double height
final int maxY

DistortedCaveNodeShapeGenerator

public public DistortedCaveNodeShapeGenerator (final DistortedShape.Factory shapeFactory, final IDoubleRange widthRange, final IDoubleRange heightRange, @Nullable final IDoubleRange midWidthRange, @Nullable final IDoubleRange midHeightRange, @Nullable final IDoubleRange lengthRange, final boolean inheritParentRadius, final ShapeDistortion distortion, @Nullable final GeneralNoise.InterpolationFunction interpolation)

Method DistortedCaveNodeShapeGenerator.

Parameters:
final DistortedShape.Factory shapeFactory
final IDoubleRange widthRange
final IDoubleRange heightRange
@Nullable final IDoubleRange midWidthRange
@Nullable final IDoubleRange midHeightRange
@Nullable final IDoubleRange lengthRange
final boolean inheritParentRadius
final ShapeDistortion distortion
@Nullable final GeneralNoise.InterpolationFunction interpolation

generateCaveNodeShape

public CaveNodeShape generateCaveNodeShape (final Random random, final CaveType caveType, @Nullable final CaveNode parentNode, @Nonnull final CaveNodeType.CaveNodeChildEntry childEntry, @Nonnull final Vector3d position, final float yaw, final float pitch)

Method generateCaveNodeShape.

Parameters:
final Random random
final CaveType caveType
@Nullable final CaveNode parentNode
@Nonnull final CaveNodeType.CaveNodeChildEntry childEntry
@Nonnull final Vector3d position
final float yaw
final float pitch

getOrigin

static Vector3d getOrigin (@Nonnull final Vector3d origin, @Nullable final CaveNode parentNode, @Nonnull final CaveNodeType.CaveNodeChildEntry childEntry)

Method getOrigin.

Parameters:
@Nonnull final Vector3d origin
@Nullable final CaveNode parentNode
@Nonnull final CaveNodeType.CaveNodeChildEntry childEntry

getLength

static double getLength (@Nullable final IDoubleRange lengthRange, final Random random)

Method getLength.

Parameters:
@Nullable final IDoubleRange lengthRange
final Random random

getDirection

static Vector3d getDirection (final double yaw, double pitch, final double length)

Method getDirection.

Parameters:
final double yaw
double pitch
final double length

Vector3d

public new Vector3d (TrigMathUtil.sin(pitch)

Method Vector3d.

Parameters:
TrigMathUtil.sin(pitch TrigMathUtil.sin(pitch

getStartWidth

static double getStartWidth (final boolean inheritParentRadius, @Nullable final CaveNode parentNode, @Nonnull final IDoubleRange fallback, final Random random)

Method getStartWidth.

Parameters:
final boolean inheritParentRadius
@Nullable final CaveNode parentNode
@Nonnull final IDoubleRange fallback
final Random random

getStartHeight

static double getStartHeight (final boolean inheritParentRadius, @Nullable final CaveNode parentNode, @Nonnull final IDoubleRange fallback, final Random random)

Method getStartHeight.

Parameters:
final boolean inheritParentRadius
@Nullable final CaveNode parentNode
@Nonnull final IDoubleRange fallback
final Random random

getMiddleRadius

static double getMiddleRadius (final double start, final double end, @Nullable final IDoubleRange range, final Random random)

Method getMiddleRadius.

Parameters:
final double start
final double end
@Nullable final IDoubleRange range
final Random random