Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lithium hopper optimizations broken/disabled by chunk system entity management rewrite #33

Open
barnabwhy opened this issue Sep 26, 2024 · 1 comment

Comments

@barnabwhy
Copy link

fixed by setting mixin.util.entity_movement_tracking=false in lithium config

Crash log:

[16:32:47] [Server thread/INFO]: [STDOUT]: Lithium Cached BlockState Flags are disabled!
[16:32:47] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.class_148: Ticking block entity
        at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1025) ~[server-intermediary.jar:?]
        at net.minecraft.class_3176.method_3813(class_3176.java:299) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:912) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281) ~[server-intermediary.jar:?]
        at java.base/java.lang.Thread.run(Thread.java:1570) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "me.jellysquid.mods.lithium.mixin.util.entity_movement_tracking.ServerEntityManagerAccessor.getCache()" because the return value of "me.jellysquid.mods.lithium.mixin.util.entity_movement_tracking.ServerWorldAccessor.getEntityManager()" is null
        at me.jellysquid.mods.lithium.common.entity.movement_tracker.SectionedEntityMovementTracker.register(SectionedEntityMovementTracker.java:85) ~[lithium-fabric-mc1.21.1-0.13.0.jar:?]
        at me.jellysquid.mods.lithium.common.entity.movement_tracker.SectionedInventoryEntityMovementTracker.registerAt(SectionedInventoryEntityMovementTracker.java:25) ~[lithium-fabric-mc1.21.1-0.13.0.jar:?]
        at net.minecraft.class_2614.initExtractInventoryTracker(class_2614.java:1104) ~[server-intermediary.jar:?]
        at net.minecraft.class_2614.redirect$znj000$lithium$getExtractInventory(class_2614.java:622) ~[server-intermediary.jar:?]
        at net.minecraft.class_2614.method_11241(class_2614.java:219) ~[server-intermediary.jar:?]
        at net.minecraft.class_2614.method_31691(class_2614.java:107) ~[server-intermediary.jar:?]
        at net.minecraft.class_2614.method_11243(class_2614.java:123) ~[server-intermediary.jar:?]
        at net.minecraft.class_2614.method_31692(class_2614.java:107) ~[server-intermediary.jar:?]
        at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:691) ~[server-intermediary.jar:?]
        at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:745) ~[server-intermediary.jar:?]
        at net.minecraft.class_1937.redirect$bdi000$moonrise$newBlockEntityTick(class_1937.java:5144) ~[server-intermediary.jar:?]
        at net.minecraft.class_1937.method_18471(class_1937.java:482) ~[server-intermediary.jar:?]
        at net.minecraft.class_3218.method_18765(class_3218.java:413) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1021) ~[server-intermediary.jar:?]
        ... 5 more
@jpenilla
Copy link
Member

jpenilla commented Sep 26, 2024

The problem with disabling this mixin is that lithium's hopper optimizations depend on it. Most of what we disable is also optimized by Moonrise, but hoppers aren't. I'd like to fix this properly as hopper optimizations are one of the big reasons to use lithium, but doing so seems non-trivial. Maybe we should just disable the mixin for now and rename this issue to something like Lithium hopper optimizations broken/disabled by chunk system entity management rewrite, leaving it open until it's properly fixed or we implement our own hopper optimizations. (as a side note, hoppers should still be better than vanilla due to our optimizations to general entity lookups and other areas)

@jpenilla jpenilla changed the title 1.21.1 crash with lithium (v0.13.0) Lithium hopper optimizations broken/disabled by chunk system entity management rewrite Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants