Package kr.toxicity.model.api.pack
Interface PackObfuscator
- All Known Implementing Classes:
PackObfuscator.Order
public interface PackObfuscator
Defines a strategy for obfuscating resource names in the pack.
Obfuscation can help reduce file path lengths and protect asset names.
- Since:
- 1.15.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classAn obfuscator that generates short names based on the order of appearance.static final recordA pair of obfuscators for models and textures. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PackObfuscatorA no-op obfuscator that returns the name as-is. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringObfuscates the given raw name.static @NotNull PackObfuscatororder()Creates an order-based obfuscator if obfuscation is enabled in the configuration.static @NotNull PackObfuscator.Pairpair(@NotNull PackObfuscator models, @NotNull PackObfuscator textures) Creates a pair obfuscator from two separate obfuscators.default @NotNull PackObfuscator.PairwithModels(@NotNull PackObfuscator models) Creates a pair obfuscator, combining this obfuscator (as textures) with another (as models).
-
Field Details
-
NONE
A no-op obfuscator that returns the name as-is.- Since:
- 1.15.2
-
-
Method Details
-
obfuscate
Obfuscates the given raw name.- Parameters:
rawName- the original name- Returns:
- the obfuscated name
- Since:
- 1.15.2
-
order
Creates an order-based obfuscator if obfuscation is enabled in the configuration.- Returns:
- the obfuscator
- Since:
- 1.15.2
-
withModels
Creates a pair obfuscator, combining this obfuscator (as textures) with another (as models).- Parameters:
models- the models obfuscator- Returns:
- the pair obfuscator
- Since:
- 1.15.2
-
pair
@NotNull static @NotNull PackObfuscator.Pair pair(@NotNull @NotNull PackObfuscator models, @NotNull @NotNull PackObfuscator textures) Creates a pair obfuscator from two separate obfuscators.- Parameters:
models- the models obfuscatortextures- the textures obfuscator- Returns:
- the pair obfuscator
- Since:
- 1.15.2
-