BlockPattern

public class BlockPattern

Class BlockPattern. Provides blockpattern functionality for the Hytale server.

java.lang.Object > BlockPattern

Field Summary

resolvedWeightedMap

private IWeightedMap resolvedWeightedMap

Field resolvedWeightedMap.

resolvedWeightedMapBtk

private IWeightedMap resolvedWeightedMapBtk

Field resolvedWeightedMapBtk.

mapBuilder

final WeightedMap.Builder mapBuilder

Field mapBuilder.

mapBuilderKey

final WeightedMap.Builder mapBuilderKey

Field mapBuilderKey.

blockId

final int blockId

Field blockId.

key

final BlockEntry key

Field key.

blockType

final BlockType blockType

Field blockType.

blockTypeListAsset

final BlockTypeListAsset blockTypeListAsset

Field blockTypeListAsset.

resolvedId

final int resolvedId

Field resolvedId.

blocks

final List blocks

Field blocks.

builder

final WeightedMap.Builder builder

Field builder.

blockArr

final String[] blockArr

Field blockArr.

oldData

final int oldData

Field oldData.

out

final StringBuilder out

Field out.

rot

final RotationTuple rot

Field rot.

fillerX

final int fillerX

Field fillerX.

fillerY

final int fillerY

Field fillerY.

fillerZ

final int fillerZ

Field fillerZ.

start

final int start

Field start.

firstComma

final int firstComma

Field firstComma.

secondComma

final int secondComma

Field secondComma.

start2

final int start2

Field start2.

name

final String name

Field name.

Method Detail

BlockPattern

public public BlockPattern (final IWeightedMap weightedMap)

Method BlockPattern.

Parameters:
final IWeightedMap weightedMap

getResolvedKeys

public Integer[] getResolvedKeys ()

Method getResolvedKeys.

resolve

public void resolve ()

Method resolve.

isEmpty

public boolean isEmpty ()

Method isEmpty.

nextBlock

public int nextBlock (final Random random)

Method nextBlock.

Parameters:
final Random random

nextBlockTypeKey

public BlockEntry nextBlockTypeKey (final Random random)

Method nextBlockTypeKey.

Parameters:
final Random random

firstBlock

public int firstBlock ()

Method firstBlock.

toString

public String toString ()

Method toString.

toString0

private String toString0 ()

Method toString0.

parse

static BlockPattern parse (@Nonnull String str)

Method parse.

Parameters:
@Nonnull String str

parseBlockPattern

static IWeightedMap parseBlockPattern (@Nonnull final String... blocksArgs)

Method parseBlockPattern.

Parameters:
@Nonnull final String... blocksArgs

IllegalArgumentException

public new IllegalArgumentException ("Invalid Chance Value: " + blockArr[0], (Throwable)

Method IllegalArgumentException.

Parameters:
"Invalid Chance Value: " + blockArr[0]
(Throwable (Throwable

parseBlock

static int parseBlock (@Nonnull String blockText)

Method parseBlock.

Parameters:
@Nonnull String blockText

tryParseBlockTypeKey

static BlockEntry tryParseBlockTypeKey (String blockText)

Method tryParseBlockTypeKey.

Parameters:
String blockText

BlockEntry

public record BlockEntry (String blockTypeKey, int rotation, int filler)

Method BlockEntry.

Parameters:
String blockTypeKey
int rotation
int filler

encode

private String encode ()

Method encode.

decode

static BlockEntry decode (final String key)

Method decode.

Parameters:
final String key