Hytale Modding
Hytale Modding
World GenerationTechnical Hytale Generator

Material Providers

Determines which Material to use where.

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.

Constant

Provides a constant Material.

Parameters:

NameTypeDescription
MaterialMaterial slot

Solidity

Separates terrain into Solid and Empty blocks. Provides a Material Provider slot for each selection.

Parameters:

NameTypeDescription
SolidMaterial Provider slot
EmptyMaterial Provider slot

Queue

Goes through a queue of Material Provider slots from highest to lowest priority. If a Material Provider in the queue doesn’t provide a block type, then the next one in the queue is queried. If no slot provides a block, then the Queue Material Provider will not provide a block. The query stops at the first slot that provides a block.

Parameters:

NameTypeDescription
Queuelist of Material Provider slotsSlots are queried from top to bottom.

SimpleHorizontal

Applies the child Material Provider to a vertical range.

If a BaseHeight is provided, the TopY and BottomY values are relative to the referenced DecimalConstant. Otherwise, they’re relative to the world’s Y coordinate.

Parameters:

NameTypeDescription
TopYinteger

Y coordinate. Defines the vertical top exclusive limit of the region.

Top BaseHeightstringDecimalConstant name.
BottomYinteger

Y coordinate. Defines the vertical bottom inclusive limit of the region.

Bottom BaseHeightstringDecimalConstant name.
MaterialMaterial Provider slotSlot to query for the selected region.

Striped

Applies a Material Provider slot to a set of horizontal stripes of blocks of varying thickness and position. Below is an example of basalt stripes in a stone cliff.

Parameters:

NameTypeDescription
Stripeslist of stripe assets

Each stripe contains TopY and BottomY.

Stripes[].TopYintegerWorld Y value. Inclusive.
Stripes[].BottomYintegerWorld Y value. Inclusive.
MaterialMaterial Provider slotSlot to query for the selected region.

Weighted

Picks the Material Provider slot to query from a list. Each slot has a weight that determines the likelihood of being picked.

Parameters:

NameTypeDescription
Seedstring
SkipChancefloat (0.0–1.0)Percentage of blocks to skip. When skipped, this provider returns no block and does not pick a slot.
WeightedMaterialslist of weighted Material Provider slots
WeightedMaterials[].Weightnumber (> 0)Higher value increases likelihood of being picked.
WeightedMaterials[].MaterialMaterial Provider slot

FieldFunction

Selects a 3D region using a noise function and value delimiters. The delimiters link a Material Provider slot to a specific range of values in the noise function.

Parameters:

NameTypeDescription
FieldFunctionfield function asset

Defines the field value for each block. Same asset type used by DAOTerrain density.

Delimiterslist of delimitersHigher entries have higher priority.
Delimiters[].FromfloatMinimum limit of the delimiter’s range.
Delimiters[].TofloatMaximum limit of the delimiter’s range.
Delimiters[].MaterialMaterial Provider slotSlot linked to this delimiter.

SpaceAndDepth

Allows placing layers of blocks on a terrain’s floor or ceiling surfaces. Layers of Material are piled on top of each other inside the surface (floor or ceiling), like a cake. There are multiple Layer types, each providing a unique way to define thickness. Below is an example with two layers in the floor of our terrain.

Conditions let you skip this Material Provider when they’re not met. An example could be a Condition that only places grass if there are at least 5 empty blocks above the surface.

Parameters:

NameTypeDescription
LayerContextstring

Context the layers are applied on. Values: DEPTH_INTO_FLOOR , DEPTH_INTO_CEILING.

MaxExpectedDepthpositive integer

Optimization hint. Set to max expected combined layer depth. Too small can cut off layers. Too large can hurt performance.

ConditionCondition slotProvider returns no block if the Condition fails.
Layerslist of Layer objectsStacked top-to-bottom as depth increases into the context.

Condition

A Condition object checks whether the environment is valid to determine whether the Material Provider should run for the current block. If the Condition fails for a block, the Material Provider returns no block.

An example Condition could check if there are at least 5 blocks of empty space above the floor. This is useful if you want dirt in tight spaces instead of grass. An example is shown below.

See the JSON code here.

The Condition’s ContextToCheck parameter selects which context value the Condition queries. In the example above, we’re checking the SPACE_ABOVE_FLOOR context, which is the number of blocks above the floor. There are currently two possible context values you can use:

  • SPACE_ABOVE_FLOOR
  • SPACE_BELOW_CEILING

There are multiple Condition types that allow you to compose more complex Conditions from simpler ones. Below are the different types.

EqualsCondition

Validates only if a context value is equal to the Condition’s configured value.

Parameters:

NameTypeDescription
ContextToCheck

string (SPACE_ABOVE_FLOOR | SPACE_BELOW_CEILING)

Which context value the Condition queries.
ValueintegerCondition passes only if the context value equals this.

GreaterThanCondition

Validates only if a context value is greater than the Condition’s configured threshold.

Parameters:

NameTypeDescription
ContextToCheck

string (SPACE_ABOVE_FLOOR | SPACE_BELOW_CEILING)

Which context value the Condition queries.
ThresholdintegerCondition passes only if the context value is greater than this.

SmallerThanCondition

Validates only if a context value is smaller than the Condition’s configured threshold.

Parameters:

NameTypeDescription
ContextToCheck

string (SPACE_ABOVE_FLOOR | SPACE_BELOW_CEILING)

Which context value the Condition queries.
ThresholdintegerCondition passes only if the context value is smaller than this.

AndCondition

Logical AND Condition. Validates only if all child Conditions validate.

Parameters:

NameTypeDescription
Conditionslist of Condition slotsCondition passes only if all child Conditions pass.

OrCondition

Logical OR Condition. Validates if any child Condition validates.

Parameters:

NameTypeDescription
Conditionslist of Condition slotsCondition passes if any child Condition passes.

NotCondition

Logical NOT Condition. Validates only if its child Condition does not validate.

Parameters:

NameTypeDescription
ConditionCondition slot

Single slot (not a list). Condition passes if the child Condition fails.

AlwaysTrueCondition

This Condition type always validates.


Layer

In the SpaceAndDepth Material Provider type, Layers are stacked into the depth of the floor or ceiling. Layers have a thickness and a Material Provider.

Below are some examples that illustrate how layers work.

Example 1:

  • Layer 1: grass of thickness 1.

Example 2:

  • Layer 1: grass of thickness 1.
  • Layer 2: dirt of thickness ranging from 2 to 3.

Example 3:

  • Layer 1: mud of thickness 1 to 5 defined by a 2D simplex noise function.
  • Layer 2: dirt of thickness ranging from 2 to 3.

Example 4: This example shows how this can work not only on floors but also on ceilings by changing the LayerContext value to DEPTH_INTO_CEILING.

  • Layer 1: dirt of thickness in range 2 to 3.

End of examples.

Below are the supported Layer types.

ConstantThickness

Has the same thickness everywhere.

Parameters:

NameTypeDescription
MaterialMaterial Provider slot
Thicknessinteger (>= 0)Thickness in blocks.

RangeThickness

The thickness varies per XZ coordinate and is defined by a range of possible values.

Parameters:

NameTypeDescription
MaterialMaterial Provider slot
RangeMininteger (>= 0)Minimum thickness in blocks.
RangeMaxinteger (>= 0)Maximum thickness in blocks (inclusive).
Seedstring

WeightedThickness

The thickness varies per XZ coordinate and is picked from a list of weighted thickness values.

Parameters:

NameTypeDescription
MaterialMaterial Provider slot
PossibleThicknesseslist of weighted thickness valuesUsed to pick a thickness per XZ.
SeedstringSeed used when picking the thickness.

NoiseThickness

The thickness varies per XZ coordinate and is determined by a noise function tree. The thickness value comes from the function output. In the example below, the output is normalized from 0 to 5. This makes the thickest points about 5 blocks.

Parameters:

NameTypeDescription
MaterialMaterial Provider slot
ThicknessFunctionXZnoise function tree

Sampled as a 2D function on the XZ plane (Y is always 0).


Imported

Imports an exported Material Provider.

Parameters:

NameTypeDescription
NamestringThe exported Material Provider.