HyCodeYourTale
classpublicPriority 3

BlockPattern

com.hypixel.hytale.server.core.prefab.selection.mask.BlockPattern

11

Methods

11

Public Methods

4

Fields

2

Constructors

Constants

StringALT_BLOCK_SEPARATOR= "
StringBLOCK_SEPARATOR= ","
StringCHANCE_SUFFIX= "%"
Codec<BlockPattern>CODEC= new FunctionCodec<>(Codec.STRING, BlockPattern::parse, BlockPattern::toString)
doubleDEFAULT_CHANCE= 100.0
BlockPatternEMPTY= new BlockPattern(parseBlockPattern("Empty"))
BlockPattern[]EMPTY_ARRAY= new BlockPattern[0]
PatternFILLER_TEMP_REMOVER_PATTERN= Pattern.compile("(Filler=-?\\d+),(-?\\d+),(-?\\d+)")
HytaleLoggerLOGGER= HytaleLogger.forEnclosingClass()

Constructors

package-private
BlockPattern(String[] blocksArgs)
public
BlockPattern(IWeightedMap<String> weightedMap)

Methods

Public Methods (11)

publicstatic
record BlockEntry(String blockTypeKey, int rotation, int filler)
publicstatic
BlockPattern.BlockEntry decode(String key)
public
int firstBlock()
@Deprecated
public
Integer[] getResolvedKeys()
public
boolean isEmpty()
public
int nextBlock(Random random)
public
BlockPattern.BlockEntry nextBlockTypeKey(Random random)
@Nullable
publicstatic
int parseBlock(String blockText)
public
void resolve()
public
String toString()
@Override
publicstatic
BlockPattern.BlockEntry tryParseBlockTypeKey(String blockText)
@Nullable

Fields

Private/Package Fields (4)

privateIWeightedMap<Integer> resolvedWeightedMap
privateIWeightedMap<BlockPattern.BlockEntry> resolvedWeightedMapBtk
privatetransient String toString0
privateIWeightedMap<String> weightedMap

Related Classes