CustomTemplateConnectedBlockRuleSet

public class CustomTemplateConnectedBlockRuleSet extends ConnectedBlockRuleSet

Class CustomTemplateConnectedBlockRuleSet. Provides customtemplateconnectedblockruleset functionality for the Hytale server.

java.lang.Object > ConnectedBlockRuleSet > CustomTemplateConnectedBlockRuleSet

Field Summary

shapeAssetId

private String shapeAssetId

Field shapeAssetId.

name

final String name

Field name.

blockPattern

final BlockPattern blockPattern

Field blockPattern.

shapes

final Set shapes

Field shapes.

templateAsset

final CustomConnectedBlockTemplateAsset templateAsset

Field templateAsset.

shapeTemplateAsset

final CustomConnectedBlockTemplateAsset shapeTemplateAsset

Field shapeTemplateAsset.

Method Detail

CustomTemplateConnectedBlockRuleSet

public public CustomTemplateConnectedBlockRuleSet ()

Method CustomTemplateConnectedBlockRuleSet.

getShapeNameToBlockPatternMap

public BlockPattern> getShapeNameToBlockPatternMap ()

Method getShapeNameToBlockPatternMap.

updateCachedBlockTypes

public void updateCachedBlockTypes (final BlockType blockType, final BlockTypeAssetMap assetMap)

Method updateCachedBlockTypes.

Parameters:
final BlockType blockType
final BlockTypeAssetMap assetMap

ObjectOpenHashSet

public new ObjectOpenHashSet ()

Method ObjectOpenHashSet.

getShapesForBlockType

public Set getShapesForBlockType (final int blockTypeKey)

Method getShapesForBlockType.

Parameters:
final int blockTypeKey

getShapeTemplateAsset

public CustomConnectedBlockTemplateAsset getShapeTemplateAsset ()

Method getShapeTemplateAsset.

onlyUpdateOnPlacement

public boolean onlyUpdateOnPlacement ()

Method onlyUpdateOnPlacement.

getConnectedBlockType

public Optional getConnectedBlockType (final World world, final Vector3i testedCoordinate, final BlockType blockType, final int rotation, final Vector3i placementNormal, final boolean isPlacement)

Method getConnectedBlockType.

Parameters:
final World world
final Vector3i testedCoordinate
final BlockType blockType
final int rotation
final Vector3i placementNormal
final boolean isPlacement

KeyedCodec

public new KeyedCodec ("TemplateShapeBlockPatterns", new MapCodec(BlockPattern.CODEC, HashMap::new)

Method KeyedCodec.

Parameters:
"TemplateShapeBlockPatterns" "TemplateShapeBlockPatterns"
new MapCodec(BlockPattern.CODEC
HashMap::new HashMap::new