-
Notifications
You must be signed in to change notification settings - Fork 26
Config Version 1
The config is divided in multiple sections. 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 |
initialRadius | Depth of opaque blocks needed for obfuscation. For a value of 1 only surface blocks won't get obfuscated. If the value is 0 all blocks including surface blocks get obfuscated. |
1 |
updateRadius | Radius of neighboring blocks to deobfuscate once a block gets updated (break/explode/etc). | 2 |
proximityHiderRunnerSize | How many threads the proximity hider should use. | 4 |
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 expire time. Level two is a disk cache which stores evicted chunks. Chunks get evicted when they exide 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 level one gets checked first then level two and if both don't contain the chunk it gets obfuscated and put in the first layer. 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 starting in the same directory as your worlds. | '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 |
protocolLibThreads | Number of async ProtocolLib threads. |
-1 (-1 uses processor count)
|
There can be multiple world configs but a world can only have one world config. A world 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 | Set of worlds to obfuscate. |
enabled | Whether the world config should be enabled. |
hiddenBlocks | Set of blocks to obfuscated. |
randomBlocks | Set of blocks to use as obfuscation material. |
Here is an example for randomBlocks either in a world 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 | Set of worlds 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 be visible. |
useFastGazeCheck | Whether the player should be looking at a hidden block in order for it to be visible. (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) | 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).