Skip to content

Commit 70a4ce9

Browse files
committed
Add nonvanilla behavior description to mixin-config.md files
1 parent fa6b087 commit 70a4ce9

3 files changed

Lines changed: 41 additions & 14 deletions

File tree

components/mixin-config-plugin/src/main/java/net/caffeinemc/gradle/DefaultConfigCreator.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,13 @@ public static void writeMixinConfigSummaryMarkdown(String projectName, File file
6767
writer.write("### `" + option.path() + "`\n");
6868
writer.write("(default: `" + option.config().enabled() + "`) \n");
6969
boolean hasDependencies = option.config().depends().length > 0;
70+
boolean hasNonvanillaBehavior = !option.config().nonVanillaBehavior().isEmpty();
7071
if (option.config().description().length() > 0) {
71-
writer.write(option.config().description() + (hasDependencies ? " " : "") + "\n");
72+
writer.write(option.config().description() + (hasDependencies || hasNonvanillaBehavior ? " " : "") + "\n");
73+
}
74+
if (hasNonvanillaBehavior) {
75+
writer.write("Non-vanilla behavior:\n " + option.config().nonVanillaBehavior() + (hasDependencies ? " " : "") + "\n");
7276
}
73-
//TODO add nonvanilla behavior text here
7477
if (hasDependencies) {
7578
MixinConfigDependency[] dependencies = option.config().depends();
7679
StringBuilder dependencyList = new StringBuilder();

lithium-fabric-mixin-config.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Implements a faster POI search
3939

4040
### `mixin.ai.poi.fast_portals`
4141
(default: `true`)
42-
Portal search uses the faster POI search and optimized loaded state caching
42+
Portal search uses the faster POI search and optimized loaded state caching
43+
Non-vanilla behavior:
44+
Lithium portal search skips unnecessarily accessing the block/chunk of some portal POIs. This causes fewer chunks to be border loaded for a single game tick, which might affect entity cannons that shoot through/into these chunks in that game tick.
4345

4446
### `mixin.ai.poi.tasks`
4547
(default: `true`)
@@ -482,19 +484,25 @@ Brain sensor optimizations
482484

483485
### `mixin.minimal_nonvanilla.ai.sensor.frog_attackables`
484486
(default: `true`)
485-
Speed up frog attackable sensor by checking entity type before visibility test. This is slightly non-vanilla because the visibility information is cached for up to a second. If this sensor does not compute the visibility test, a later access might compute the visibility instead. That can cause a different result, since the later computation leads to a more updated result.
487+
Speed up frog attackable sensor by checking entity type before visibility test.
488+
Non-vanilla behavior:
489+
As vanilla caches the visibility relation between entities for up to a second, this optimization is detectably different from vanilla: If this sensor does not compute the visibility test, a later access might compute the visibility instead. That can cause a different result, since the later computation leads to a more updated result.
486490

487491
### `mixin.minimal_nonvanilla.collisions`
488492
(default: `true`)
489493
Collision optimizations
490494

491495
### `mixin.minimal_nonvanilla.collisions.empty_space`
492496
(default: `true`)
493-
Speed up finding empty spaces mobs fit into. This speeds up entity pose checks and nether portal positioning for colliding mobs (This code is vanilla's nether portal horse suffocation fix). If certain block collision surfaces have coordinates that are different but within 1e-7 of each other, this optimization may cause entities coming from nether portals or changing pose to be placed in a different position or pose than vanilla. This effect only occurs when the decision whether the entity fits into a space depends on a difference in the magnitude of 1e-7 blocks.
497+
Speed up finding empty spaces mobs fit into. This speeds up entity pose checks and nether portal positioning for colliding mobs (This code is vanilla's nether portal horse suffocation fix).
498+
Non-vanilla behavior:
499+
If certain block collision surfaces have coordinates that are different but within 1e-7 of each other, this optimization may cause entities coming from nether portals or changing pose to be placed in a different position or pose than vanilla. This effect only occurs when the decision whether the entity fits into a space depends on a difference in the magnitude of 1e-7 blocks.
494500

495501
### `mixin.minimal_nonvanilla.spawning`
496502
(default: `true`)
497-
Optimizations to spawning conditions. Reorders the iteration over entities to match the chunks and chunk sections, reducing the number of cache misses. Might differ slightly from vanilla due to floating point associativity differences when summing the spawning potential of density controlled spawns, e.g. skeleton, ghast, enderman and strider spawns in certain nether biomes.
503+
Optimizations to spawning conditions. Reorders the iteration over entities to match the chunks and chunk sections, reducing the number of cache misses.
504+
Non-vanilla behavior:
505+
Might differ slightly from vanilla due to floating point associativity differences when summing the spawning potential of density controlled spawns, e.g. skeleton, ghast, enderman and strider spawns in certain nether biomes.
498506

499507
### `mixin.minimal_nonvanilla.world`
500508
(default: `true`)
@@ -506,13 +514,17 @@ Block entity ticking optimizations
506514

507515
### `mixin.minimal_nonvanilla.world.block_entity_ticking.support_cache`
508516
(default: `true`)
509-
BlockEntity ticking caches whether the BlockEntity can exist in the BlockState at the same location. This deviates from vanilla in the case of placing a hopper in a powered location, immediately updating the cached BlockState (which is incorrect in vanilla). This most likely does not affect your gameplay, as this deviation only affects hoppers, and in vanilla, hoppers never use the cached state information anyway.
517+
BlockEntity ticking caches whether the BlockEntity can exist in the BlockState at the same location.
518+
Non-vanilla behavior:
519+
This deviates from vanilla in the case of placing a hopper in a powered location, immediately updating the cached BlockState (which is incorrect in vanilla). This might affect gameplay with other mods, as this deviation only affects hoppers. In vanilla, hoppers never use this cached state information anyway.
510520
Requirements:
511521
- `mixin.world.block_entity_ticking=true`
512522

513523
### `mixin.minimal_nonvanilla.world.expiring_chunk_tickets`
514524
(default: `true`)
515-
Only check positions with expiring tickets during ticket expiration. Can cause reordering of chunks unloading. The chunk unloading order in vanilla is predictable, but depends on the hash of the chunk position of the tickets and the hashes of the other chunk tickets, and the order of creation of the chunk tickets when hash collisions occur. No known contraptions depend on the unload order.
525+
Only check positions with expiring tickets during ticket expiration.
526+
Non-vanilla behavior:
527+
Can cause reordering of chunks unloading. The chunk unloading order in vanilla is predictable, but depends on the hash of the chunk position of the tickets and the hashes of the other chunk tickets, and the order of creation of the chunk tickets when hash collisions occur. No known contraptions depend on the unload order.
516528

517529
### `mixin.shapes`
518530
(default: `true`)

lithium-neoforge-mixin-config.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Implements a faster POI search
3939

4040
### `mixin.ai.poi.fast_portals`
4141
(default: `true`)
42-
Portal search uses the faster POI search and optimized loaded state caching
42+
Portal search uses the faster POI search and optimized loaded state caching
43+
Non-vanilla behavior:
44+
Lithium portal search skips unnecessarily accessing the block/chunk of some portal POIs. This causes fewer chunks to be border loaded for a single game tick, which might affect entity cannons that shoot through/into these chunks in that game tick.
4345

4446
### `mixin.ai.poi.tasks`
4547
(default: `true`)
@@ -463,19 +465,25 @@ Brain sensor optimizations
463465

464466
### `mixin.minimal_nonvanilla.ai.sensor.frog_attackables`
465467
(default: `true`)
466-
Speed up frog attackable sensor by checking entity type before visibility test. This is slightly non-vanilla because the visibility information is cached for up to a second. If this sensor does not compute the visibility test, a later access might compute the visibility instead. That can cause a different result, since the later computation leads to a more updated result.
468+
Speed up frog attackable sensor by checking entity type before visibility test.
469+
Non-vanilla behavior:
470+
As vanilla caches the visibility relation between entities for up to a second, this optimization is detectably different from vanilla: If this sensor does not compute the visibility test, a later access might compute the visibility instead. That can cause a different result, since the later computation leads to a more updated result.
467471

468472
### `mixin.minimal_nonvanilla.collisions`
469473
(default: `true`)
470474
Collision optimizations
471475

472476
### `mixin.minimal_nonvanilla.collisions.empty_space`
473477
(default: `true`)
474-
Speed up finding empty spaces mobs fit into. This speeds up entity pose checks and nether portal positioning for colliding mobs (This code is vanilla's nether portal horse suffocation fix). If certain block collision surfaces have coordinates that are different but within 1e-7 of each other, this optimization may cause entities coming from nether portals or changing pose to be placed in a different position or pose than vanilla. This effect only occurs when the decision whether the entity fits into a space depends on a difference in the magnitude of 1e-7 blocks.
478+
Speed up finding empty spaces mobs fit into. This speeds up entity pose checks and nether portal positioning for colliding mobs (This code is vanilla's nether portal horse suffocation fix).
479+
Non-vanilla behavior:
480+
If certain block collision surfaces have coordinates that are different but within 1e-7 of each other, this optimization may cause entities coming from nether portals or changing pose to be placed in a different position or pose than vanilla. This effect only occurs when the decision whether the entity fits into a space depends on a difference in the magnitude of 1e-7 blocks.
475481

476482
### `mixin.minimal_nonvanilla.spawning`
477483
(default: `true`)
478-
Optimizations to spawning conditions. Reorders the iteration over entities to match the chunks and chunk sections, reducing the number of cache misses. Might differ slightly from vanilla due to floating point associativity differences when summing the spawning potential of density controlled spawns, e.g. skeleton, ghast, enderman and strider spawns in certain nether biomes.
484+
Optimizations to spawning conditions. Reorders the iteration over entities to match the chunks and chunk sections, reducing the number of cache misses.
485+
Non-vanilla behavior:
486+
Might differ slightly from vanilla due to floating point associativity differences when summing the spawning potential of density controlled spawns, e.g. skeleton, ghast, enderman and strider spawns in certain nether biomes.
479487

480488
### `mixin.minimal_nonvanilla.world`
481489
(default: `true`)
@@ -487,13 +495,17 @@ Block entity ticking optimizations
487495

488496
### `mixin.minimal_nonvanilla.world.block_entity_ticking.support_cache`
489497
(default: `true`)
490-
BlockEntity ticking caches whether the BlockEntity can exist in the BlockState at the same location. This deviates from vanilla in the case of placing a hopper in a powered location, immediately updating the cached BlockState (which is incorrect in vanilla). This most likely does not affect your gameplay, as this deviation only affects hoppers, and in vanilla, hoppers never use the cached state information anyway.
498+
BlockEntity ticking caches whether the BlockEntity can exist in the BlockState at the same location.
499+
Non-vanilla behavior:
500+
This deviates from vanilla in the case of placing a hopper in a powered location, immediately updating the cached BlockState (which is incorrect in vanilla). This might affect gameplay with other mods, as this deviation only affects hoppers. In vanilla, hoppers never use this cached state information anyway.
491501
Requirements:
492502
- `mixin.world.block_entity_ticking=true`
493503

494504
### `mixin.minimal_nonvanilla.world.expiring_chunk_tickets`
495505
(default: `true`)
496-
Only check positions with expiring tickets during ticket expiration. Can cause reordering of chunks unloading. The chunk unloading order in vanilla is predictable, but depends on the hash of the chunk position of the tickets and the hashes of the other chunk tickets, and the order of creation of the chunk tickets when hash collisions occur. No known contraptions depend on the unload order.
506+
Only check positions with expiring tickets during ticket expiration.
507+
Non-vanilla behavior:
508+
Can cause reordering of chunks unloading. The chunk unloading order in vanilla is predictable, but depends on the hash of the chunk position of the tickets and the hashes of the other chunk tickets, and the order of creation of the chunk tickets when hash collisions occur. No known contraptions depend on the unload order.
497509

498510
### `mixin.shapes`
499511
(default: `true`)

0 commit comments

Comments
 (0)