Hytale Modding
Hytale Modding
World GenerationTechnical Hytale Generator

Vector Provider

Defines a 3D decimal vector {x, y, z}.

Official Hytale Documentation
All content on this section is provided by Hypixel Studios Canada Inc. and is presented without any substantial changes, aside from visual design adjustments by the HytaleModding Team.

Vector Provider

Constant

Generates the provided vector.

Parameters:

NameTypeDescription
Vector3D decimal vector

SetX

Sets the value of the vector's X compnent.

Parameters:

NameTypeDescription
VectorProviderVectorProvider slot
ValueDensity slot

SetY

Sets the value of the vector's Y compnent.

Parameters:

NameTypeDescription
VectorProviderVectorProvider slot
ValueDensity slot

SetZ

Sets the value of the vector's Z compnent.

Parameters:

NameTypeDescription
VectorProviderVectorProvider slot
ValueDensity slot

Adder

Adds all the input vectors.

This is component-wise addition. If the inputs are v1,v2,,vnv_1, v_2, \dots, v_n, the result is ivi\sum_i v_i, so each output component is the sum of the matching input components: x=ixix=\sum_i x_i, y=iyiy=\sum_i y_i, z=iziz=\sum_i z_i.

Parameters:

NameTypeDescription
InputsVectorProvider slots

Subtracter

Subtracts vector B from vector A.

This is component-wise subtraction. If A=(ax,ay,az)A=(a_x,a_y,a_z) and B=(bx,by,bz)B=(b_x,b_y,b_z), the result is AB=(axbx, ayby, azbz)A-B=(a_x-b_x,\ a_y-b_y,\ a_z-b_z), which you can read as the vector that points from B to A.

Parameters:

NameTypeDescription
VectorProviderAVectorProvider slot
VectorProviderBVectorProvider slot

Random

Generates a unit vector in a random direction.

Parameters:

NameTypeDescription
SeedStringDetermines pseudo-random outcome.

Normalizer

Sets the vector's length to the provided magnitude. The vector keeps its direction.

For any non-zero vector vv, this computes mvvm \cdot \frac{v}{\|v\|}, where v=x2+y2+z2\|v\|=\sqrt{x^2+y^2+z^2} and mm is the target magnitude. In other words, it keeps the direction and rescales the length to exactly match the provided value.

Parameters:

NameTypeDescription
VectorProviderVectorProvider slot
MagnitudeDensity slotDetermines the length of the vector.

ScalarMultiplier

Multiplies the vector by a scalar.

If the input vector is v=(x,y,z)v=(x,y,z) and the scalar is kk, the result is kv=(kx,ky,kz)kv=(kx,ky,kz). This scales the length by k|k|, and a negative scalar also flips the direction.

Parameters:

NameTypeDescription
VectorProviderVectorProvider slot
DensityDensity slotScalar.

Multiplier

Multiplies all the provided vectors.

This is component-wise multiplication, not a dot or cross product. For vectors A=(ax,ay,az)A=(a_x,a_y,a_z) and B=(bx,by,bz)B=(b_x,b_y,b_z), the result is (axbx, ayby, azbz)(a_xb_x,\ a_yb_y,\ a_zb_z), and the same rule extends across any number of inputs.

Parameters:

NameTypeDescription
InputsVectorProvider slotsVectors to multiply.

Cross

Finds the cross product of the provided vectors: A cross B.

The cross product produces a vector perpendicular to both inputs. Its magnitude is ABsin(θ)\|A\|\|B\|\sin(\theta), where θ\theta is the angle between them, so it is largest for perpendicular vectors and zero for parallel ones.

Parameters:

NameTypeDescription
VectorProviderAVectorProvider slot
VectorProviderBVectorProvider slot

PlaneProjector

Projects the vector onto a plane defined by the vectors PlaneA and PlaneB.

This keeps only the part of the vector that lies in the plane spanned by PlaneA and PlaneB. If nn is the plane normal, usually from n=A×BA×Bn = \frac{A \times B}{\|A \times B\|}, then the projection is v(vn)nv - (v \cdot n)n, which removes the component orthogonal to the plane.

Parameters:

NameTypeDescription
VectorProviderVectorProvider slotThe vector to project.
PlaneAVectorProvider slotDefines the plane.
PlaneBVectorProvider slotDefines the plane.

VectorProjector

Projects the vector onto another vector.

This keeps only the component of Source that points along Target. For non-zero target vector tt and source vector ss, the projection is projt(s)=stttt\mathrm{proj}_t(s)=\frac{s \cdot t}{t \cdot t}t.

Parameters:

NameTypeDescription
SourceVectorProvider slot
TargetVectorProvider slot

DensityGradient

Generates the gradient of the provided Density field. The resulting gradient vector shows which direction the Density field increases and how quickly it changes.

For more information about gradient vectors, see: https://en.wikipedia.org/wiki/Gradient

Parameters:

NameTypeDescription
SampleDistancepositive decimal valueHow far apart the Density field value samples are taken. The optimal value for performance is 1.0. Greater values could be useful for smoothing out results for specific applications.
DensityDensity slot

Cache

Caches the input vector for each position.

Use this only if the downstream (child) VectorProvider is expensive and the same coordinate is queried more than once.

Parameters:

NameTypeDescription
SampleDistancepositive decimal valueHow far apart the Density field value samples are taken. The optimal value for performance is 1.0. Greater values could be useful for smoothing out results for specific applications.
DensityDensity slot

Exported

Allows exporting a VectorProvider as a single instance. Enabling SingleInstance on this node ensures all importers share the same logic.

By default, a completely different instance is created for every Imported node. When multiple Imported nodes import the same exported key, a new instance of that exported VectorProvider tree is created for each Imported node. SingleInstance ensures all importers share the same underlying instance of the node tree.

This node can be used to optimize caching when an exported VectorProvider is imported multiple times in the same context and contains caches. The caches would be shared between the different imported instances.

Important: This is still an experimental feature and could cause unexpected behaviors if misused.

Expected Inputs: 1

Parameters:

NameTypeDescription
SingleInstancebooleanEnable this to share the export across all Imported nodes that reference this key.
VectorProviderVectorProvider slot

Imported

Imports an exported VectorProvider.

Parameters:

NameTypeDescription
NamestringThe exported VectorProvider.