PackObfuscator

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

Inheritors

Types

Link copied to clipboard
An obfuscator that generates short names based on the order of appearance.
Link copied to clipboard
class Pair : Record
A pair of obfuscators for models and textures.

Properties

Link copied to clipboard
A no-op obfuscator that returns the name as-is.

Functions

Link copied to clipboard
@NotNull
abstract fun obfuscate(@NotNull rawName: @NotNull String): @NotNull String
Obfuscates the given raw name.
Link copied to clipboard
@NotNull
open fun order(): @NotNull PackObfuscator
Creates an order-based obfuscator if obfuscation is enabled in the configuration.
Link copied to clipboard
@NotNull
open fun pair(@NotNull models: @NotNull PackObfuscator, @NotNull textures: @NotNull PackObfuscator): @NotNull PackObfuscator.Pair
Creates a pair obfuscator from two separate obfuscators.
Link copied to clipboard
@NotNull
open fun withModels(@NotNull models: @NotNull PackObfuscator): @NotNull PackObfuscator.Pair
Creates a pair obfuscator, combining this obfuscator (as textures) with another (as models).