-
Notifications
You must be signed in to change notification settings - Fork 33
Config
The config is divided in multiple sections (general, advanced, cache, obfuscation, proximity). We will explain each of them in detail in the following. The current version of the config is 1 and should not be edited unless you have good reason to do so.
| name | description | default value |
|---|---|---|
| checkForUpdates | Enables checking for updates on server startup and whenever a player with the orebfuscator.admin permission joins |
true |
| updateOnBlockDamage | Whether block damage (when a player is in the process of digging/breaking a block) should count as block update. | true |
| bypassNotification | Notify a player that he is bypassing obfuscation. | true |
| ignoreSpectator | When enabled stops spectators from revealing proximity obfuscated blocks | false |
| updateRadius | Radius of neighboring blocks to deobfuscate once a block gets updated (break/explode/etc). | 2 |
❗ Since version 5.2.2 Primarily contains more advanced settings for tuning performance and how system resources are used. Proceed with caution!
| name | description | default value |
|---|---|---|
| verbose | Enables more verbose logging | false |
| maxMillisecondPerTick | Maximum millisecond per tick used by the obfuscation dispatcher | 10 |
| protocolLibThreads | Number of threads used for packet listening with ProtocolLib |
-1 (-1 uses {processor count} / 2)
|
| obfuscationWorkerThreads | Number of threads used for obfuscation |
-1 (-1 uses {processor count})
|
| proximityHiderThreads | Number of threads used for proximity deobfuscation |
-1 (-1 uses {processor count} / 2)
|
The cache is used to cache already obfuscated chunks and has two levels. Level one is a memory cache which has a max size and an expiration time. Level two is a disk cache which stores chunks that got evicted from the level one cache. Chunks get evicted when they exceed the expiration time or the cache reached its max size and the chunk is the oldest in terms of last access. When a chunk is requested from cache the cache system will first check level one then level two and if both don't contain the chunk it gets obfuscated and put in level one cache. Since version 5.1.0 the whole cache system is asynchronous and doesn't use the main thread anymore.
| name | description | default value |
|---|---|---|
| enabled | Whether the cache should be used or not. | true |
| baseDirectory | Directory which the cache should be saved to once flushed from memory. This path is relative to the directory your worlds are in. | 'orebfuscator_cache/' |
| maximumOpenRegionFiles | Maximum number of concurrently open region files (file descriptors). | 256 |
| deleteRegionFilesAfterAccess | Minimum amount of time between the last access of region file and its deletion. |
172800000 (2d in ms)
|
| maximumSize | Maximum amount of chunks in memory cache. | 8192 |
| expireAfterAccess | Time for a chunk in memory to expire. |
30000 (30s in ms)
|
| maximumTaskQueueSize | Maximum number of simultaneously queued disk cache tasks. | 32768 |
There can be multiple obfuscation configs but a world can only have one obfuscation config. An obfuscation config contains a list of blocks that should be obfuscated, a list of blocks to use as obfuscation material and a list of worlds to obfuscate. The obfuscation material is weighted which means the higher the weight the higher the chance for this material to be used for obfuscation.
| name | description |
|---|---|
| worlds | List of world matchers to obfuscate. |
| enabled | Whether the obfuscation config should be enabled. |
| hiddenBlocks | Set of blocks to obfuscated. |
| randomBlocks | Set of blocks to use as obfuscation material. |
❗ Since version 5.2.0 (before this would have been a list of plain world names) Worlds can be matched in multiple ways. Here is list of all of them:
| name | description | example |
|---|---|---|
| plain | A plain world name that would only match one specific world with the same name | world_the_end |
| simple glob | A simple glob pattern (only * wildcards are supported as of now) that would match all worlds that match the pattern |
world*end |
| regex pattern | An arbitrary regex pattern (has to be prefixed with regex:) that would match all worlds that match the pattern |
regex:world.+end |
Here is an example for randomBlocks either in an obfuscation or proximity config (they both work the same).
randomBlocks:
stone: 4
diamond_ore: 1
The block stone gets a weight of 4 and diamond_ore a weight of 1 which means stone has a 4/5 (80%) chance of being picked as material and diamond_ore 1/5 (20%).
There can be multiple proximity configs but a world can only have one proximity config. A proximity config contains a list of blocks that should be hidden, a list of blocks to use as obfuscation material and a list of worlds to obfuscate. As well as a visibility distance and a boolean to enable a fast look at block check.
❗ Since version 5.1.3 there is a new defaults section which defines the default hide condition and if the new useBlockBelow obfuscation mode should be used. The useBlockBelow obfuscation mode will replace proximity blocks with the next valid block (valid block is a block that wouldn't be obfuscation if placed at the proximity blocks location) from below the proximity block.
| name | description |
|---|---|
| worlds | List of world matchers to proximity hide. |
| enabled | Whether the proximity config should be enabled. |
| distance | Maximum distance between a player and a hidden block in order for it to get deobfuscated. |
| useFastGazeCheck | Whether the player should be looking at a hidden block in order for it to get deobfuscated. (this function has big performance problems) |
| defaults | The default block options (see below) |
| hiddenBlocks | Set of blocks to proximity hide. |
| randomBlocks | Set of blocks to use as proximity material. |
The proximity block options contain the blocks hide condition which is explained below and the useBlockBelow options which enables the useBlockBelow obfuscation mode.
| name | description | default value |
|---|---|---|
| above | Above or below the y value | true |
| y | y value of block (exclusive) (maxY: 2031 - minY: -2032) | 0 |
| useBlockBelow | is useBlockBelow obfuscation enabled | true |
Here is an example for hiddenBlocks in a proximity config.
hiddenBlocks:
chest: {}
trapped_chest: {
above: true
y: 64
}
The block chest has the default height limit and will always be proximity hidden but the trapped_chest will only be proximity hidden above a y value of 64 (exclusive).