-
Notifications
You must be signed in to change notification settings - Fork 24
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 3
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 if they get to close, useful for servers where every player has access to spectator mode | false |
updateRadius | Radius of neighboring blocks to deobfuscate once a block gets updated (break, explode, burn, 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. Mostly useful as an extra diagnostic step. | false |
maxMillisecondPerTick | Maximum millisecond per tick used by the obfuscation dispatcher (for further information click here) | 10 |
obfuscationWorkerThreads | Number of threads used for obfuscation |
-1 (-1 uses {processor count} )
|
obfuscationTimeout | Chunk obfuscation timeout in milliseconds, if reached obfuscation for chunk will get cancelled | 10000 |
proximityHiderThreads | Number of threads used for proximity deobfuscation |
-1 (-1 uses {processor count} / 2 )
|
proximityDefaultBucketSize | How many players one proximity thread should handle | 50 |
proximityThreadCheckInterval | How often a proximity thread should check if a player needs updates (player position/rotation changed) | 50 |
proximityPlayerCheckInterval | How often a player should get proximity updates regardless of position and rotation changes in milliseconds | 5000 |
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)
|
enableDiskCache | Whether the disk (level two) cache should be used or not | true |
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 |
This section contains arbitrarily named obfuscation config sections (e.g. obfsucation-overworld
, obfsucation-nether
, etc.). Each section can get assigned to multiple worlds but one world may only have one obfuscation section at a time. An obfuscation section contains a list of blocks that should get obfuscated, a list sections of blocks to use as replacement/obfuscation material and a list of worlds to obfuscate.
name | description | default value |
---|---|---|
enabled | Whether this obfuscation config should be enabled | true |
worlds | List of world matchers to obfuscate | |
minY | Lowest block to obfuscate |
-2032 (technical possible minimum) |
maxY | Highest block to obfuscate |
2031 (technical possible maximum) |
layerObfuscation | When enabled uses one block type per Y layer per chunk (for further information click here) | false |
hiddenBlocks | Set of blocks to be obfuscated | |
randomBlocks | List of randomBlocks sections which get used to replace the obfuscated blocks |
❗ 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:
type | 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 |
The randomBlocks
sections can be arbitrarily named (e.g. section-global
, section-stone
, etc.). Each consists of a height limit and a list of weighted blocks. The height limit can used to fill certain parts of a world with different blocks based on their height (e.g. use deeplsate
ores below y
zero). The weight of a block determines how likely it is to get chosen as replacement block for an obfuscated block. If multiple sections target the same height then they will simply get merged. Here is a simple example:
randomBlocks:
section-air:
minY: -2032
maxY: 2031
blocks:
minecraft:cave_air: 5
section-stone:
minY: -5
maxY: 2031
blocks:
minecraft:stone: 15
section-deepslate:
minY: -2032
maxY: 5
blocks:
minecraft:deepslate: 15
This example would create three different sections internally:
- section 1:
- from y=
-2032
to y=-5
- blocks:
cave_air=5
(25%),deepslate=15
(75%)
- from y=
- section 2:
- from y=
-5
to y=5
- blocks:
cave_air=5
(~14.2%),deepslate=15
(~42,8%),stone=15
(~42,8%)
- from y=
- section 3:
- from y=
5
to y=2031
- blocks:
cave_air=5
(25%),stone=15
(75%)
- from y=
Section 1 for example will only get used as replacement material for blocks between y -2032
and -5
. The total weight of the section is 20
= 5
(cave_air
) + 15
(deepslate
) which results in cave_air
having a 25% (5 / 20
) chance to get selected and deepslate
having a 75% (15 / 20
) chance.
This section contains arbitrarily named proximity config sections (e.g. proximity-overworld
, proximity-nether
, etc.). Each section can get assigned to multiple worlds but one world may only have one proximity section at a time. A proximity section contains a list of blocks that should be hidden, a list sections of blocks to use as replacement/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.2.2 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. This should help the obfuscation to blend better into the environment.
name | description | default value |
---|---|---|
enabled | Whether this proximity config should be enabled | true |
minY | Lowest block to proximity hide |
-2032 (technical possible minimum) |
maxY | Highest block to proximity hide |
2031 (technical possible maximum) |
worlds | List of world matchers to proximity hide | |
distance | Maximum distance between a player and a hidden block in order for it to get deobfuscated | 24 |
frustumCulling | For more info see: What is frustum culling and how does it work?
|
|
├─ enabled | Whether the frustum culling should be enabled or not | true |
├─ minDistance | Minimum distance between player and block to be affected by frustum culling. Every block closer than this distance will ignore frustum culling | 3 |
└─ fov | The camera FOV used for the view frustum | 80 |
rayCastCheck | For more info see: What is ray cast checking?
|
|
├─ enabled | Whether ray cast checking should be enabled or not | false |
└─ onlyCheckCenter | If enable will decrease accuracy slightly but improve performance of ray cast checking because fewer rays are casted | false |
useRayCastCheck | Whether the player should be looking at a hidden block in order for it to get deobfuscated. (this function has big performance problems) | false |
useBlockBelow | Enables the use block below obfuscation mode | true |
hiddenBlocks | Set of blocks to proximity hide | |
randomBlocks | List of randomBlocks sections which get used to replace the proximity hidden blocks |
Every block type can have his own constraints which are described in this section. The constraints include the blocks hide condition which is explained below and the useBlockBelow
options which enables the useBlockBelow
obfuscation mode.
name | description | default value |
---|---|---|
minY | Lowest block to proximity hide |
-2032 (technical possible minimum) |
maxY | Highest block to proximity hide |
2031 (technical possible maximum) |
useBlockBelow | Enables the use block below obfuscation mode | true |
Here is an example for hiddenBlocks in a proximity config.
hiddenBlocks:
chest: {}
trapped_chest: {
minY: 64
maxY: 2031
}
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 (inclusive).