Skip to content

Commit ef9b40f

Browse files
committed
Move experimental.spawning to minimal_nonvanilla.spawning
1 parent b9affec commit ef9b40f

10 files changed

+26
-22
lines changed

common/src/main/java/net/caffeinemc/mods/lithium/mixin/experimental/spawning/package-info.java

Lines changed: 0 additions & 4 deletions
This file was deleted.

common/src/main/java/net/caffeinemc/mods/lithium/mixin/experimental/spawning/EntitySectionAccessor.java renamed to common/src/main/java/net/caffeinemc/mods/lithium/mixin/minimal_nonvanilla/spawning/EntitySectionAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.caffeinemc.mods.lithium.mixin.experimental.spawning;
1+
package net.caffeinemc.mods.lithium.mixin.minimal_nonvanilla.spawning;
22

33
import net.minecraft.util.ClassInstanceMultiMap;
44
import net.minecraft.world.level.entity.EntitySection;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.caffeinemc.mods.lithium.mixin.experimental.spawning;
1+
package net.caffeinemc.mods.lithium.mixin.minimal_nonvanilla.spawning;
22

33
import com.google.common.collect.AbstractIterator;
44
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.caffeinemc.mods.lithium.mixin.experimental.spawning;
1+
package net.caffeinemc.mods.lithium.mixin.minimal_nonvanilla.spawning;
22

33
import net.minecraft.world.level.entity.EntityAccess;
44
import net.minecraft.world.level.entity.EntitySectionStorage;

common/src/main/java/net/caffeinemc/mods/lithium/mixin/experimental/spawning/ServerChunkCacheMixin.java renamed to common/src/main/java/net/caffeinemc/mods/lithium/mixin/minimal_nonvanilla/spawning/ServerChunkCacheMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.caffeinemc.mods.lithium.mixin.experimental.spawning;
1+
package net.caffeinemc.mods.lithium.mixin.minimal_nonvanilla.spawning;
22

33
import net.caffeinemc.mods.lithium.common.world.ChunkAwareEntityIterable;
44
import net.minecraft.server.level.ServerChunkCache;

common/src/main/java/net/caffeinemc/mods/lithium/mixin/experimental/spawning/ServerLevelAccessor.java renamed to common/src/main/java/net/caffeinemc/mods/lithium/mixin/minimal_nonvanilla/spawning/ServerLevelAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.caffeinemc.mods.lithium.mixin.experimental.spawning;
1+
package net.caffeinemc.mods.lithium.mixin.minimal_nonvanilla.spawning;
22

33
import net.minecraft.server.level.ServerLevel;
44
import net.minecraft.world.entity.Entity;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@MixinConfigOption(
2+
description = "Optimizations to spawning conditions. Reorders the iteration over entities to match the chunks " +
3+
"and chunk sections, reducing the number of cache misses. Might differ slightly from vanilla due to " +
4+
"floating point associativity differences when summing the spawning potential of density controlled " +
5+
"spawns, e.g. skeleton, ghast, enderman and strider spawns in certain nether biomes.")
6+
package net.caffeinemc.mods.lithium.mixin.minimal_nonvanilla.spawning;
7+
8+
import net.caffeinemc.gradle.MixinConfigOption;

common/src/main/resources/lithium.mixins.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@
143143
"experimental.entity.block_caching.fire_lava_touching.EntityMixin",
144144
"experimental.entity.block_caching.suffocation.EntityMixin",
145145
"experimental.entity.item_entity_merging.ItemEntityMixin",
146-
"experimental.spawning.EntitySectionAccessor",
147-
"experimental.spawning.EntitySectionStorageMixin",
148-
"experimental.spawning.PersistentEntitySectionManagerAccessor",
149-
"experimental.spawning.ServerChunkCacheMixin",
150-
"experimental.spawning.ServerLevelAccessor",
151146
"gen.cached_generator_settings.NoiseBasedChunkGeneratorMixin",
152147
"math.fast_blockpos.BlockPosMixin",
153148
"math.fast_blockpos.DirectionMixin",
@@ -160,6 +155,11 @@
160155
"minimal_nonvanilla.collisions.empty_space.ArrayVoxelShapeInvoker",
161156
"minimal_nonvanilla.collisions.empty_space.BitSetDiscreteVoxelShapeAccessor",
162157
"minimal_nonvanilla.collisions.empty_space.LevelMixin",
158+
"minimal_nonvanilla.spawning.EntitySectionAccessor",
159+
"minimal_nonvanilla.spawning.EntitySectionStorageMixin",
160+
"minimal_nonvanilla.spawning.PersistentEntitySectionManagerAccessor",
161+
"minimal_nonvanilla.spawning.ServerChunkCacheMixin",
162+
"minimal_nonvanilla.spawning.ServerLevelAccessor",
163163
"minimal_nonvanilla.world.block_entity_ticking.support_cache.BlockEntityMixin",
164164
"minimal_nonvanilla.world.block_entity_ticking.support_cache.DirectBlockEntityTickInvokerMixin",
165165
"minimal_nonvanilla.world.block_entity_ticking.support_cache.LevelChunkMixin",

lithium-fabric-mixin-config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,6 @@ Requirements:
406406
- `mixin.util.entity_collection_replacement=true`
407407
- `mixin.util.item_component_and_count_tracking=true`
408408

409-
### `mixin.experimental.spawning`
410-
(default: `true`)
411-
Experimental optimizations to spawning conditions. Reorders the iteration over entities to match the chunks and chunk sections, reducing the number of cache misses.
412-
413409
### `mixin.gen`
414410
(default: `true`)
415411
Various world generation optimizations
@@ -454,6 +450,10 @@ Speed up frog attackable sensor by checking entity type before visibility test.
454450
(default: `true`)
455451
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.
456452

453+
### `mixin.minimal_nonvanilla.spawning`
454+
(default: `true`)
455+
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.
456+
457457
### `mixin.minimal_nonvanilla.world.block_entity_ticking.support_cache`
458458
(default: `true`)
459459
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.

lithium-neoforge-mixin-config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,6 @@ Requirements:
379379
- `mixin.util.entity_collection_replacement=true`
380380
- `mixin.util.item_component_and_count_tracking=true`
381381

382-
### `mixin.experimental.spawning`
383-
(default: `true`)
384-
Experimental optimizations to spawning conditions. Reorders the iteration over entities to match the chunks and chunk sections, reducing the number of cache misses.
385-
386382
### `mixin.gen`
387383
(default: `true`)
388384
Various world generation optimizations
@@ -427,6 +423,10 @@ Speed up frog attackable sensor by checking entity type before visibility test.
427423
(default: `true`)
428424
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.
429425

426+
### `mixin.minimal_nonvanilla.spawning`
427+
(default: `true`)
428+
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.
429+
430430
### `mixin.minimal_nonvanilla.world.block_entity_ticking.support_cache`
431431
(default: `true`)
432432
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.

0 commit comments

Comments
 (0)