Contents
Class CustomConnectedBlockTemplateAsset
java.lang.Object
com.hypixel.hytale.server.core.universe.world.connectedblocks.CustomConnectedBlockTemplateAsset
- All Implemented Interfaces:
JsonAsset<String>, JsonAssetWithMap<String, DefaultAssetMap<String, CustomConnectedBlockTemplateAsset>>
@Deprecated
public class CustomConnectedBlockTemplateAsset
extends Object
implements JsonAssetWithMap<String, DefaultAssetMap<String, CustomConnectedBlockTemplateAsset>>
Deprecated.
The Connected Block System creates Connected Block Templates, which contain multiple shapes that connect together to form a
"smart block". Within each shape is multiple patterns, which contain multiple pattern rules that must match.
If all pattern rules within a pattern match, the smart block will update to the first match
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AssetBuilderCodec<String, CustomConnectedBlockTemplateAsset> Deprecated.The codec used to parseCustomConnectedBlockTemplateAssetinstances from asset JSON files.static final ValidatorCache<String> Deprecated.Validator cache that resolves an asset id string to the correspondingCustomConnectedBlockTemplateAssetduring codec validation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.static AssetStore<String, CustomConnectedBlockTemplateAsset, DefaultAssetMap<String, CustomConnectedBlockTemplateAsset>> Deprecated.getConnectedBlockType(ChunkStore chunkStore, org.joml.Vector3ic coordinate, CustomTemplateConnectedBlockRuleSet ruleSet, BlockType blockType, int rotation, org.joml.Vector3ic placementNormal, boolean useDefaultShapeIfNoMatch, boolean isPlacement) Deprecated.Evaluates this template's shapes against the world and returns the first match.getId()Deprecated.booleanDeprecated.
-
Field Details
-
CODEC
Deprecated.The codec used to parseCustomConnectedBlockTemplateAssetinstances from asset JSON files. -
VALIDATOR_CACHE
Deprecated.Validator cache that resolves an asset id string to the correspondingCustomConnectedBlockTemplateAssetduring codec validation.
-
-
Constructor Details
-
CustomConnectedBlockTemplateAsset
public CustomConnectedBlockTemplateAsset()Deprecated.
-
-
Method Details
-
getAssetStore
@Nonnull public static AssetStore<String, CustomConnectedBlockTemplateAsset, DefaultAssetMap<String, CustomConnectedBlockTemplateAsset>> getAssetStore()Deprecated.- Returns:
- the asset store for
CustomConnectedBlockTemplateAsset, initializing it on first call.
-
getAssetMap
Deprecated.- Returns:
- the asset map for
CustomConnectedBlockTemplateAsset, used to look up templates by id.
-
getConnectedBlockType
@Nonnull public Optional<ConnectedBlocksUtil.ConnectedBlockResult> getConnectedBlockType(@Nonnull ChunkStore chunkStore, @Nonnull org.joml.Vector3ic coordinate, @Nonnull CustomTemplateConnectedBlockRuleSet ruleSet, @Nonnull BlockType blockType, int rotation, @Nonnull org.joml.Vector3ic placementNormal, boolean useDefaultShapeIfNoMatch, boolean isPlacement) Deprecated.Evaluates this template's shapes against the world and returns the first match.- Parameters:
chunkStore- TheChunkStorefor chunk component and data access.coordinate- The world coordinate of the block being evaluated.ruleSet- TheCustomTemplateConnectedBlockRuleSetdelegating to this template.blockType- TheBlockTypeof 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.useDefaultShapeIfNoMatch- Iftrueand no shape matches, return the configureddefaultShapeName(when set).isPlacement- Indicates whether the block is being placed (as opposed to updated).- Returns:
- the matching result, or an empty
Optionalif no shape matched and no default applies.
-
isDontUpdateAfterInitialPlacement
public boolean isDontUpdateAfterInitialPlacement()Deprecated.- Returns:
trueif blocks using this template should not be re-evaluated after initial placement.
-
getId
-