diff --git a/common/src/main/java/net/caffeinemc/mods/lithium/mixin/minimal_nonvanilla/world/expiring_chunk_tickets/DistanceManagerMixin.java b/common/src/main/java/net/caffeinemc/mods/lithium/mixin/minimal_nonvanilla/world/expiring_chunk_tickets/DistanceManagerMixin.java index db9f927e7..6333d72e8 100644 --- a/common/src/main/java/net/caffeinemc/mods/lithium/mixin/minimal_nonvanilla/world/expiring_chunk_tickets/DistanceManagerMixin.java +++ b/common/src/main/java/net/caffeinemc/mods/lithium/mixin/minimal_nonvanilla/world/expiring_chunk_tickets/DistanceManagerMixin.java @@ -41,7 +41,9 @@ private static boolean canNoneExpire(SortedArraySet> tickets) { return true; } - @Redirect(method = { "method_14041", "lambda$getTickets$7" }, at = @At(value = "INVOKE", target = "Lnet/minecraft/util/SortedArraySet;create(I)Lnet/minecraft/util/SortedArraySet;")) + @Redirect( + method = { "method_14041", "lambda$getTickets$5" }, // Fabric, Neoforge + at = @At(value = "INVOKE", target = "Lnet/minecraft/util/SortedArraySet;create(I)Lnet/minecraft/util/SortedArraySet;")) private static SortedArraySet> useLithiumSortedArraySet(int initialCapacity) { return new ChunkTicketSortedArraySet<>(initialCapacity); } diff --git a/common/src/main/java/net/caffeinemc/mods/lithium/mixin/world/block_entity_ticking/sleeping/LevelChunkMixin.java b/common/src/main/java/net/caffeinemc/mods/lithium/mixin/world/block_entity_ticking/sleeping/LevelChunkMixin.java index 2d92aa07e..f13171603 100644 --- a/common/src/main/java/net/caffeinemc/mods/lithium/mixin/world/block_entity_ticking/sleeping/LevelChunkMixin.java +++ b/common/src/main/java/net/caffeinemc/mods/lithium/mixin/world/block_entity_ticking/sleeping/LevelChunkMixin.java @@ -17,7 +17,7 @@ public class LevelChunkMixin { @Inject( - method = { "method_31719", "lambda$updateBlockEntityTicker$6" }, // Fabric, Neoforge + method = { "method_31719", "lambda$updateBlockEntityTicker$7" }, // Fabric, Neoforge at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;addBlockEntityTicker(Lnet/minecraft/world/level/block/entity/TickingBlockEntity;)V"), locals = LocalCapture.CAPTURE_FAILHARD ) @@ -28,7 +28,7 @@ private void setBlockEntityTickingOrder(BlockEntity blockEntity, BlockEntityTick } @Inject( - method = { "method_31719", "lambda$updateBlockEntityTicker$6" }, // Fabric, Neoforge + method = { "method_31719", "lambda$updateBlockEntityTicker$7" }, // Fabric, Neoforge at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/chunk/LevelChunk$RebindableTickingBlockEntityWrapper;rebind(Lnet/minecraft/world/level/block/entity/TickingBlockEntity;)V"), locals = LocalCapture.CAPTURE_FAILHARD ) diff --git a/lithium-fabric-mixin-config.md b/lithium-fabric-mixin-config.md index 3c8d953ab..fbb959497 100644 --- a/lithium-fabric-mixin-config.md +++ b/lithium-fabric-mixin-config.md @@ -21,7 +21,6 @@ mixin.gen.biome_noise_cache=false Mob AI optimizations ### `mixin.ai.pathing` - (default: `false`) A faster code path is used for determining what kind of path-finding node type is associated with a given block. Additionally, a faster chunk cache will be used for accessing blocks while evaluating @@ -149,7 +148,6 @@ FluidStates store directly whether they are empty Fluid optimizations ### `mixin.block.fluid.flow` - (default: `false`) Fluid flow optimization @@ -480,7 +478,6 @@ Allow accessing certain fields and functions that are normally inaccessible Allows access to existing BlockEntities without creating new ones ### `mixin.util.block_tracking` - (default: `false`) Chunk sections count certain blocks inside them and provide a method to quickly check whether a chunk contains any of these blocks. Furthermore, chunk sections can notify registered listeners about certain blocks being placed or broken. Requirements: @@ -617,7 +614,6 @@ Requirements: Faster block and fluid access due to inlining and reduced method size ### `mixin.world.inline_height` - (default: `false`) Reduces indirection by inlining world height access methods diff --git a/lithium-neoforge-mixin-config.md b/lithium-neoforge-mixin-config.md index fa4e70500..48756c861 100644 --- a/lithium-neoforge-mixin-config.md +++ b/lithium-neoforge-mixin-config.md @@ -21,7 +21,8 @@ mixin.gen.biome_noise_cache=false Mob AI optimizations ### `mixin.ai.pathing` -(default: `true`) + +(default: `false`) A faster code path is used for determining what kind of path-finding node type is associated with a given block. Additionally, a faster chunk cache will be used for accessing blocks while evaluating paths. @@ -95,18 +96,10 @@ Disable the parent animal sensor when an animal is not a baby. Would differ from (default: `true`) Patches that reduce memory allocations -### `mixin.alloc.blockstate` -(default: `true`) -Improve the BlockState withTable lookup by using a custom table implementation. - ### `mixin.alloc.chunk_random` (default: `true`) Random block ticking uses fewer block position allocations, thereby reducing the object allocation rate. -### `mixin.alloc.chunk_ticking` -(default: `true`) -Reuse large chunk lists - ### `mixin.alloc.composter` (default: `true`) Composters will reuse the available slot arrays that are requested by hoppers @@ -123,10 +116,6 @@ Entity trackers use a fastutil set for storing players instead of an IdentityHas (default: `true`) Avoid `Enum#values()` array copy in frequently called code -### `mixin.alloc.enum_values.living_entity` -(default: `true`) -Avoid `Enum#values()` array copy in frequently called code - ### `mixin.alloc.enum_values.piston_block` (default: `true`) Avoid `Enum#values()` array copy in frequently called code @@ -160,7 +149,8 @@ FluidStates store directly whether they are empty Fluid optimizations ### `mixin.block.fluid.flow` -(default: `true`) + +(default: `false`) Fluid flow optimization ### `mixin.block.hopper` @@ -250,10 +240,6 @@ Use ReferenceArraySet instead of HashSet to store the fluids the entity is curre (default: `true`) Uses fastutil hashmaps for gamerules -### `mixin.collections.goals` -(default: `true`) -Uses fastutil hashsets for goals in the AI goal selector - ### `mixin.collections.mob_spawning` (default: `true`) Uses custom hashset/list combination for faster mob spawn checks @@ -430,10 +416,6 @@ Requirements: (default: `true`) 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. -### `mixin.profiler` -(default: `true`) -Avoid indirection when accessing the profiler - ### `mixin.shapes` (default: `true`) Various VoxelShape optimizations @@ -479,7 +461,8 @@ Allow accessing certain fields and functions that are normally inaccessible Allows access to existing BlockEntities without creating new ones ### `mixin.util.block_tracking` -(default: `true`) + +(default: `false`) Chunk sections count certain blocks inside them and provide a method to quickly check whether a chunk contains any of these blocks. Furthermore, chunk sections can notify registered listeners about certain blocks being placed or broken. Requirements: - `mixin.util.data_storage=true` @@ -600,10 +583,6 @@ Various improvements to explosions. (default: `true`) Various improvements to explosion block damage, e.g. not accessing blocks along an explosion ray multiple times -### `mixin.world.explosions.cache_exposure` -(default: `true`) -Caches entity explosion exposure to avoid duplicate calculations. - ### `mixin.world.game_events` (default: `true`) Various improvements to game events (vibrations) that are detected by allays, wardens and several sculk blocks. @@ -619,7 +598,8 @@ Requirements: Faster block and fluid access due to inlining and reduced method size ### `mixin.world.inline_height` -(default: `true`) + +(default: `false`) Reduces indirection by inlining world height access methods ### `mixin.world.raycast` diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index 3684b67a7..00fcbadf2 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -23,7 +23,7 @@ Lithium is a free and open-source optimization mod for Minecraft which makes a w [[dependencies.lithium]] modId = "minecraft" type = "required" -versionRange = "[1.21,1.21.1]" +versionRange = "[1.21.2,1.21.3]" ordering = "NONE" side = "BOTH"