Class CustomConnectedBlockPattern

java.lang.Object
com.hypixel.hytale.server.core.universe.world.connectedblocks.CustomTemplateConnectedBlockPattern
com.hypixel.hytale.server.core.universe.world.connectedblocks.CustomConnectedBlockPattern

public class CustomConnectedBlockPattern extends CustomTemplateConnectedBlockPattern
Represents a pattern for connected blocks to query multiple properties of blocks in 3d space
  • Field Details

  • Constructor Details

    • CustomConnectedBlockPattern

      public CustomConnectedBlockPattern()
  • Method Details

    • getConnectedBlockTypeKey

      @Nonnull public Optional<ConnectedBlocksUtil.ConnectedBlockResult> getConnectedBlockTypeKey(@Nonnull String shapeName, @Nonnull ChunkStore chunkStore, @Nonnull org.joml.Vector3ic coordinate, @Nonnull CustomTemplateConnectedBlockRuleSet connectedBlockRuleset, @Nonnull BlockType blockType, int rotation, @Nonnull org.joml.Vector3ic placementNormal, boolean isPlacement)
      Evaluates this pattern against the world, iterating through each allowed pattern transformation (rotation / mirror) until one matches all rules, then assembles the resulting block type and rotation to apply.
      Specified by:
      getConnectedBlockTypeKey in class CustomTemplateConnectedBlockPattern
      Parameters:
      shapeName - The name of the shape this pattern belongs to; used to look up the result BlockPattern on connectedBlockRuleset once a match is found.
      chunkStore - The ChunkStore for chunk component and data access.
      coordinate - The world coordinate of the block being evaluated.
      connectedBlockRuleset - The rule set that owns this pattern.
      blockType - The BlockType of the block being placed or updated.
      rotation - The rotation index of the block being placed or updated.
      placementNormal - The face normal of the block being placed against, or the zero vector for non-placement updates.
      isPlacement - Indicates whether the block is being placed (as opposed to updated).
      Returns:
      the matching result, or an empty Optional if no transformation matched or the chunk being probed is not loaded/ticking.